[Returnanalytics-commits] r2077 - in pkg/PortfolioAnalytics: . R man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Jun 25 23:08:33 CEST 2012


Author: braverock
Date: 2012-06-25 23:08:33 +0200 (Mon, 25 Jun 2012)
New Revision: 2077

Modified:
   pkg/PortfolioAnalytics/NAMESPACE
   pkg/PortfolioAnalytics/R/constraints.R
   pkg/PortfolioAnalytics/R/objective.R
   pkg/PortfolioAnalytics/R/optimize.portfolio.R
   pkg/PortfolioAnalytics/R/random_portfolios.R
   pkg/PortfolioAnalytics/man/optimize.portfolio.rebalancing.Rd
   pkg/PortfolioAnalytics/man/randomize_portfolio.Rd
Log:
- more roxygen tweaking


Modified: pkg/PortfolioAnalytics/NAMESPACE
===================================================================
--- pkg/PortfolioAnalytics/NAMESPACE	2012-06-25 21:03:43 UTC (rev 2076)
+++ pkg/PortfolioAnalytics/NAMESPACE	2012-06-25 21:08:33 UTC (rev 2077)
@@ -1,3 +1,4 @@
+export(add.objective)
 export(CCCgarch.MM)
 export(chart.Scatter.DE)
 export(chart.Scatter.RP)
@@ -6,6 +7,7 @@
 export(chart.Weights.DE)
 export(chart.Weights.RP)
 export(constrained_objective)
+export(constraint)
 export(constraint_ROI)
 export(extract.efficient.frontier)
 export(extractStats)
@@ -16,6 +18,7 @@
 export(generatesequence)
 export(is.constraint)
 export(is.objective)
+export(objective)
 export(optimize.portfolio)
 export(optimize.portfolio.parallel)
 export(optimize.portfolio.rebalancing)
@@ -31,3 +34,4 @@
 export(set.portfolio.moments)
 export(summary.optimize.portfolio.rebalancing)
 export(trailingFUN)
+export(update.constraint)

Modified: pkg/PortfolioAnalytics/R/constraints.R
===================================================================
--- pkg/PortfolioAnalytics/R/constraints.R	2012-06-25 21:03:43 UTC (rev 2076)
+++ pkg/PortfolioAnalytics/R/constraints.R	2012-06-25 21:08:33 UTC (rev 2077)
@@ -25,7 +25,6 @@
 #' @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)) {
@@ -167,6 +166,7 @@
 #' @param object object of type \code{\link{constraint}} to update
 #' @param ... any other passthru parameters, used to call \code{\link{constraint}}
 #' @author bpeterson
+#' @export
 update.constraint <- function(object, ...){
   constraints <- object
   if (is.null(constraints) | !is.constraint(constraints)){

Modified: pkg/PortfolioAnalytics/R/objective.R
===================================================================
--- pkg/PortfolioAnalytics/R/objective.R	2012-06-25 21:03:43 UTC (rev 2076)
+++ pkg/PortfolioAnalytics/R/objective.R	2012-06-25 21:08:33 UTC (rev 2077)
@@ -21,7 +21,6 @@
 #' @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 +69,6 @@
 #' @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")}
@@ -228,4 +226,4 @@
   Objective$min_difference<-min_difference
   
   return(Objective)
-} # end risk_budget_objective constructor
\ No newline at end of file
+} # end risk_budget_objective constructor

Modified: pkg/PortfolioAnalytics/R/optimize.portfolio.R
===================================================================
--- pkg/PortfolioAnalytics/R/optimize.portfolio.R	2012-06-25 21:03:43 UTC (rev 2076)
+++ pkg/PortfolioAnalytics/R/optimize.portfolio.R	2012-06-25 21:08:33 UTC (rev 2077)
@@ -280,8 +280,7 @@
 #' @param rp a set of random portfolios passed into the function, to prevent recalculation
 #' @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
- 
+#' @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
@@ -376,4 +375,4 @@
 
 ###############################################################################
 # $Id$
-###############################################################################
\ No newline at end of file
+###############################################################################

Modified: pkg/PortfolioAnalytics/R/random_portfolios.R
===================================================================
--- pkg/PortfolioAnalytics/R/random_portfolios.R	2012-06-25 21:03:43 UTC (rev 2076)
+++ pkg/PortfolioAnalytics/R/random_portfolios.R	2012-06-25 21:08:33 UTC (rev 2077)
@@ -50,7 +50,6 @@
 #' @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

Modified: pkg/PortfolioAnalytics/man/optimize.portfolio.rebalancing.Rd
===================================================================
--- pkg/PortfolioAnalytics/man/optimize.portfolio.rebalancing.Rd	2012-06-25 21:03:43 UTC (rev 2076)
+++ pkg/PortfolioAnalytics/man/optimize.portfolio.rebalancing.Rd	2012-06-25 21:08:33 UTC (rev 2077)
@@ -38,7 +38,7 @@
 
   \item{trailing_periods}{if set, an integer with the
   number of periods to roll over, default NULL will run
-  from inception .}
+  from inception}
 }
 \value{
   a list containing the optimal weights, some summary

Modified: pkg/PortfolioAnalytics/man/randomize_portfolio.Rd
===================================================================
--- pkg/PortfolioAnalytics/man/randomize_portfolio.Rd	2012-06-25 21:03:43 UTC (rev 2076)
+++ pkg/PortfolioAnalytics/man/randomize_portfolio.Rd	2012-06-25 21:08:33 UTC (rev 2077)
@@ -14,7 +14,7 @@
   iterations to try for a valid portfolio, default 200}
 
   \item{rounding}{integer how many decimals should we round
-  to .}
+  to}
 }
 \value{
   named weighting vector



More information about the Returnanalytics-commits mailing list