The lesson in full
Before risking real money on a rule like “buy when price closes above its 50-day average”, you can test it on the past. That's backtesting.
A backtest shows how often the rule won, the average win and loss, the worst losing streak and the deepest drawdown.
The trap is overfitting: tweaking settings until the rule fits the past perfectly. It has learned the noise, not a real pattern, and fails on new data.
Test properly: build the rule on one period, then check it on data it has never seen, in different markets and conditions.
Always include costs: spreads, commissions, slippage. A rule earning 0.1% per trade before costs loses money if each trade costs 0.15%.
- Common mistake
Mistake: “it worked for 10 years, so it'll work next year.” Markets change. A backtest is evidence, not a guarantee.
- Key takeaway
Test on the past, check on unseen data, include every cost, and keep rules simple.
Quick check
- Backtesting is... Testing a rule on past pricesYou see how a rule would have done before risking real money.
- Overfitting means... A rule fits the past but fails on new dataTuned too closely to old data, the rule learned noise rather than a real pattern.
- To trust a backtest more, test it on... Different markets and periodsA real edge should hold up on data the rule wasn't built on.
- A rule earns 0.1% per trade before costs, and each trade costs 0.15%. After costs it... Loses money0.1% − 0.15% = −0.05% per trade. Costs turned a winner into a loser.
Words in this lesson
Risk Management
- Your safety exit: stop loss
- How much to risk
- Risk and reward
- Win rate isn't everything
- The maths of losses
- Staying in the game
- Backtesting and overfitting