Day 3. Instantaneous trading.
This is where you assume you can observe a price and then trade at that price. This is obviously false (apart from anything else it takes some time for you to observe a price and act on it, and the price might move in that time) but ...
... often people convince themselves that it's a very benign form of look-ahead, and probably won't materially affect the backtest results.
That *might* be true, it depends on the strategy. But most often it's not.
If you are trading very frequently, the chance that the price moves while your order is being sent to the market is higher (future price moves will most likely be correlated with the direction of your orders so the price moves away from you more often than not)
If you are trading only infrequently then it likely takes some time to work your order in the market. The price you get will be closer to the VWAP over the period you execute the order than to the price you observed before you sent the order.
The very worst form of this bias is when you observe a closing price and assume you can trade at that price. It's so bad because (a) the closing price is often quite distorted - a lot of flow happens just before the close and it can move the close away from fair value, and ...
(b) by definition you can't trade after the close, because the market is closed! The next opportunity you get to trade will be the open of the next session, when the price could be *very* different.
This particularly affects mean reversion strategies, which look great if you assume you can observe the close and then trade there - I won't explain why but you should be able to figure it out.
To mitigate, you need to make sure your signal is formed *before* the price you intend to trade at is observed. That might mean forming the signal 30 minutes before the close if you intend to trade in the closing auction.
Or if using binned data, you can form your signal at the end of each bin and then assume execution at the VWAP (or closing price) for the next bin. For high frequency strategies it means correctly modelling the latency of your orders being sent to market.
More tomorrow!
Continued …
Share this Scrolly Tale with your friends.
A Scrolly Tale is a new way to read Twitter threads with a more visually immersive experience.
Discover more beautiful Scrolly Tales like this.
