[Blotter-commits] r846 - in pkg/quantstrat: . R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Nov 11 18:22:14 CET 2011


Author: gsee
Date: 2011-11-11 18:22:13 +0100 (Fri, 11 Nov 2011)
New Revision: 846

Modified:
   pkg/quantstrat/DESCRIPTION
   pkg/quantstrat/R/strategy.R
Log:
mktdata arg was being overwritten

Modified: pkg/quantstrat/DESCRIPTION
===================================================================
--- pkg/quantstrat/DESCRIPTION	2011-11-11 15:10:12 UTC (rev 845)
+++ pkg/quantstrat/DESCRIPTION	2011-11-11 17:22:13 UTC (rev 846)
@@ -1,7 +1,7 @@
 Package: quantstrat
 Type: Package
 Title: Quantitative Strategy Model Framework
-Version: 0.5.7
+Version: 0.5.8
 Date: $Date$
 Author: Peter Carl, Dirk Eddelbuettel, Brian G. Peterson,
     Jeffrey A. Ryan, Joshua Ulrich, Garrett See, Yu Chen

Modified: pkg/quantstrat/R/strategy.R
===================================================================
--- pkg/quantstrat/R/strategy.R	2011-11-11 15:10:12 UTC (rev 845)
+++ pkg/quantstrat/R/strategy.R	2011-11-11 17:22:13 UTC (rev 846)
@@ -93,7 +93,7 @@
         symbols<-names(pobj$symbols)
         sret<-list()
         for (symbol in symbols){
-            mktdata <- get(symbol)
+            if (is.null(mktdata)) mktdata <- get(symbol)
 
             #loop over indicators
             sret$indicators <- applyIndicators(strategy=strategy , mktdata=mktdata , parameters=parameters, ... )



More information about the Blotter-commits mailing list