[Returnanalytics-commits] r2400 - pkg/PortfolioAnalytics/man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Jun 22 05:44:42 CEST 2013


Author: rossbennett34
Date: 2013-06-22 05:44:42 +0200 (Sat, 22 Jun 2013)
New Revision: 2400

Added:
   pkg/PortfolioAnalytics/man/add.constraint.Rd
   pkg/PortfolioAnalytics/man/add.objective_v2.Rd
   pkg/PortfolioAnalytics/man/box_constraint.Rd
   pkg/PortfolioAnalytics/man/constraint_ROI.Rd
   pkg/PortfolioAnalytics/man/constraint_v2.Rd
   pkg/PortfolioAnalytics/man/get.constraints.Rd
   pkg/PortfolioAnalytics/man/group_constraint.Rd
   pkg/PortfolioAnalytics/man/is.portfolio.Rd
   pkg/PortfolioAnalytics/man/portfolio.spec.Rd
   pkg/PortfolioAnalytics/man/turnover.Rd
   pkg/PortfolioAnalytics/man/turnover_constraint.Rd
   pkg/PortfolioAnalytics/man/turnover_objective.Rd
   pkg/PortfolioAnalytics/man/weight_sum_constraint.Rd
Log:
adding documentation files in man directory produced wth roxygenize

Added: pkg/PortfolioAnalytics/man/add.constraint.Rd
===================================================================
--- pkg/PortfolioAnalytics/man/add.constraint.Rd	                        (rev 0)
+++ pkg/PortfolioAnalytics/man/add.constraint.Rd	2013-06-22 03:44:42 UTC (rev 2400)
@@ -0,0 +1,39 @@
+\name{add.constraint}
+\alias{add.constraint}
+\title{General interface for adding and/or updating optimization constraints, currently supports weight, box and group constraints.}
+\usage{
+  add.constraint(portfolio, type, enabled = FALSE, ...,
+    indexnum = NULL)
+}
+\arguments{
+  \item{portfolio}{an object of class 'portfolio' to add
+  the constraint to, specifying the constraints for the
+  optimization, see \code{\link{portfolio.spec}}}
+
+  \item{type}{character type of the constraint to add or
+  update, currently 'weight_sum', 'box', or 'group'}
+
+  \item{enabled}{TRUE/FALSE}
+
+  \item{\dots}{any other passthru parameters to specify box
+  and/or group constraints}
+
+  \item{indexnum}{if you are updating a specific
+  constraint, the index number in the $objectives list to
+  update}
+}
+\description{
+  This is the main function for adding and/or updating
+  constraints in an object of type \code{\link{portfolio}}.
+}
+\details{
+  In general, you will define your constraints as one of
+  three types: 'weight_sum', 'box', or 'group'.
+}
+\author{
+  Ross Bennett
+}
+\seealso{
+  \code{\link{constraint}}
+}
+

Added: pkg/PortfolioAnalytics/man/add.objective_v2.Rd
===================================================================
--- pkg/PortfolioAnalytics/man/add.objective_v2.Rd	                        (rev 0)
+++ pkg/PortfolioAnalytics/man/add.objective_v2.Rd	2013-06-22 03:44:42 UTC (rev 2400)
@@ -0,0 +1,48 @@
+\name{add.objective_v2}
+\alias{add.objective_v2}
+\title{General interface for adding optimization objectives, including risk, return, and risk budget}
+\usage{
+  add.objective_v2(portfolio, type, name, arguments = NULL,
+    enabled = FALSE, ..., indexnum = NULL)
+}
+\arguments{
+  \item{portfolio}{an object of type 'portfolio' to add the
+  objective to, specifying the portfolio for the
+  optimization, see \code{\link{portfolio}}}
+
+  \item{type}{character type of the objective to add or
+  update, currently 'return','risk', or 'risk_budget'}
+
+  \item{name}{name of the objective, should correspond to a
+  function, though we will try to make allowances}
+
+  \item{arguments}{default arguments to be passed to an
+  objective function when executed}
+
+  \item{enabled}{TRUE/FALSE}
+
+  \item{\dots}{any other passthru parameters}
+
+  \item{indexnum}{if you are updating a specific
+  constraint, the index number in the $objectives list to
+  update}
+}
+\description{
+  This function is the main function for adding and
+  updating business objectives in an object of type
+  \code{\link{portfolio}}.
+}
+\details{
+  In general, you will define your objective as one of
+  three types: 'return', 'risk', or 'risk_budget'. These
+  have special handling and intelligent defaults for
+  dealing with the function most likely to be used as
+  objectives, including mean, median, VaR, ES, etc.
+}
+\author{
+  Brian G. Peterson and Ross Bennett
+}
+\seealso{
+  \code{\link{objective}}
+}
+

