quintana roo, méxico
Posts: 84 since Mar 2013
Thanks Given: 222
Thanks Received: 40
|
regards to everyone,
i want to use range bars to evaluate some strategies on nt. however, there is one significant issue i want to find a way to work around; range bars do not allow for gaps. when a session in one instrument is over and then price has been traded to where it opens the next session at a significant distance from the previous close, range bars will just fill that blank space with fake or synthetic bars. even worse, backtesting and optimization engines will then treat these fake bars in historical data the same as real data from actual trades and platforms will just insert fantasy trades throughout those fake bars. this will lead to inaccurate and erroneous backtests and optimizations.
there are some possibilities to avoid those fantasy trades, one would be to create a custom bar type where bars were calculated by range and also allowed for gaps. this happens to be way beyond my capabilities as i'm not a programmer. another possibility is to restrict my strategies to only place trades during regular session hours, which would guarantee that all synthetic bars would be left untouched and all trades would correspond with actually observed market data.
in other (shitt*er) platforms, all fake bars are inserted in the first second of trading of the next session, for example, for stocks, as many bars as necessary will be fabricated to cover a gap and all will be given 9:00:01 timestamps. the same process is applied to other instruments like futures. therefore, one can restrict a strategy trading stocks to only open or close positions after 9:01:00 and before 15:59:00 and this will be enough to avoid synthetic bars completely.
i have been taking a look but in the case of ninjatrader it is not so easy to determine if this is the case indeed. ¿do range bars work similarly regarding gaps in nt? ¿if one created similar time filters for nt strategies would that be enough to avoid synthetic bars entirely and ensure more accurate and credible backtests? ¿does anyone know of any other workarounds to avoid fake bars?
very well, thanks, regards.
|