[Blotter-commits] r283 - pkg/quantstrat/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sun Mar 14 18:53:29 CET 2010
Author: braverock
Date: 2010-03-14 18:53:29 +0100 (Sun, 14 Mar 2010)
New Revision: 283
Modified:
pkg/quantstrat/R/strategy.R
Log:
- get mktdata for each symbol if mktdata not passed in manually
Modified: pkg/quantstrat/R/strategy.R
===================================================================
--- pkg/quantstrat/R/strategy.R 2010-03-14 17:09:15 UTC (rev 282)
+++ pkg/quantstrat/R/strategy.R 2010-03-14 17:53:29 UTC (rev 283)
@@ -88,7 +88,7 @@
sret<-list()
for (symbol in symbols){
ret[[portfolio]][[symbol]]<-list()
- if(is.null(mktdata)) mktdata <- get(symbol)
+ if(!hasArg(mktdata)) mktdata <- get(symbol)
#loop over indicators
sret$indicators <- applyIndicators(strategy=strategy , mktdata=mktdata , ... )
#this should be taken care of by the mktdata<<-mktdata line in the apply* fn
More information about the Blotter-commits
mailing list