[Blotter-commits] r285 - pkg/quantstrat/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Mar 15 22:04:09 CET 2010
Author: braverock
Date: 2010-03-15 22:04:09 +0100 (Mon, 15 Mar 2010)
New Revision: 285
Modified:
pkg/quantstrat/R/strategy.R
Log:
- always get(symbol) for mktdata, otherwise the loop isn't working
Modified: pkg/quantstrat/R/strategy.R
===================================================================
--- pkg/quantstrat/R/strategy.R 2010-03-15 20:52:14 UTC (rev 284)
+++ pkg/quantstrat/R/strategy.R 2010-03-15 21:04:09 UTC (rev 285)
@@ -88,7 +88,10 @@
sret<-list()
for (symbol in symbols){
ret[[portfolio]][[symbol]]<-list()
- if(!hasArg(mktdata)) mktdata <- get(symbol)
+ #if(!hasArg(mktdata)) mktdata <- get(symbol)
+ #TODO FIXME allow passing of mktdata again?
+ mktdata <- get(symbol)
+ #print(head(mktdata))
#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