[Returnanalytics-commits] r2476 - in pkg/PortfolioAnalytics: R man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sun Jun 30 20:04:32 CEST 2013
Author: rossbennett34
Date: 2013-06-30 20:04:31 +0200 (Sun, 30 Jun 2013)
New Revision: 2476
Modified:
pkg/PortfolioAnalytics/R/constraints.R
pkg/PortfolioAnalytics/man/add.constraint.Rd
pkg/PortfolioAnalytics/man/box_constraint.Rd
pkg/PortfolioAnalytics/man/group_constraint.Rd
pkg/PortfolioAnalytics/man/weight_sum_constraint.Rd
Log:
updating documentation for constraints
Modified: pkg/PortfolioAnalytics/R/constraints.R
===================================================================
--- pkg/PortfolioAnalytics/R/constraints.R 2013-06-30 17:42:45 UTC (rev 2475)
+++ pkg/PortfolioAnalytics/R/constraints.R 2013-06-30 18:04:31 UTC (rev 2476)
@@ -177,12 +177,14 @@
#'
#' This is the main function for adding and/or updating constraints in an object of type \code{\link{portfolio}}.
#'
-#' In general, you will define your constraints as: 'weight_sum', 'box', 'group', 'turnover', 'diversification', 'volatility', or 'position_limit'.
+#' In general, you will define your constraints as: 'weight_sum', 'box', 'group', 'turnover', 'diversification', or 'position_limit'.
#'
+#' Special cases for the weight_sum constraint are "full_investment" and "dollar_nuetral" or "active" with appropriate values set for min_sum and max_sum. see \code{\link{weight_sum_constraint}}
+#'
#' @param portfolio an object of class 'portfolio' to add the constraint to, specifying the constraints for the optimization, see \code{\link{portfolio.spec}}
-#' @param type character type of the constraint to add or update, currently 'weight_sum', 'box', 'group', 'turnover', 'diversification', or 'volatility'
+#' @param type character type of the constraint to add or update, currently 'weight_sum', 'box', 'group', 'turnover', 'diversification', or 'position_limit'
#' @param enabled TRUE/FALSE
-#' @param \dots any other passthru parameters to specify box and/or group constraints
+#' @param \dots any other passthru parameters to specify constraints
#' @param indexnum if you are updating a specific constraint, the index number in the $objectives list to update
#' @author Ross Bennett
#' @seealso \code{\link{constraint_v2}}, \code{\link{weight_sum_constraint}}, \code{\link{box_constraint}}, \code{\link{group_constraint}}, \code{\link{turnover_constraint}}, \code{\link{diversification_constraint}}, \code{\link{volatility_constraint}}, \code{\link{position_limit_constraint}}
@@ -272,7 +274,7 @@
#' @param min_mult numeric or named vector specifying minimum multiplier box constraint from seed weight in \code{assets}
#' @param max_mult numeric or named vector specifying maximum multiplier box constraint from seed weight in \code{assets}
#' @param enabled TRUE/FALSE
-#' @param \dots any other passthru parameters to specify box and/or group constraints
+#' @param \dots any other passthru parameters to specify box constraints
#' @author Ross Bennett
#' @seealso \code{\link{add.constraint}}
#' @export
@@ -372,7 +374,7 @@
#' @param group_min numeric or vector specifying minimum weight group constraints
#' @param group_max numeric or vector specifying minimum weight group constraints
#' @param enabled TRUE/FALSE
-#' @param \dots any other passthru parameters to specify box and/or group constraints
+#' @param \dots any other passthru parameters to specify group constraints
#' @author Ross Bennett
#' @seealso \code{\link{add.constraint}}
#' @export
@@ -415,14 +417,20 @@
#' constructor for weight_sum_constraint
#'
-#' This function is called by add.constraint when type="weight_sum" is specified. see \code{\link{add.constraint}}
+#' This function is called by add.constraint when "weight_sum", "leverage", "full_investment", "dollar_neutral", or "active" is specified as the type. see \code{\link{add.constraint}}
#' This function allows the user to specify the minimum and maximum that the weights sum to
#'
+#' Special cases for the weight_sum constraint are "full_investment" and "dollar_nuetral" or "active"
+#'
+#' If type="full_investment", min_sum=1 and max_sum=1
+#'
+#' If type="dollar_neutral" or type="active", min_sum=0, and max_sum=0
+#'
#' @param type character type of the constraint
#' @param min_sum minimum sum of all asset weights, default 0.99
#' @param max_sum maximum sum of all asset weights, default 1.01
#' @param enabled TRUE/FALSE
-#' @param \dots any other passthru parameters to specify box and/or group constraints
+#' @param \dots any other passthru parameters to specify weight_sum constraints
#' @author Ross Bennett
#' @export
weight_sum_constraint <- function(type, min_sum=0.99, max_sum=1.01, enabled=FALSE, ...){
Modified: pkg/PortfolioAnalytics/man/add.constraint.Rd
===================================================================
--- pkg/PortfolioAnalytics/man/add.constraint.Rd 2013-06-30 17:42:45 UTC (rev 2475)
+++ pkg/PortfolioAnalytics/man/add.constraint.Rd 2013-06-30 18:04:31 UTC (rev 2476)
@@ -12,12 +12,12 @@
\item{type}{character type of the constraint to add or
update, currently 'weight_sum', 'box', 'group',
- 'turnover', 'diversification', or 'volatility'}
+ 'turnover', 'diversification', or 'position_limit'}
\item{enabled}{TRUE/FALSE}
- \item{\dots}{any other passthru parameters to specify box
- and/or group constraints}
+ \item{\dots}{any other passthru parameters to specify
+ constraints}
\item{indexnum}{if you are updating a specific
constraint, the index number in the $objectives list to
@@ -30,7 +30,12 @@
\details{
In general, you will define your constraints as:
'weight_sum', 'box', 'group', 'turnover',
- 'diversification', 'volatility', or 'position_limit'.
+ 'diversification', or 'position_limit'.
+
+ Special cases for the weight_sum constraint are
+ "full_investment" and "dollar_nuetral" or "active" with
+ appropriate values set for min_sum and max_sum. see
+ \code{\link{weight_sum_constraint}}
}
\author{
Ross Bennett
Modified: pkg/PortfolioAnalytics/man/box_constraint.Rd
===================================================================
--- pkg/PortfolioAnalytics/man/box_constraint.Rd 2013-06-30 17:42:45 UTC (rev 2475)
+++ pkg/PortfolioAnalytics/man/box_constraint.Rd 2013-06-30 18:04:31 UTC (rev 2476)
@@ -28,7 +28,7 @@
\item{enabled}{TRUE/FALSE}
\item{\dots}{any other passthru parameters to specify box
- and/or group constraints}
+ constraints}
}
\description{
This function is called by add.constraint when type="box"
Modified: pkg/PortfolioAnalytics/man/group_constraint.Rd
===================================================================
--- pkg/PortfolioAnalytics/man/group_constraint.Rd 2013-06-30 17:42:45 UTC (rev 2475)
+++ pkg/PortfolioAnalytics/man/group_constraint.Rd 2013-06-30 18:04:31 UTC (rev 2476)
@@ -15,7 +15,7 @@
\item{groups}{vector specifying the groups of the assets}
\item{group_labels}{character vector to label the groups
- (i.e. size, asset class, style, etc.)}
+ (e.g. size, asset class, style, etc.)}
\item{group_min}{numeric or vector specifying minimum
weight group constraints}
@@ -25,8 +25,8 @@
\item{enabled}{TRUE/FALSE}
- \item{\dots}{any other passthru parameters to specify box
- and/or group constraints}
+ \item{\dots}{any other passthru parameters to specify
+ group constraints}
}
\description{
This function is called by add.constraint when
Modified: pkg/PortfolioAnalytics/man/weight_sum_constraint.Rd
===================================================================
--- pkg/PortfolioAnalytics/man/weight_sum_constraint.Rd 2013-06-30 17:42:45 UTC (rev 2475)
+++ pkg/PortfolioAnalytics/man/weight_sum_constraint.Rd 2013-06-30 18:04:31 UTC (rev 2476)
@@ -16,16 +16,26 @@
\item{enabled}{TRUE/FALSE}
- \item{\dots}{any other passthru parameters to specify box
- and/or group constraints}
+ \item{\dots}{any other passthru parameters to specify
+ weight_sum constraints}
}
\description{
This function is called by add.constraint when
- type="weight_sum" is specified. see
- \code{\link{add.constraint}} This function allows the
+ "weight_sum", "leverage", "full_investment",
+ "dollar_neutral", or "active" is specified as the type.
+ see \code{\link{add.constraint}} This function allows the
user to specify the minimum and maximum that the weights
sum to
}
+\details{
+ Special cases for the weight_sum constraint are
+ "full_investment" and "dollar_nuetral" or "active"
+
+ If type="full_investment", min_sum=1 and max_sum=1
+
+ If type="dollar_neutral" or type="active", min_sum=0, and
+ max_sum=0
+}
\author{
Ross Bennett
}
More information about the Returnanalytics-commits
mailing list