[Returnanalytics-commits] r2268 - in pkg/PortfolioAnalytics: . R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sat Sep 1 21:46:47 CEST 2012
Author: braverock
Date: 2012-09-01 21:46:47 +0200 (Sat, 01 Sep 2012)
New Revision: 2268
Modified:
pkg/PortfolioAnalytics/DESCRIPTION
pkg/PortfolioAnalytics/R/optimize.portfolio.R
Log:
- more minor updates to work better with DEoptim, bump required DEoptim version number
Modified: pkg/PortfolioAnalytics/DESCRIPTION
===================================================================
--- pkg/PortfolioAnalytics/DESCRIPTION 2012-09-01 19:42:17 UTC (rev 2267)
+++ pkg/PortfolioAnalytics/DESCRIPTION 2012-09-01 19:46:47 UTC (rev 2268)
@@ -15,7 +15,7 @@
PerformanceAnalytics (>= 1.0.0)
Suggests:
quantmod,
- DEoptim,
+ DEoptim(>=2.3.1),
foreach,
fGarch,
Rglpk,
Modified: pkg/PortfolioAnalytics/R/optimize.portfolio.R
===================================================================
--- pkg/PortfolioAnalytics/R/optimize.portfolio.R 2012-09-01 19:42:17 UTC (rev 2267)
+++ pkg/PortfolioAnalytics/R/optimize.portfolio.R 2012-09-01 19:46:47 UTC (rev 2268)
@@ -146,6 +146,7 @@
# DEoptim does 200 generations by default, so lets set the size of each generation to search_size/200)
if(hasArg(itermax)) itermax=match.call(expand.dots=TRUE)$itermax else itermax=N*50
NP = round(search_size/itermax)
+ if(NP<(N*10)) NP <- N*10
if(NP>2000) NP=2000
#check to see whether we need to disable foreach for parallel optimization, esp if called from inside foreach
More information about the Returnanalytics-commits
mailing list