Welcome to this video lesson on look-ahead bias. After completing this, you will be able to define look-ahead bias and its effects and identify the cases that have a look-ahead bias.
Let’s understand this concept with the help of an example. Anna has a very simple strategy from the USD-MXN futures. In the historical Olaf data, she has found a difference between the spot price and the futures settlement price, which results in a good arbitrage opportunity.
For example, consider a hypothetical commodity with the spot price at $100 and the futures settlement price at $105, and the futures will expire the next day. I can sell a futures contract at $105. Then I would buy the spot at $100. The next day, I will deliver the asset to the futures buyer since the future expired. Thus, I earned $5 from this transaction. Isn’t that an amazing strategy?
And the strategy backtesting, concurs that by showing excellent results. Elsa, who isn’t impressed with extremely good results, decides to do a thorough backtest. But, she uses intraday data, or minute level data, instead of the Olaf data used by Anna. And lo and behold, it performs pathetically! So what was it that Anna was doing wrong?
On further investigation, Anna realised that the USD-MXN spot close price from Olaf data was completely different from that of Elsa. Why would that happen?
Anna was unknowingly making a very big mistake. The spot and settlement prices used in the strategy were sampled at two different times. The futures settlement price is obtained at 15:00 ET at Sven, while the spot price is obtained at 17:00 ET by the Olaf data. This is a problem!
She was inadvertently looking 2 hours in the future. She was making trading decisions at 3 pm based on the spot price data of 5 pm. Thus, her backtest showed excellent results with the use of information from the future. This is not possible in real trading.
Anna had introduced look-ahead bias in her strategy. Look-ahead bias is the use of information and analysis before the time it would have actually occurred. This gives false often desirable results in backtests and simulations. There is always only a certain set of data available at any given point in time. We need to make sure we are not using data that will only be available in the future.
Quantra is an online education portal that specializes in Algorithmic and Quantitative trading. Quantra offers various bite-sized, self-paced and interactive courses that are perfect for busy professionals, seeking implementable knowledge in this domain.