[Returnanalytics-commits] r2076 - pkg/PortfolioAnalytics/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Jun 25 23:03:43 CEST 2012
Author: braverock
Date: 2012-06-25 23:03:43 +0200 (Mon, 25 Jun 2012)
New Revision: 2076
Modified:
pkg/PortfolioAnalytics/R/constraints.R
pkg/PortfolioAnalytics/R/objective.R
pkg/PortfolioAnalytics/R/optimize.portfolio.R
pkg/PortfolioAnalytics/R/random_portfolios.R
Log:
- remove spurious "#' ." lines after an @export command that were confusing roxygen
Modified: pkg/PortfolioAnalytics/R/constraints.R
===================================================================
--- pkg/PortfolioAnalytics/R/constraints.R 2012-06-25 21:02:26 UTC (rev 2075)
+++ pkg/PortfolioAnalytics/R/constraints.R 2012-06-25 21:03:43 UTC (rev 2076)
@@ -25,7 +25,7 @@
#' @examples
#' exconstr <- constraint(assets=10, min_sum=1, max_sum=1, min=.01, max=.35, weight_seq=generatesequence())
#' @export
-#' .
+
constraint <- function(assets=NULL, ... ,min,max,min_mult,max_mult,min_sum=.99,max_sum=1.01,weight_seq=NULL)
{ # based on GPL R-Forge pkg roi by Stefan Thuessel,Kurt Hornik,David Meyer
if (hasArg(min) & hasArg(max)) {
Modified: pkg/PortfolioAnalytics/R/objective.R
===================================================================
--- pkg/PortfolioAnalytics/R/objective.R 2012-06-25 21:02:26 UTC (rev 2075)
+++ pkg/PortfolioAnalytics/R/objective.R 2012-06-25 21:03:43 UTC (rev 2076)
@@ -21,7 +21,7 @@
#' @param objclass string class to apply, default 'objective'
#' @author Brian G. Peterson
#' @export
-#' .
+
objective<-function(name , target=NULL , arguments, enabled=FALSE , ..., multiplier=1, objclass='objective'){
if(!hasArg(name)) stop("you must specify an objective name")
if (hasArg(name)) if(is.null(name)) stop("you must specify an objective name")
@@ -70,7 +70,7 @@
#' @seealso \code{\link{constraint}}
#'
#' @export
-#' .
+
add.objective <- function(constraints, type, name, arguments=NULL, enabled=FALSE, ..., indexnum=NULL)
{
if (!is.constraint(constraints)) {stop("constraints passed in are not of class constraint")}
Modified: pkg/PortfolioAnalytics/R/optimize.portfolio.R
===================================================================
--- pkg/PortfolioAnalytics/R/optimize.portfolio.R 2012-06-25 21:02:26 UTC (rev 2075)
+++ pkg/PortfolioAnalytics/R/optimize.portfolio.R 2012-06-25 21:03:43 UTC (rev 2076)
@@ -281,7 +281,7 @@
#' @param rebalance_on a periodicity as returned by xts function periodicity and usable by endpoints
#' @param training_period period to use as training in the front of the data
#' @param trailing_periods if set, an integer with the number of periods to roll over, default NULL will run from inception
-#' .
+
#' @return a list containing the optimal weights, some summary statistics, the function call, and optionally trace information
#' @author Kris Boudt, Peter Carl, Brian G. Peterson
#' @export
Modified: pkg/PortfolioAnalytics/R/random_portfolios.R
===================================================================
--- pkg/PortfolioAnalytics/R/random_portfolios.R 2012-06-25 21:02:26 UTC (rev 2075)
+++ pkg/PortfolioAnalytics/R/random_portfolios.R 2012-06-25 21:03:43 UTC (rev 2076)
@@ -50,7 +50,7 @@
#' @param rpconstraints an object of type "constraints" specifying the constraints for the optimization, see \code{\link{constraint}}
#' @param max_permutations integer: maximum number of iterations to try for a valid portfolio, default 200
#' @param rounding integer how many decimals should we round to
-#' .
+
#' @return named weighting vector
#' @author Peter Carl, Brian G. Peterson, (based on an idea by Pat Burns)
#' @export
More information about the Returnanalytics-commits
mailing list