1. What is a Backtest
A backtest is running a strategy on past price data to see how it would have performed. The goal: know whether a strategy has an "edge" before risking real money.
2. Why it matters
- It replaces "this strategy is surely good" (a feeling) with "this strategy is / isn't positive-expectancy on the data" (evidence).
- A backtest gives you the numbers you need for risk management: win rate, RR, max drawdown, longest losing streak.
3. Steps / related ideas
- Define clear rules (entry/exit/risk) — vague rules can't be backtested.
- In-sample / out-of-sample: test on part of the data, then validate on unused data, to avoid "memorizing" the past.
- Forward test / demo: after backtesting, run in real time (no or small money) before going live.
- Output metrics: win rate, expectancy, profit factor, max drawdown (see Performance).
4. How to apply
1. Turn strategy rules into concrete conditions. 2. Run over a long enough span with enough trades to be statistically meaningful. 3. Read both profit and drawdown — not just profit. 4. Validate out-of-sample, then forward test.
5. Worked example
You believe "buy on a break of the 20-day high" is good. A 5-year backtest shows: win rate 38%, average RR 1:2.5, max drawdown 28%. → The strategy has an edge (positive expectancy) but you must be ready for a ~28% drawdown and long losing streaks. Without a backtest, you'd quit at the first drawdown thinking the strategy is broken.
6. Common mistakes
- Overfitting: tuning parameters to fit the past perfectly → fails in the future.
- Too small a sample: a few dozen trades aren't conclusive.
- Ignoring costs (fees, slippage) making results falsely pretty.
- Only looking at profit, ignoring drawdown and streaks.
- No forward test before going live.
7. FAQ
- Does a good backtest guarantee the future? No — the past doesn't repeat exactly. But it rules out hopeless strategies and gives you reasonable expectations.
- How many trades to trust it? The more the better; a few dozen is too few — aim for hundreds if possible.
8. Tools
- Backtesting software/platforms; a results stats sheet.
9. Checklist
- ☐ Are the strategy rules clear and concrete?
- ☐ Is the sample large and long enough?
- ☐ Did I read drawdown and streaks, not just profit?
- ☐ Did I validate out-of-sample / forward test?