Added: pkg/PortfolioAnalytics/man/box_constraint.Rd
===================================================================
--- pkg/PortfolioAnalytics/man/box_constraint.Rd	                        (rev 0)
+++ pkg/PortfolioAnalytics/man/box_constraint.Rd	2013-06-22 03:44:42 UTC (rev 2400)
@@ -0,0 +1,43 @@
+\name{box_constraint}
+\alias{box_constraint}
+\title{constructor for box_constraint.}
+\usage{
+  box_constraint(type, assets, min, max, min_mult,
+    max_mult, enabled = FALSE, ...)
+}
+\arguments{
+  \item{type}{character type of the constraint}
+
+  \item{assets}{number of assets, or optionally a named
+  vector of assets specifying seed weights}
+
+  \item{min}{numeric or named vector specifying minimum
+  weight box constraints}
+
+  \item{max}{numeric or named vector specifying minimum
+  weight box constraints}
+
+  \item{min_mult}{numeric or named vector specifying
+  minimum multiplier box constraint from seed weight in
+  \code{assets}}
+
+  \item{max_mult}{numeric or named vector specifying
+  maximum multiplier box constraint from seed weight in
+  \code{assets}}
+
+  \item{enabled}{TRUE/FALSE}
+
+  \item{\dots}{any other passthru parameters to specify box
+  and/or group constraints}
+}
+\description{
+  This function is called by add.constraint when type="box"
+  is specified. see \code{\link{add.constraint}}
+}
+\author{
+  Ross Bennett
+}
+\seealso{
+  \code{\link{add.constraint}}
+}
+

Added: pkg/PortfolioAnalytics/man/constraint_ROI.Rd
===================================================================
--- pkg/PortfolioAnalytics/man/constraint_ROI.Rd	                        (rev 0)
+++ pkg/PortfolioAnalytics/man/constraint_ROI.Rd	2013-06-22 03:44:42 UTC (rev 2400)
@@ -0,0 +1,31 @@
+\name{constraint_ROI}
+\alias{constraint_ROI}
+\title{constructor for class constraint_ROI}
+\usage{
+  constraint_ROI(assets = NULL, op.problem,
+    solver = c("glpk", "quadprog"), weight_seq = NULL)
+}
+\arguments{
+  \item{assets}{number of assets, or optionally a named
+  vector of assets specifying seed weights}
+
+  \item{op.problem}{an object of type "OP" (optimization
+  problem, of \code{ROI}) specifying the complete
+  optimization problem, see ROI help pages for proper
+  construction of OP object.}
+
+  \item{solver}{string argument for what solver package to
+  use, must have ROI plugin installed for that solver.
+  Currently support is for \code{glpk} and
+  \code{quadprog}.}
+
+  \item{weight_seq}{seed sequence of weights, see
+  \code{\link{generatesequence}}}
+}
+\description{
+  constructor for class constraint_ROI
+}
+\author{
+  Hezky Varon
+}
+

Added: pkg/PortfolioAnalytics/man/constraint_v2.Rd
===================================================================
--- pkg/PortfolioAnalytics/man/constraint_v2.Rd	                        (rev 0)
+++ pkg/PortfolioAnalytics/man/constraint_v2.Rd	2013-06-22 03:44:42 UTC (rev 2400)
@@ -0,0 +1,26 @@
+\name{constraint_v2}
+\alias{constraint_v2}
+\title{constructor for class v2_constraint}
+\usage{
+  constraint_v2(type, enabled = FALSE, ...,
+    constrclass = "v2_constraint")
+}
+\arguments{
+  \item{type}{character type of the constraint to add or
+  update, currently 'weight_sum', 'box', or 'group'}
+
+  \item{assets}{number of assets, or optionally a named
+  vector of assets specifying seed weights}
+
+  \item{...}{any other passthru parameters}
+
+  \item{constrclass}{character to name the constraint
+  class}
+}
+\description{
+  constructor for class v2_constraint
+}
+\author{
+  Ross Bennett
+}
+

