How to Backtest a Trading Strategy
Backtesting means applying your rules to past data to see how they would have performed. It does not predict the future, but it removes ideas that never worked.
Steps
- Write exact rules: entry, stop, target and the times you trade. If a rule needs a feeling, it cannot be tested.
- Use enough data: at least 100 trades across different market conditions.
- Include costs: spread, commission and slippage.
- Record every trade in a sheet or journal with the result in R.
- Check the numbers: win rate, average win and loss, maximum drawdown and the longest losing streak.
Avoid curve fitting
If you change settings until the past looks perfect, the strategy will probably fail on new data. Test on one period, then confirm on a period you did not use while building it.
Then forward test
Trade the rules on a demo account or with very small size for a few weeks. Replay tools let you practise candle by candle. Read about drawdown before you scale up.
Trading leverage products carries a high level of risk and may not suit everyone. This guide is for education and is not financial advice.
