[Returnanalytics-commits] r2459 - in pkg/PortfolioAnalytics: R man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Jun 28 05:56:06 CEST 2013
Author: rossbennett34
Date: 2013-06-28 05:56:06 +0200 (Fri, 28 Jun 2013)
New Revision: 2459
Modified:
pkg/PortfolioAnalytics/R/constraints.R
pkg/PortfolioAnalytics/man/add.constraint.Rd
Log:
updating documentation for add.constraint function
Modified: pkg/PortfolioAnalytics/R/constraints.R
===================================================================
--- pkg/PortfolioAnalytics/R/constraints.R 2013-06-28 03:43:03 UTC (rev 2458)
+++ pkg/PortfolioAnalytics/R/constraints.R 2013-06-28 03:56:06 UTC (rev 2459)
@@ -177,15 +177,15 @@
#'
#' 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 one of three types: 'weight_sum', 'box', or 'group'.
+#' In general, you will define your constraints as: 'weight_sum', 'box', 'group', 'turnover', 'diversification', or 'volatility'.
#'
#' @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', or 'group'
+#' @param type character type of the constraint to add or update, currently 'weight_sum', 'box', 'group', 'turnover', 'diversification', or 'volatility'
#' @param enabled TRUE/FALSE
#' @param \dots any other passthru parameters to specify box and/or group 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}}
+#' @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}}
#' @export
add.constraint <- function(portfolio, type, enabled=FALSE, ..., indexnum=NULL){
# Check to make sure that the portfolio passed in is a portfolio object
Modified: pkg/PortfolioAnalytics/man/add.constraint.Rd
===================================================================
--- pkg/PortfolioAnalytics/man/add.constraint.Rd 2013-06-28 03:43:03 UTC (rev 2458)
+++ pkg/PortfolioAnalytics/man/add.constraint.Rd 2013-06-28 03:56:06 UTC (rev 2459)
@@ -11,7 +11,8 @@
optimization, see \code{\link{portfolio.spec}}}
\item{type}{character type of the constraint to add or
- update, currently 'weight_sum', 'box', or 'group'}
+ update, currently 'weight_sum', 'box', 'group',
+ 'turnover', 'diversification', or 'volatility'}
\item{enabled}{TRUE/FALSE}
@@ -27,13 +28,20 @@
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'.
+ In general, you will define your constraints as:
+ 'weight_sum', 'box', 'group', 'turnover',
+ 'diversification', or 'volatility'.
}
\author{
Ross Bennett
}
\seealso{
- \code{\link{constraint}}
+ \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}}
}
More information about the Returnanalytics-commits
mailing list