[R-SIG-Finance] Quantstrat - applystrategy on subset of mktdata

Mayank Singhal msinghal_22 at yahoo.com
Thu Dec 15 07:31:29 CET 2016


Hello all,
I am interested in backtesting the strategy on subset of mktdata  but somehow the below approach is resulting into errors.
################# yy="2016"out<-applyStrategy(strat.st , portfolios=portfolio.st, mktdata = mktdata[yy])
##################
I understand i can do it in 2 steps where in first step i calculate indicators/signals on the full time series and in second step only supply the subset of mktdata to portfolio for backtest.  But i was wondering if there is a way to do this in single step itself ? I think the problem is that the full mktdata is added to portfolio.st and not the subset of it ?
Any pointers will be helpful,
Regards,Mayank

	[[alternative HTML version deleted]]



More information about the R-SIG-Finance mailing list