Added: pkg/PortfolioAnalytics/man/get.constraints.Rd
===================================================================
--- pkg/PortfolioAnalytics/man/get.constraints.Rd	                        (rev 0)
+++ pkg/PortfolioAnalytics/man/get.constraints.Rd	2013-06-22 03:44:42 UTC (rev 2400)
@@ -0,0 +1,26 @@
+\name{get.constraints}
+\alias{get.constraints}
+\title{Helper function to get the enabled constraints out of the portfolio object, see \code{\link{portfolio.spec}}
+ Returns an object of class constraint which is a flat list of weight_sum, box, and group constraints.
+ Uses the same naming as the v1_constraint object which may be useful when passed to other functions.}
+\usage{
+  get.constraints(portfolio)
+}
+\arguments{
+  \item{portfolio}{an object of class 'portfolio'}
+}
+\description{
+  Helper function to get the enabled constraints out of the
+  portfolio object, see \code{\link{portfolio.spec}}
+  Returns an object of class constraint which is a flat
+  list of weight_sum, box, and group constraints.  Uses the
+  same naming as the v1_constraint object which may be
+  useful when passed to other functions.
+}
+\author{
+  Ross Bennett
+}
+\seealso{
+  \code{\link{portfolio.spec}}, \code{\link{constraint_v2}}
+}
+

Added: pkg/PortfolioAnalytics/man/group_constraint.Rd
===================================================================
--- pkg/PortfolioAnalytics/man/group_constraint.Rd	                        (rev 0)
+++ pkg/PortfolioAnalytics/man/group_constraint.Rd	2013-06-22 03:44:42 UTC (rev 2400)
@@ -0,0 +1,38 @@
+\name{group_constraint}
+\alias{group_constraint}
+\title{constructor for group_constraint}
+\usage{
+  group_constraint(type, assets, groups, group_min,
+    group_max, enabled = FALSE, ...)
+}
+\arguments{
+  \item{type}{character type of the constraint}
+
+  \item{assets}{number of assets, or optionally a named
+  vector of assets specifying seed weights}
+
+  \item{groups}{vector specifying the groups of the assets}
+
+  \item{group_min}{numeric or vector specifying minimum
+  weight group constraints}
+
+  \item{group_max}{numeric or vector specifying minimum
+  weight group constraints}
+
+  \item{enabled}{TRUE/FALSE}
+
+  \item{\dots}{any other passthru parameters to specify box
+  and/or group constraints}
+}
+\description{
+  This function is called by add.constraint when
+  type="group" is specified. see
+  \code{\link{add.constraint}}
+}
+\author{
+  Ross Bennett
+}
+\seealso{
+  \code{\link{add.constraint}}
+}
+

Added: pkg/PortfolioAnalytics/man/is.portfolio.Rd
===================================================================
--- pkg/PortfolioAnalytics/man/is.portfolio.Rd	                        (rev 0)
+++ pkg/PortfolioAnalytics/man/is.portfolio.Rd	2013-06-22 03:44:42 UTC (rev 2400)
@@ -0,0 +1,16 @@
+\name{is.portfolio}
+\alias{is.portfolio}
+\title{check function for portfolio}
+\usage{
+  is.portfolio(x)
+}
+\arguments{
+  \item{x}{object to test for type \code{portfolio}}
+}
+\description{
+  check function for portfolio
+}
+\author{
+  Ross Bennett
+}
+

Added: pkg/PortfolioAnalytics/man/portfolio.spec.Rd
===================================================================
--- pkg/PortfolioAnalytics/man/portfolio.spec.Rd	                        (rev 0)
+++ pkg/PortfolioAnalytics/man/portfolio.spec.Rd	2013-06-22 03:44:42 UTC (rev 2400)
@@ -0,0 +1,25 @@
+\name{portfolio.spec}
+\alias{portfolio.spec}
+\title{constructor for class portfolio}
+\usage{
+  portfolio.spec(assets = NULL, weight_seq = NULL)
+}
+\arguments{
+  \item{assets}{number of assets, or optionally a named
+  vector of assets specifying seed weights. If seed weights
+  are not specified, an equal weight portfolio will be
+  assumed.}
+
+  \item{weight_seq}{seed sequence of weights, see
+  \code{\link{generatesequence}}}
+}
+\description{
+  constructor for class portfolio
+}
+\examples{
+pspec <- portfolio.spec(assets=10, weight_seq=generatesequence())
+}
+\author{
+  Ross Bennett
+}
+

