[Blotter-commits] r1514 - pkg/quantstrat/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Oct 1 21:58:39 CEST 2013


Author: erastus
Date: 2013-10-01 21:58:39 +0200 (Tue, 01 Oct 2013)
New Revision: 1514

Modified:
   pkg/quantstrat/R/parameters.R
Log:
- fixed parameters.R portfolio environment subsetting issue

Modified: pkg/quantstrat/R/parameters.R
===================================================================
--- pkg/quantstrat/R/parameters.R	2013-09-30 23:25:12 UTC (rev 1513)
+++ pkg/quantstrat/R/parameters.R	2013-10-01 19:58:39 UTC (rev 1514)
@@ -399,7 +399,11 @@
     
     initialPortf<-getPortfolio(portfolios)
     symbols<-ls(initialPortf$symbols)
-    initDate<-time(first(initialPortf$symbols[[1]]$posPL))
+
+    # TODO: we likely want to search for first date, not (arbitrarily?)
+    # choose the first symbol
+    firstsymbol<-first(symbols)
+    initDate<-time(first(initialPortf$symbols[[firstsymbol]]$posPL))
     
     limits<-list()
     for(symbol in ls(initialPortf$symbols))



More information about the Blotter-commits mailing list