[Returnanalytics-commits] r2475 - pkg/PortfolioAnalytics/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sun Jun 30 19:42:45 CEST 2013
Author: rossbennett34
Date: 2013-06-30 19:42:45 +0200 (Sun, 30 Jun 2013)
New Revision: 2475
Modified:
pkg/PortfolioAnalytics/R/constraints.R
Log:
added support for special case of weight_sum constraint type for full_investment, dollar_neutral, and active
Modified: pkg/PortfolioAnalytics/R/constraints.R
===================================================================
--- pkg/PortfolioAnalytics/R/constraints.R 2013-06-30 17:28:24 UTC (rev 2474)
+++ pkg/PortfolioAnalytics/R/constraints.R 2013-06-30 17:42:45 UTC (rev 2475)
@@ -216,6 +216,20 @@
enabled=enabled,
...=...)
},
+ # Special case of weight_sum constraint for full investment
+ full_investment = {tmp_constraint <- weight_sum_constraint(type=type,
+ min_sum=1,
+ max_sum=1,
+ enabled=enabled,
+ ...=...)
+ },
+ # Special case of weight_sum constraint for dollar neutral or active
+ dollar_neutral=, active= {tmp_constraint <- weight_sum_constraint(type=type,
+ min_sum=0,
+ max_sum=0,
+ enabled=enabled,
+ ...=...)
+ },
# Turnover constraint
turnover = {tmp_constraint <- turnover_constraint(type=type,
enabled=enabled,
More information about the Returnanalytics-commits
mailing list