[Returnanalytics-commits] r2965 - pkg/PortfolioAnalytics/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun Sep 1 03:10:11 CEST 2013


Author: rossbennett34
Date: 2013-09-01 03:10:05 +0200 (Sun, 01 Sep 2013)
New Revision: 2965

Modified:
   pkg/PortfolioAnalytics/R/optimize.portfolio.R
Log:
Adding iterators to the package check in optimize.portfolio.rebalancing

Modified: pkg/PortfolioAnalytics/R/optimize.portfolio.R
===================================================================
--- pkg/PortfolioAnalytics/R/optimize.portfolio.R	2013-09-01 00:04:02 UTC (rev 2964)
+++ pkg/PortfolioAnalytics/R/optimize.portfolio.R	2013-09-01 01:10:05 UTC (rev 2965)
@@ -1109,6 +1109,7 @@
 optimize.portfolio.rebalancing <- function(R, portfolio=NULL, constraints=NULL, objectives=NULL, optimize_method=c("DEoptim","random","ROI"), search_size=20000, trace=FALSE, ..., rp=NULL, rebalance_on=NULL, training_period=NULL, trailing_periods=NULL)
 {
   stopifnot("package:foreach" %in% search() || require("foreach",quietly=TRUE))
+  stopifnot("package:iterators" %in% search() || require("iterators",quietly=TRUE))
   start_t<-Sys.time()
   
   if (!is.null(portfolio) & !is.portfolio(portfolio)){



More information about the Returnanalytics-commits mailing list