Algorithmic / Systematic Trading · Guide · 4 min read
Backtesting basics and common mistakes
How to test a rule on past data, and the traps to avoid.
Backtesting means applying a set of trading rules to historical data to see how they would have performed.
What to look at
- Number of trades: a handful of trades says very little.
- Drawdown: the largest fall from a peak. Ask whether you could stay with the plan through it.
- Costs: include brokerage, taxes and slippage.
Common mistakes
- Overfitting: tuning rules until they fit past data perfectly. Such rules often fail on new data.
- Look-ahead bias: using information that was not available at the time of the trade.
- Ignoring change: past results do not guarantee future results.
A sensible habit
Test on one period, then check on data the rules have not seen, and start with small size.
This guide is educational and is not investment advice.
Want to go deeper?
Our courses are for education only. They are not investment advice or a recommendation to buy or sell any security. Trading involves risk of loss, and nothing taught guarantees profits or returns.