Navigation: Backtest Engine Details >

Intraday Fills With Daily Bars

 

 

 

RealTest does not currently support intraday data. It is therefore currently not the best tool if you want to model, for example, a HFT strategy. It is, however, completely practical to develop short-term daily trading strategies and even some intraday strategies (with MOC exit) using daily bars only.

I have spent many years building and running short-term (average holding period 3 days) systems that were tested using daily bars, and have spent a lot of time comparing model to actual results and understanding the differences. The bottom line is that the slight loss of fidelity from not having intraday data in a backtest is dwarfed by the other sources of randomness in live trading.

The standard deviation between model and actual per-trade results is large, but the differences always seem to cancel out, resulting in similar overall results over a large enough sample of trades. My view, therefore, is that most kinds of entry and exit techniques can be modeled using daily bars without compromising the validity of the system (unless, of course, your strategy aims to enter and exit multiple times per day).

If you want to insist on complete fidelity between a model and actual trading, then the only choice available is to enter and exit all positions at the open.

Entries or exits "at the close" are, with today’s execution technologies, also completely practical. Orders can be submitted one minute before the close and be filled within seconds, unless you are trading very thin stocks and/or huge size.

Intraday entries and exits (stop or limit orders) can be accurately simulated on daily bars provided that the backtest engine is smart about the following:

1.If the open gaps beyond the price trigger, model the fill at the open (plus slippage), not the trigger price.

2.If the strategy includes both limit or stop entries and limit or stop exits, and the daily bar implies that more than one of the price triggers was hit (within that bar’s range), then the model must handle each of the following potential scenarios correctly:

a.Limit order entry and stop order exit (loss):  it can be assumed that the entry preceded the exit, and both can be filled.

b.Limit order entry and limit order exit (target): it can NOT be assumed that the entry preceded the exit, so the target is not hit in the model (unless Ambiguity: Target is specified).

c.Stop order entry and limit order exit (target): it CAN be assumed that the entry preceded the exit, so the target is therefore filled.

d.Stop order entry and stop order exit (loss): it can NOT be assumed that the entry preceded the exit, so the stop is therefore not hit in the model (unless Ambiguity: Stop is specified).

3.The exception to all cases of (2) is if the stock gaps beyond the entry trigger (1), in which case the entry was at the open so the exit trigger is non-ambiguous.

The above is how RealTest models all the intraday order types using daily bars. Again, in most cases, none of the above should cause much trouble in strategy development.

Two exceptions (things to therefore avoid unless you have intraday data) would be:

1.A long intraday breakout strategy with a tight stop.

2.A long intraday mean-reversion strategy with a small target.

In each of these examples, RealTest will never model exits on the same day as entry. In effect, the stop in (1) or limit in (2) becomes active as of the day after entry (unless Amgibuity: Stop (1) or Ambiguity: Target (2) is specified.)

 

 

 

Copyright © 2020-2021 Systematic Solutions, LLC