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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Aug 16 20:23:48 CEST 2013


Author: rossbennett34
Date: 2013-08-16 20:23:47 +0200 (Fri, 16 Aug 2013)
New Revision: 2801

Modified:
   pkg/PortfolioAnalytics/R/optimize.portfolio.R
   pkg/PortfolioAnalytics/man/optimize.portfolio.Rd
Log:
adding documentation for optimize.portfolio

Modified: pkg/PortfolioAnalytics/R/optimize.portfolio.R
===================================================================
--- pkg/PortfolioAnalytics/R/optimize.portfolio.R	2013-08-16 17:51:30 UTC (rev 2800)
+++ pkg/PortfolioAnalytics/R/optimize.portfolio.R	2013-08-16 18:23:47 UTC (rev 2801)
@@ -505,19 +505,29 @@
 #' When using GenSA and want to set \code{verbose=TRUE}, instead use \code{trace}. 
 #' 
 #' The extension to ROI solves a limited type of convex optimization problems:
-#' 1)  Maxmimize portfolio return subject leverage, box, and/or constraints on weights
-#' 2)  Minimize portfolio variance subject to leverage, box, and/or group constraints (otherwise known as global minimum variance portfolio)
-#' 3)  Minimize portfolio variance subject to leverage, box, and/or group constraints and a desired portfolio return
-#' 4)  Maximize quadratic utility subject to leverage, box, and/or group constraints and risk aversion parameter (this is passed into \code{optimize.portfolio} as as added argument to the \code{constraints} object)
-#' 5)  Mean CVaR optimization subject to leverage, box, and/or group constraints and target portfolio return
+#' \itemize{
+#' \item{Maxmimize portfolio return subject leverage, box, group, position limit, target mean return, and/or factor exposure constraints on weights}
+#' \item{Minimize portfolio variance subject to leverage, box, group, and/or factor exposure constraints (otherwise known as global minimum variance portfolio)}
+#' \item{Minimize portfolio variance subject to leverage, box, group, and/or factor exposure constraints and a desired portfolio return}
+#' \item{Maximize quadratic utility subject to leverage, box, group, target mean return, and/or factor exposure constraints and risk aversion parameter.
+#' (The risk aversion parameter is passed into \code{optimize.portfolio} as an added argument to the \code{portfolio} object)}
+#' \item{Mean CVaR optimization subject to leverage, box, group, position limit, target mean return, and/or factor exposure constraints and target portfolio return}
+#' }
 #' Lastly, because these convex optimization problem are standardized, there is no need for a penalty term. 
 #' Therefore, the \code{multiplier} argument in \code{\link{add.objective}} passed into the complete constraint object are ingnored by the solver.  
 #'   
 #' If you would like to interface with \code{optimize.portfolio} using matrix formulations, then use \code{ROI_old}. 
 #'  
+#' An object of class \code{v1_constraint} can be passed in for the \code{constraints} argument.
+#' The \code{v1_constraint} object was used in the previous 'v1' specification to specify the 
+#' constraints and objectives for the optimization problem, see \code{\link{constraint}}. 
+#' We will attempt to detect if the object passed into the constraints argument 
+#' is a \code{v1_constraint} object and update to the 'v2' specification by adding the 
+#' constraints and objectives to the \code{portfolio} object.
+#'  
 #' @param R an xts, vector, matrix, data frame, timeSeries or zoo object of asset returns
 #' @param portfolio an object of type "portfolio" specifying the constraints and objectives for the optimization
-#' @param constraints default=NULL, a list of constraint objects
+#' @param constraints default=NULL, a list of constraint objects. An object of class ]v1_constraint' can be passed in here.
 #' @param objectives default=NULL, a list of objective objects
 #' @param optimize_method one of "DEoptim", "random", "ROI","ROI_old", "pso", "GenSA".  For using \code{ROI_old}, need to use a constraint_ROI object in constraints. For using \code{ROI}, pass standard \code{constratint} object in \code{constraints} argument.  Presently, ROI has plugins for \code{quadprog} and \code{Rglpk}.
 #' @param search_size integer, how many portfolios to test, default 20,000

Modified: pkg/PortfolioAnalytics/man/optimize.portfolio.Rd
===================================================================
--- pkg/PortfolioAnalytics/man/optimize.portfolio.Rd	2013-08-16 17:51:30 UTC (rev 2800)
+++ pkg/PortfolioAnalytics/man/optimize.portfolio.Rd	2013-08-16 18:23:47 UTC (rev 2801)
@@ -17,7 +17,8 @@
   the constraints and objectives for the optimization}
 
   \item{constraints}{default=NULL, a list of constraint
-  objects}
+  objects. An object of class ]v1_constraint' can be passed
+  in here.}
 
   \item{objectives}{default=NULL, a list of objective
   objects}
@@ -88,27 +89,43 @@
   instead use \code{trace}.
 
   The extension to ROI solves a limited type of convex
-  optimization problems: 1) Maxmimize portfolio return
-  subject leverage, box, and/or constraints on weights 2)
-  Minimize portfolio variance subject to leverage, box,
-  and/or group constraints (otherwise known as global
-  minimum variance portfolio) 3) Minimize portfolio
-  variance subject to leverage, box, and/or group
-  constraints and a desired portfolio return 4) Maximize
-  quadratic utility subject to leverage, box, and/or group
-  constraints and risk aversion parameter (this is passed
-  into \code{optimize.portfolio} as as added argument to
-  the \code{constraints} object) 5) Mean CVaR optimization
-  subject to leverage, box, and/or group constraints and
-  target portfolio return Lastly, because these convex
-  optimization problem are standardized, there is no need
-  for a penalty term. Therefore, the \code{multiplier}
-  argument in \code{\link{add.objective}} passed into the
-  complete constraint object are ingnored by the solver.
+  optimization problems: \itemize{ \item{Maxmimize
+  portfolio return subject leverage, box, group, position
+  limit, target mean return, and/or factor exposure
+  constraints on weights} \item{Minimize portfolio variance
+  subject to leverage, box, group, and/or factor exposure
+  constraints (otherwise known as global minimum variance
+  portfolio)} \item{Minimize portfolio variance subject to
+  leverage, box, group, and/or factor exposure constraints
+  and a desired portfolio return} \item{Maximize quadratic
+  utility subject to leverage, box, group, target mean
+  return, and/or factor exposure constraints and risk
+  aversion parameter. (The risk aversion parameter is
+  passed into \code{optimize.portfolio} as an added
+  argument to the \code{portfolio} object)} \item{Mean CVaR
+  optimization subject to leverage, box, group, position
+  limit, target mean return, and/or factor exposure
+  constraints and target portfolio return} } Lastly,
+  because these convex optimization problem are
+  standardized, there is no need for a penalty term.
+  Therefore, the \code{multiplier} argument in
+  \code{\link{add.objective}} passed into the complete
+  constraint object are ingnored by the solver.
 
   If you would like to interface with
   \code{optimize.portfolio} using matrix formulations, then
   use \code{ROI_old}.
+
+  An object of class \code{v1_constraint} can be passed in
+  for the \code{constraints} argument. The
+  \code{v1_constraint} object was used in the previous 'v1'
+  specification to specify the constraints and objectives
+  for the optimization problem, see
+  \code{\link{constraint}}. We will attempt to detect if
+  the object passed into the constraints argument is a
+  \code{v1_constraint} object and update to the 'v2'
+  specification by adding the constraints and objectives to
+  the \code{portfolio} object.
 }
 \author{
   Kris Boudt, Peter Carl, Brian G. Peterson



More information about the Returnanalytics-commits mailing list