Backtesting Your Strategy
Before you risk real money on a trading strategy, you need to know if it actually works. Backtesting applies your strategy to historical data and shows you what the results would have been. It's the difference between a hypothesis and an evidence-based decision.
What Is Backtesting?
Backtesting means applying a defined trading strategy to historical price data and recording the results as if you had actually traded it. You define the rules โ entry conditions, stop loss, take profit, position size โ and then systematically check every point in history where those rules would have triggered.
The output tells you: how many trades would this have produced? What was the win rate? What was the max drawdown? Is this edge statistically significant, or did it get lucky in one period?
The 5 Key Backtest Metrics
Overfitting: The Silent Killer
Overfitting is when you optimize a strategy so precisely on historical data that it has no predictive power going forward. You can always find a combination of parameters that looks amazing in the past โ but that's just curve-fitting to noise.
Signs of overfitting:
- Extremely high performance on the backtest period, but it fails immediately on new data
- The strategy only works on very specific parameters โ change any variable slightly and it collapses
- Very few trades (< 30) โ small samples can look profitable by chance
- The rules are overly complex and specific โ "only enter if RSI is between 47.3 and 52.1..."
Walk-Forward Testing
The proper way to test a strategy: split your data into "in-sample" (for optimization) and "out-of-sample" (for validation). Develop and optimize on the in-sample data only. Then test the final strategy on the out-of-sample data you never touched.
If it performs well on out-of-sample data, you have more confidence that the edge is real. If it collapses, it was overfit. Walk-forward testing is the gold standard for strategy validation.
Key Takeaways
- Backtesting applies your strategy rules to historical data to see what would have happened
- Key metrics: Profit Factor (> 1.5), Max Drawdown (< 20%), Win Rate (in context of R/R), and trade count (> 50 for significance)
- Win rate alone means nothing โ a 70% win rate with bad R/R loses money
- Overfitting = looking great in the past, failing in the future. Caused by over-optimizing on a specific historical period.
- Walk-forward testing: optimize on in-sample data, validate on out-of-sample data never used during optimization
- More trades = more statistical confidence. 20 trades is a story. 200 trades is evidence.
Track Complete โ Test Your Knowledge
You've finished the Risk & Backtesting track. Take the final quiz.
Take the Quiz โ