If you've spent any time around trading, you've heard the word "backtesting." It sounds technical, but the idea is simple: testing a trading strategy on past market data to see if it would have made money — before you risk real cash.
This guide explains what backtesting is, why every serious trader does it, the two main types, and exactly how to backtest a strategy as a beginner.
The simple definition
Backtesting is replaying history. You take a set of rules — "buy when X happens, sell when Y happens" — and you apply them to historical price data to measure the outcome. If the strategy would have lost money over the last two years of data, it will probably lose money live too. Better to find that out for free.
Think of it like a flight simulator for traders. A pilot doesn't learn in a real plane full of passengers. A trader shouldn't learn with a real account full of savings.
Why backtesting matters
- It tells you if your edge is real. Most strategies that "look good" on a chart fall apart when tested objectively.
- It builds confidence. When you've seen a setup work 200 times in testing, you can pull the trigger live without hesitation.
- It builds discipline. Following rules in a backtest trains you to follow them with real money.
- It saves money. Every losing strategy you discard in testing is a losing strategy you didn't fund with a real account.
The market doesn't pay you for good ideas. It pays you for ideas that have an edge — and the only way to know if an idea has an edge is to test it.
The two types of backtesting
1. Manual backtesting
You replay the chart bar by bar and take trades by hand, exactly as you would live. Slower, but it trains your eye, your discipline and your decision-making. Best for discretionary and price-action strategies.
2. Automated backtesting
You code the rules and a computer runs them across years of data in seconds. Fast and statistical, but it only works for fully mechanical strategies and can hide real-world frictions. Best for systematic strategies.
For most beginners, manual backtesting is the better starting point — it teaches you how the market actually moves, not just a number at the end.
How to backtest a strategy (step by step)
- Write down the rules. Be specific: exact entry condition, stop loss, take profit, position size. If you can't write it down, you can't test it.
- Pick one instrument and one timeframe. Don't test everything at once. Master EURUSD 15m before adding pairs.
- Replay bar by bar. This is critical — you must not see the future. Reveal one candle at a time and decide as if it were live.
- Take every valid trade. No cherry-picking. Skipping the losers inflates your results and lies to you.
- Log each trade. Entry, stop, target, result, and ideally a screenshot. A journal turns testing into learning.
- Review after 50–100 trades. Calculate win rate, average risk:reward and expectancy. That's your edge — or your evidence to move on.
The mistakes that fool beginners
- Hindsight bias. Scrolling a finished chart, you only "see" the setups that worked. Always replay bar by bar.
- Cherry-picking. Taking only the good-looking trades makes any strategy look profitable.
- Too small a sample. Ten trades prove nothing. You need 50+ to trust the numbers.
- Ignoring costs. Spread, swap and commissions turn many "profitable" strategies into losers. Include them.
- Curve-fitting. Tweaking rules until past data looks perfect creates a strategy that only works on the past.
What good backtest results look like
After a proper test you should know:
- Win rate: percentage of winning trades
- Average risk:reward: how much you make per unit risked
- Expectancy: average profit per trade (the number that actually matters)
- Max drawdown: the worst peak-to-trough loss you'd have endured
A strategy can have a 40% win rate and still be highly profitable if the risk:reward is high enough. Win rate alone tells you almost nothing — expectancy is king.
In summary
- Backtesting = testing a strategy on past data before risking real money
- It proves your edge, builds discipline and saves capital
- Manual (bar-by-bar) is best for beginners; automated for systematic strategies
- Always test on 50+ trades, include costs, and never cherry-pick
- Judge by expectancy and drawdown, not win rate alone
Every professional trader backtests. It's not the glamorous part of trading, but it's the part that separates traders with a real edge from gamblers hoping for the best. Start testing before you start risking.