- A backtest replays a betting rule on past games to see how it would have done.
- In-sample data is what you used to build or tune the rule. Out-of-sample data is data the rule has never seen.
- Overfitting is when a rule memorizes the noise of the past. It looks great in-sample and falls apart on new games.
- Walk-forward testing repeats "build on the past, test on the next stretch" again and again, and only counts the test stretches.
- Only out-of-sample results tell you much. Even those can fool you if you peek or test too many ideas.
What a backtest is
A betting "system" is a rule. For example: "bet the home underdog when it is coming off two losses." A backtest asks: if I had followed this rule over the last few seasons, at the odds that were really on offer, what would have happened?
That is a useful question. The trouble is that it is very easy to answer it in a way that flatters the rule.
How overfitting fools you
Overfitting means the rule fits the past too well. It has learned the random bumps in old results, not something that will repeat.
It happens most when you try many versions of an idea and keep the best one. Every extra filter ("only on Sundays", "only after a road trip") gives luck another chance to look like skill.
Researchers in finance call this backtest overfitting. A well-known paper by Bailey, Borwein, López de Prado and Zhu shows that a strong-looking backtest is easy to reach after trying only a modest number of versions, and that the more versions you try, the more likely the winner is overfit. They also point out that people rarely report how many versions they tried.
In-sample vs out-of-sample
The fix starts with a simple split:
- Pick your data, for example six seasons.
- Set aside the most recent part, for example the last season. Don't look at it.
- Build and tune the rule only on the older seasons. This is in-sample.
- Run the finished rule once on the locked season. This is out-of-sample.
- Judge the rule on that out-of-sample result, with its sample size next to it.
The key word is "once". If you look at the out-of-sample result, tweak the rule and test again, that data has become in-sample. Many tests that call themselves out-of-sample quietly break this rule.
Walk-forward testing, step by step
One holdout season is a small sample. Walk-forward testing gets more out-of-sample results from the same data by rolling the split forward.
Each test stretch is data the rule had not seen when it was built. This is close to what really happens when you use a rule live: you build it on the past and then face games that haven't happened yet. Walk-forward results also show whether the rule holds up from season to season or only worked in one stretch.
Why so many systems fail when real money is on the line
- Too many tries. The rule was the luckiest of many, as in the example above.
- Lookahead bias. The test used something you couldn't have known at bet time, such as the closing line, final injury news or a stat that was updated after the game.
- Wrong odds. The test assumed odds you couldn't really get, or skipped the vig or exchange fees.
- Limits and liquidity. The test assumed you could bet any size. In real life, limits or a thin order book may stop you.
- Small samples. A rule that fired 40 times proves very little. See the luck-or-skill guide.
- Markets change. Rules, schedules and the way books set lines change over time. An edge that existed years ago may be gone.
- Survivorship. You only hear about the systems that looked good. The ones that failed are never posted.
A checklist before you trust any backtest
- Is the result out-of-sample, and was the holdout used only once?
- Does it say how many versions of the rule were tried?
- Is the sample size shown next to every number?
- Were the odds ones you could really have bet, with vig or fees included?
- Was every input known before the game? No closing lines or after-the-fact stats.
- Does it hold up in each season or stretch, not just in total?
- Are losing stretches shown, not just the final total?
- Is the rule simple enough to explain in one or two sentences?
- Does it make sense for a reason, or did the data just "find" it?
- Would you still trust it if the result were a little worse?
Test a strategy before you bet on it.Fadeproof is in development. Join the waitlist to hear when founding groups open. No card needed to join.
Join the waitlistFAQ
What is out-of-sample testing?
It means testing a betting or trading rule on data that was not used to build or tune it. It is the closest a backtest gets to how the rule would do on games that haven't happened yet.
What is the difference between a backtest and a walk-forward test?
A backtest replays a rule on past data. A walk-forward test is a backtest done in rolling steps: build on one stretch, test on the next unseen stretch, move forward and repeat, then judge only the combined test stretches.
What is overfitting in sports betting?
Overfitting is when a rule matches the random noise of past results instead of something that repeats. It often comes from trying many filters and keeping the best-looking version.
How much data should I hold out?
There is no fixed rule. A common choice is the most recent season or roughly the last fifth to a third of your data. What matters most is that you test on it once and never tune on it.
Can a strategy pass an out-of-sample test and still fail?
Yes. The holdout may be small, it may have been peeked at, or the market may have changed. Out-of-sample testing lowers the risk of fooling yourself. It does not remove it.
Sources
Checked 2026-11-25. Wording is paraphrased. Links open the original source.
- Bailey, Borwein, López de Prado and Zhu (2014), Pseudo-Mathematics and Financial Charlatanism, Notices of the AMS. Shows that strong backtests are easy to reach after testing a modest number of versions, and that the number of versions tried is rarely reported.
- Walk forward optimization (Wikipedia). Describes rolling in-sample and out-of-sample windows and judging the combined out-of-sample results.
- Harbourfront Quant: the limits of out-of-sample testing. Covers data reuse, data-snooping, lookahead bias and changing markets as limits of out-of-sample tests.