A backtest replays your rules on historical data and records every trade they would have taken. It's the cheapest way to kill a bad idea, and the easiest way to fool yourself with one that only looks good. Read a strong backtest as the best case your strategy could have had... never as the guaranteed future.
What is backtesting?
You fix the rules first, entry, exit, stop, size and costs, then run them over past prices and collect the trades they produce. From that list come the numbers you judge a system by: expectancy, win rate, maximum drawdown... You can do it by hand, chart by chart, or make software run it, and the same rule applies either way: each decision can only use information that existed at that moment.
What makes a backtest look better than it is?
Almost every mistake pushes the result in the same direction, up:
| Problem | What it does to the result | How to catch it |
|---|---|---|
| Look ahead bias | uses information you wouldn't have had yet | enter every trade one candle after its signal and run it again; a big drop means the test was seeing the future |
| Survivorship bias | only tests what survived | use the list of instruments that existed on your start date |
| Data snooping | tries so many versions that one wins by luck | count every version you tested |
| Overfitting | fits the rules to noise | test on data this strategy hasn't seen yet |
| Missing costs | assumes free, perfect fills | add real trading costs and slippage |
None of these shows up as an error. The curve just looks better than the strategy is.
How many trades do you need?
More than most backtests have. With 30 trades you're mostly looking at luck, and a few hundred is where the numbers start to settle. That's why the Edge Score lowers a backtest's score when the sample is small, doesn't matter how good the curve looks.
What can't a backtest tell you?
How the strategy trades with real money. It doesn't know your fees, your nerves or the market you're about to trade in. The next steps are the ones that test it on data it never saw: hold some back for out of sample, roll the test forward with walk forward, then trade it small with forward testing. Expect a gap when you do... live vs backtest covers how big is normal. You can see what a full backtest analysis looks like in the free demo.
Frequently asked questions
Related terms
- Expectancy — What one average trade is worth to you, after the wins and losses cancel out.
- Overfitting — When a strategy is tuned so tightly to the past that it only works on the past.
- Out of Sample — The data your strategy never saw while you built it, kept back to test if the edge is real.
- Walk Forward — Out of sample testing done over and over, rolling through your whole history instead of one split.
