Skip to content
FactorQX
Researchbacktestingresearch

How to Read a Backtest Without Fooling Yourself

A skeptical, engineering-minded guide to interpreting backtests: overfitting, out-of-sample testing, costs, lookahead bias, survivorship, and reading equity curves.

FactorQX 4 min read

FactorQX teaches research methodology and engineering. This piece is about how to interpret backtests honestly. It is not investment advice, not a strategy, and not a signal. Nothing here suggests what to trade or claims any return.

A backtest is a simulation, and like every simulation it answers exactly the question you encoded — not the question you meant to ask. The dangerous thing about a clean equity curve is that it feels like evidence. Most of the work in research isn't producing a good number; it's figuring out which good numbers are lying to you. This is a checklist of the ways a backtest fools its author, written from the perspective of someone trying not to be fooled.

A single great number means almost nothing

The most common mistake is reporting one statistic — a return, a Sharpe, a win rate — as if it summarized the experiment. It doesn't. A high number can come from a genuinely robust process or from a thousand silent fits to noise. You cannot tell which from the number alone. The number is a starting point for interrogation, not a conclusion.

The first question to ask isn't "how good is it?" but "how many things did I try before I saw this?" Every parameter you swept, every date range you nudged, every filter you added and kept because it helped — each is a degree of freedom spent fitting the past. Track that count. A result that survived one honest test is worth more than one that survived a hundred tweaks.

Overfitting and the multiple-comparisons trap

Overfitting is what happens when your model memorizes the specific noise of your sample instead of any reusable structure. It is seductive because it is invisible in-sample: the curve looks better the more you overfit. The tell is degradation — performance that collapses the moment you change the period, the universe, or the parameters slightly.

Guard against it structurally, not by willpower. Reserve data you do not look at. Prefer fewer parameters. Be suspicious of any rule whose threshold is suspiciously precise. And remember that testing many variants quietly inflates your best result the same way running many lottery tickets inflates your odds of one winner.

In-sample versus out-of-sample

Split your history. Develop on one slice, then evaluate — once — on a slice you held back and never touched during development. The discipline only works if "never touched" is literally true; the moment you peek at the holdout and adjust, it becomes in-sample and stops being a test of anything.

|<-------- in-sample (develop) -------->|<-- out-of-sample (judge once) -->|
2015                                  2022                              2026

A result that holds in-sample but falls apart out-of-sample isn't a bug to be patched. It's the experiment telling you the in-sample edge was noise. Listen to it.

Costs, frictions, and the gap to reality

Many backtests are profitable only because they are free. Real execution incurs commissions, spread, slippage, financing, and the simple fact that your own activity moves prices. A strategy that trades frequently is especially exposed: small per-trade frictions compound into the dominant term. Before celebrating, subtract a pessimistic estimate of every cost and see what survives. If the edge evaporates under realistic friction, it was never an edge.

Lookahead bias and survivorship

Two subtle bugs corrupt more backtests than any modeling error.

Lookahead bias is using information that wasn't available at decision time — a closing price to make an intraday decision, a revised data point in place of the original print, a feature computed over the whole series instead of only the past. It is almost always an accident of how data is aligned, and it produces gorgeous, fictional results. We cover the mechanics and fixes in Avoiding Lookahead Bias in Backtests.

Survivorship bias is testing only on instruments that still exist today. If your universe silently excludes everything that was delisted, merged, or went to zero, you have built a sample of winners and then congratulated yourself for picking winners. Use a universe that includes the dead.

Read the equity curve and the drawdown together

An equity curve alone is a mood, not a measurement. Pair it with the drawdown it implies. Two curves can end at the same place while one was smooth and the other spent two years underwater — the path matters because no real process tolerates an arbitrarily deep or long drawdown without consequences. Measure the worst peak-to-trough decline and how long recovery took. You can compute both with the Max Drawdown Calculator.

Then look past averages to the shape of outcomes. Per-event expectancy — the average result weighted across wins and losses — tells you whether a strategy's edge comes from many small consistent results or a few outliers you may never see again. The Expectancy Calculator makes that decomposition explicit.

The honest posture

Treat your own backtest as a hostile witness. Assume it is hiding something and your job is to find it before reality does. Pre-register what "success" means before you run it. Test once on data you protected. Report distributions, not single numbers. Subtract costs you don't want to subtract. The goal of a backtest isn't to confirm an idea — it's to give the idea its best chance to fail cheaply, on a computer, instead of expensively, later.

Educational content. This post covers software development and research methods only. It is not investment advice, a trading signal, or a recommendation. See our disclaimer.