[Returnanalytics-commits] r2403 - pkg/PortfolioAnalytics/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sun Jun 23 02:21:49 CEST 2013
Author: rossbennett34
Date: 2013-06-23 02:21:49 +0200 (Sun, 23 Jun 2013)
New Revision: 2403
Modified:
pkg/PortfolioAnalytics/R/constraints.R
Log:
adding enabled arg to function calls inside switch statment for add.constraint(). Constraints are defaulting to FALSE without this.
Modified: pkg/PortfolioAnalytics/R/constraints.R
===================================================================
--- pkg/PortfolioAnalytics/R/constraints.R 2013-06-22 16:55:53 UTC (rev 2402)
+++ pkg/PortfolioAnalytics/R/constraints.R 2013-06-23 00:21:49 UTC (rev 2403)
@@ -202,19 +202,23 @@
# Box constraints
box = {tmp_constraint <- box_constraint(assets=assets,
type=type,
+ enabled=enabled,
...=...)
},
# Group constraints
group = {tmp_constraint <- group_constraint(assets=assets,
type=type,
+ enabled=enabled,
...=...)
},
# Sum of weights constraints
weight=, weight_sum = {tmp_constraint <- weight_sum_constraint(type=type,
+ enabled=enabled,
...=...)
},
# Turnover constraint
turnover = {tmp_constraint <- turnover_constraint(type=type,
+ enabled=enabled,
...=...)
},
# Do nothing and return the portfolio object if type is NULL
More information about the Returnanalytics-commits
mailing list