[Returnanalytics-commits] r3484 - pkg/PortfolioAnalytics/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Jul 25 23:56:37 CEST 2014
Author: rossbennett34
Date: 2014-07-25 23:56:36 +0200 (Fri, 25 Jul 2014)
New Revision: 3484
Modified:
pkg/PortfolioAnalytics/R/optFUN.R
Log:
Fixing bug related to selecting default solver for max mean/sd and mean/etl optimization with ROI solvers
Modified: pkg/PortfolioAnalytics/R/optFUN.R
===================================================================
--- pkg/PortfolioAnalytics/R/optFUN.R 2014-07-25 20:46:27 UTC (rev 3483)
+++ pkg/PortfolioAnalytics/R/optFUN.R 2014-07-25 21:56:36 UTC (rev 3484)
@@ -1177,13 +1177,13 @@
# Find the maximum return
max_ret <- maxret_opt(R=R, moments=moments, constraints=constraints,
- target=NA, solver=solver, control=control)
+ target=NA, solver="glpk", control=control)
max_mean <- as.numeric(-max_ret$out)
# Find the minimum return
tmp_moments$mean <- -1 * moments$mean
min_ret <- maxret_opt(R=R, moments=tmp_moments, constraints=constraints,
- target=NA, solver=solver, control=control)
+ target=NA, solver="glpk", control=control)
min_mean <- as.numeric(min_ret$out)
# use optimize() to find the target return value that maximizes sharpe ratio
More information about the Returnanalytics-commits
mailing list