Here’s a question from list member Marek R. on how to do backtesting on small timeframes.
Marek R.:
How do you approach backtesting on 1-minute data when there are trades with a trade duration less than 1 minute?
When I design the strategy, I try to intuitively engineer the strategy that I would avoid trades executed within a 1-minute candle, but when I was doing trade review today, I noticed that yesterday I had 11 trades and 5 were within a 1-minute duration, which turned the winning ratio to:
- Backtest: 7 winners from 11 trades
- Paper trading: 2 winners from 11 trades (both with duration more than 1 minute)
Dave:
This is a common scenario in backtesting.
You should always look closely at the duration of the trades in your backtest to determine if the precision of your data is causing skew.
If you’re backtesting on 1-minute bars, and you have durations of one minute, then you can bet your backtest is too optimistic.
The first instinct of many traders is to try to find data with finer precision, but that’s last on the list of ways to handle this situation.
Why? Because even if you get 1 second bars and backtest on them, you’ll still run into this issue.
In fact, even if you use tick data, you’ll still run into issues with what the bid and ask were historically.
Even if you solve that, you’ll still encounter issues with the depth of the order book (level two data).
All of a sudden, your data requirements have exploded, and the resources required to store and process a backtest would be prohibitive for almost anyone reading this.
However, the good news is that you don’t need that level of precision to backtest a strategy like this.
The first thing to do is run your backtest without stops or targets – only your time stop.
This removes any precision problems in your backtest around the entry bar.
(You shouldn’t trade without stops, but this exercise is useful for having a deeper understanding of how your backtester works – and your strategy.)
In most strategies, removing a stop should make your backtest look better.
If it makes it worse, then I would review charts of the trades with and without the stop to fully understand what’s going on.
I love Marek’s approach here – he learned a valuable lesson by paper trading and therefore didn’t put any money at risk to learn it.
Well done!
-Dave