[R-SIG-Finance] Quantstrat - Error while applying strategy

bhavna bhavnarpj at gmail.com
Sat May 5 06:49:44 CEST 2012


Hi,

I am facing similar issue and tried the workaround suggested by Soren, but
still does not seem to work.

My data is in below format with datetime as index since I am looking at 15
min bars:
> nseData[1,]
                                     Open   High     Low    Close
2011-07-26 09:15:00 5704 5708.8 5689.05  5693
> class(nseData)
[1] "xts" "zoo"

Attached is the custom indicator and strategy I am trying to run.
When I run the applyStrategy command
out<-try(applyStrategy(strategy=strat,portfolios=portfolio.st,mktdata=nseData))

R takes lot of time to run. Not sure what is wrong. Even though I am passing
an xts object to the T3 custom indicator I see errors like below when I do
not use the .function(i) method
(ncol(tmp_val) == 1) { : argument is of length zero

http://r.789695.n4.nabble.com/file/n4610537/TestStrat.txt TestStrat.txt 

Please advice.

Thanks,
Bhavna


--
View this message in context: http://r.789695.n4.nabble.com/Quantstrat-Error-while-applying-strategy-tp3472438p4610537.html
Sent from the Rmetrics mailing list archive at Nabble.com.



More information about the R-SIG-Finance mailing list