[Returnanalytics-commits] r2468 - pkg/PortfolioAnalytics/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Jun 28 23:01:43 CEST 2013
Author: rossbennett34
Date: 2013-06-28 23:01:42 +0200 (Fri, 28 Jun 2013)
New Revision: 2468
Modified:
pkg/PortfolioAnalytics/R/constrained_objective.R
Log:
remove abs() function for objective in return_objective so that return can be maximized with a negative multiplier
Modified: pkg/PortfolioAnalytics/R/constrained_objective.R
===================================================================
--- pkg/PortfolioAnalytics/R/constrained_objective.R 2013-06-28 19:19:53 UTC (rev 2467)
+++ pkg/PortfolioAnalytics/R/constrained_objective.R 2013-06-28 21:01:42 UTC (rev 2468)
@@ -233,7 +233,7 @@
out = out + penalty*abs(objective$multiplier)*abs(tmp_measure-objective$target)
}
# target is null or doesn't exist, just maximize, or minimize violation of constraint
- out = out + abs(objective$multiplier)*tmp_measure
+ out = out + objective$multiplier*tmp_measure
} # end handling for return objectives
if(inherits(objective,"portfolio_risk_objective")){
More information about the Returnanalytics-commits
mailing list