How to Backtest a Trading Strategy
Use historical data to test a rule, include costs and keep a separate period for checking whether your findings carry over.
Get in touch
Run your first backtest
- Write the rule before looking at the result.
- Choose data and include the fees, spreads and fill assumptions you would expect.
- Record every qualifying trade, then set aside a second period for validation.
Track more than win rate
Look at average wins and losses, drawdown, the number of trades and results after costs. A profitable outcome from just a few similar trades can be fragile.
Avoid hindsight and overfitting
Only use information that would have been available at the time. Adjusting parameters until a strategy fits one historical sample can produce a weak result on fresh data.
Backtesting and paper trading
A backtest applies historical data. Paper trading observes the rule as new prices arrive while simulating execution. Comparing both can uncover assumptions that looked reasonable in the historical test.
Test and review
Paper trading
Practise under simulated live conditions.
Trading journal
Log your decisions.