Added: pkg/PortfolioAnalytics/man/turnover.Rd
===================================================================
--- pkg/PortfolioAnalytics/man/turnover.Rd	                        (rev 0)
+++ pkg/PortfolioAnalytics/man/turnover.Rd	2013-06-22 03:44:42 UTC (rev 2400)
@@ -0,0 +1,23 @@
+\name{turnover}
+\alias{turnover}
+\title{Calculates turnover given two vectors of weights.
+This is used as an objective function and is called when the user adds an objective of type turnover with \code{\link{add.objective}}}
+\usage{
+  turnover(weights, wts.init = NULL)
+}
+\arguments{
+  \item{weights}{vector of weights from optimization}
+
+  \item{wts.init}{vector of initial weights used to
+  calculate turnover from}
+}
+\description{
+  Calculates turnover given two vectors of weights. This is
+  used as an objective function and is called when the user
+  adds an objective of type turnover with
+  \code{\link{add.objective}}
+}
+\author{
+  Ross Bennett
+}
+

Added: pkg/PortfolioAnalytics/man/turnover_constraint.Rd
===================================================================
--- pkg/PortfolioAnalytics/man/turnover_constraint.Rd	                        (rev 0)
+++ pkg/PortfolioAnalytics/man/turnover_constraint.Rd	2013-06-22 03:44:42 UTC (rev 2400)
@@ -0,0 +1,31 @@
+\name{turnover_constraint}
+\alias{turnover_constraint}
+\title{constructor for turnover_constraint}
+\usage{
+  turnover_constraint(type, max.turnover, enabled = FALSE,
+    ...)
+}
+\arguments{
+  \item{type}{character type of the constraint}
+
+  \item{max.turnover}{maximum turnover value}
+
+  \item{enabled}{TRUE/FALSE}
+
+  \item{\dots}{any other passthru parameters to specify box
+  and/or group constraints}
+}
+\description{
+  This function is called by add.constraint when
+  type="turnover" is specified. see
+  \code{\link{add.constraint}} This function allows the
+  user to specify a maximum turnover constraint
+}
+\details{
+  Note that turnover constraint is currently only supported
+  for global minimum variance problem with solve.QP plugin
+}
+\author{
+  Ross Bennett
+}
+

Added: pkg/PortfolioAnalytics/man/turnover_objective.Rd
===================================================================
--- pkg/PortfolioAnalytics/man/turnover_objective.Rd	                        (rev 0)
+++ pkg/PortfolioAnalytics/man/turnover_objective.Rd	2013-06-22 03:44:42 UTC (rev 2400)
@@ -0,0 +1,34 @@
+\name{turnover_objective}
+\alias{turnover_objective}
+\title{constructor for class turnover_objective}
+\usage{
+  turnover_objective(name, target = NULL, arguments = NULL,
+    multiplier = 1, enabled = FALSE, ...)
+}
+\arguments{
+  \item{name}{name of the objective, should correspond to a
+  function, though we will try to make allowances}
+
+  \item{target}{univariate target for the objective}
+
+  \item{arguments}{default arguments to be passed to an
+  objective function when executed}
+
+  \item{multiplier}{multiplier to apply to the objective,
+  usually 1 or -1}
+
+  \item{enabled}{TRUE/FALSE}
+
+  \item{\dots}{any other passthru parameters}
+}
+\description{
+  if target is null, we'll try to minimize the turnover
+  metric
+}
+\details{
+  if target is set, we'll try to meet the metric
+}
+\author{
+  Ross Bennett
+}
+

Added: pkg/PortfolioAnalytics/man/weight_sum_constraint.Rd
===================================================================
--- pkg/PortfolioAnalytics/man/weight_sum_constraint.Rd	                        (rev 0)
+++ pkg/PortfolioAnalytics/man/weight_sum_constraint.Rd	2013-06-22 03:44:42 UTC (rev 2400)
@@ -0,0 +1,32 @@
+\name{weight_sum_constraint}
+\alias{weight_sum_constraint}
+\title{constructor for weight_sum_constraint}
+\usage{
+  weight_sum_constraint(type, min_sum = 0.99,
+    max_sum = 1.01, enabled = FALSE, ...)
+}
+\arguments{
+  \item{type}{character type of the constraint}
+
+  \item{min_sum}{minimum sum of all asset weights, default
+  0.99}
+
+  \item{max_sum}{maximum sum of all asset weights, default
+  1.01}
+
+  \item{enabled}{TRUE/FALSE}
+
+  \item{\dots}{any other passthru parameters to specify box
+  and/or group constraints}
+}
+\description{
+  This function is called by add.constraint when
+  type="weight_sum" is specified. see
+  \code{\link{add.constraint}} This function allows the
+  user to specify the minimum and maximum that the weights
+  sum to
+}
+\author{
+  Ross Bennett
+}
+



More information about the Returnanalytics-commits mailing list