Hindsight bias

In this article I am going to tell you about an interesting mind trap that a lot of traders fall into when they are developing trading strategies. It is called hindsight bias which basically means that you see past events as being more obvious or inevitable than they were before they took place, often summarized by the phrase “I knew it all along.” Kind of like saying now that you knew Bitcoin was going to skyrocket back in 2009.

Often, traders pick indicators for their trading algorithms by simply looking at past price moves or patterns on a completed historical chart. They scroll back and select indicators that seem to ‘predict’ these moves or patterns. Then, after backtesting and optimizing their trading model, they frequently find that such patterns don’t actually provide any statistical advantage. And the problem actually lie in the way they chose their indicators, rather than in the patterns themselves.

Let me illustrate this with an example. Consider this pattern – the price drops following a significant rise:

Suppose I want my algorithm to identify similar mean-reversion patterns. I locate corresponding price movements on my chart and select a few indicators that provide a ‘prediction’—that is, they signal when to enter a position just before the anticipated price movement. Looking at the chart, it seems pretty obvious that the price will drop after reaching its peak, doesn’t it?

Now, let’s examine a similar pattern, but this time in backtesting mode:

Here, the same indicators are showing the same signals, so I decide to enter a short position. However, with this incomplete picture, it’s not as obvious that the price will move in the expected direction. And this is what happened in this specific instance:

Most likely, if I rigorously follow the backtesting and optimizing process, I’ll end up discarding this set of indicators and find myself back at square one – selecting new indicators for detecting my pattern.

So, how can you get better at choosing indicators without spending too much time proving them ineffective? The method that helps eliminate hindsight bias involves selecting indicators based on incomplete charts – that is, before the price fully forms (or fails to form) the expected pattern. The most effective approach is to use visual simulation, where you can ‘replay’ historical data on a chart. You’ll be amazed at how your perspective shifts when you view an incomplete chart, losing that sense of obviousness:

And I have a tool that will assist you in becoming more proficient at selecting the right indicators. In this article, I introduce the DT-Box—an open-source tool I developed that makes possible backtesting of manual and grey-box strategies. It allows for the on-the-fly selection of indicators using MT5 and its visual backtesting mode.

Additionally, if you have questions or ideas related to this article feel free to contact me at pavel@pavelchigirev.com. I’ll be glad to know what you think.