Blog
/
Trading Statistics & Performance
Trading Statistics & Performance
What Is a Trading Backtest and How to Do One Properly
July 2026
7 min read
Performance
Scroll back through a chart, spot a few places where a setup "would have worked," and conclude the strategy has an edge — that's how most backtesting actually happens, and it's closer to confirmation than to testing. A real backtest is designed to challenge a belief, not confirm one, and the difference between the two comes down to a few specific disciplines most casual backtests skip.
Why Most Backtests Prove What the Trader Already Believed
Scrolling through historical price with the outcome already visible makes every setup look cleaner than it would have in real time. The trader's eye naturally lands on the examples that worked, and the ones that would have failed are easy to scroll past without consciously deciding to exclude them. The result isn't a test of the strategy — it's a curated highlight reel of the strategy's best moments.
The confirmation trap
A backtest done to prove a strategy works will almost always find a way to prove it, because the trader controls which examples get counted. A backtest that could actually disprove the strategy requires a rule for including every qualifying setup — not just the convincing ones.
The 3 Mistakes That Invalidate Most Backtests
Hindsight bias
Marking entries with the outcome already visible produces results far better than what would have been identified in real time, without knowledge of what comes next.
Cherry-picked examples
Scrolling until a clean-looking setup appears, rather than mechanically logging every instance that met the criteria, whether or not it worked.
Sample size too small to mean anything
A handful of examples can produce an impressive-looking win rate purely by chance — the sample needs to be large enough that the result reflects the strategy, not luck.
How to Do a Proper Backtest
- Define the setup criteria in writing before starting. Write the exact rules for entry, stop, and target before looking at any chart, so the criteria can't be adjusted mid-test to fit what's found.
- Move forward in time, not backward from known outcomes. Step through the chart bar by bar as if trading it live, deciding whether the setup qualifies without seeing what price does afterward.
- Log every qualifying instance, not just the clean ones. A messy or marginal setup that met the written criteria counts just as much as an obviously clean one — excluding it defeats the purpose.
- Reach at least 50-100 examples before drawing conclusions. Smaller samples are too easily explained by chance rather than a genuine edge.
An Example Backtest Summary
Setup criteria
Liquidity sweep + CHoCH + FVG entry
Win rate
47%
Average win / average loss
1.9R / 1.0R
Expectancy
+0.36R per trade
Instances excluded for not meeting criteria
14 (logged, not counted)
Notice the last row: instances that were reviewed but didn't meet the written criteria were logged and excluded, not silently skipped. That transparency is what separates a real backtest from a highlight reel — a strategy that only looks good when the inconvenient examples are quietly dropped isn't a strategy with an edge, it's a strategy with a good editor.
Turn Backtest Results Into Live Confidence
Logify lets you log backtested setups the same way you log live trades, so your historical expectancy and live expectancy are directly comparable.
Start Free with Logify
Frequently Asked Questions
What is a trading backtest?
A trading backtest is the process of applying a defined set of setup criteria to historical price data to see how a strategy would have performed, without the benefit of knowing what happens next. Done properly, it produces an expectancy estimate before real capital is risked.
What is hindsight bias in backtesting?
Hindsight bias happens when a trader scrolls through a chart already knowing how price moved, then marks entries that would have worked. This produces results that look far better than what a trader would have actually identified in real time, without knowledge of the outcome.
How many trades does a proper backtest need?
A reasonable backtest needs at least 50-100 qualifying setups to produce a statistically meaningful expectancy estimate. Testing on 10-15 examples, even if done rigorously, is too small a sample to distinguish a real edge from random variance.
Does a good backtest guarantee live results will match?
No — a backtest establishes whether a strategy has a plausible edge on paper, but live trading introduces execution factors (slippage, emotion, hesitation) a backtest can't capture. A backtest is a necessary first filter, not a guarantee of live performance.