Learn / Backtesting Academy / Out-of-Sample Testing
Methodology

Out-of-Sample Testing

Quick Answer

Out-of-sample testing measures a strategy on data that played no part in designing it. If the results survive on history the strategy never saw, the edge has a chance of being real; if they collapse, the original backtest was describing a period rather than a strategy.

What is Out-of-Sample Testing?

Every backtested strategy has a birth story. You looked at some stretch of market history, you noticed something, and you wrote rules that captured it. That stretch is your in-sample data, and the rules were shaped by it whether or not you were consciously optimizing. Out-of-sample data is any history you deliberately did not consult while making those choices. The distinction has nothing to do with dates and everything to do with what informed the design: a period you studied and then discarded is still in-sample.

Three versions show up in practice. A holdout split designs the strategy on one span of history and then tests it once on a later span that was sealed off from the start. Walk-forward testing repeats that split many times, re-fitting on a trailing window and scoring on the slice that follows. Forward testing runs the finished rules on data that did not exist when the rules were written, which is the strongest form available, because information from the test period could not have leaked into the design no matter how careless you were.

What the test tells you is whether the performance is a property of the strategy or a property of the sample. An in-sample backtest answers the question "would these rules have worked on the data I used to write them?", which is close to guaranteed and therefore close to worthless. An out-of-sample result answers the question you actually care about, which is whether the rules carry any information about markets they have not met.

Why Out-of-Sample Testing Matters in Backtesting

The decision this informs is the only one that costs money: whether to put capital behind the strategy. An in-sample number is not an estimate of future performance, it is an upper bound on it, and usually a generous one. Out-of-sample testing is the cheapest way to find out how much of that number was signal before the market finds out for you.

The size of the gap is well documented. McLean and Pontiff, publishing in the Journal of Finance in 2016, took dozens of stock-return anomalies from peer-reviewed academic papers and re-ran each one on the years after the sample the original authors had used. Returns fell by roughly a quarter in the period between the end of the original sample and the paper's publication, and by well over half after publication. The second decline is partly crowding, as investors read the paper and trade the effect away. The first is pure out-of-sample decay: the portion of the result that was statistical luck, measured on strategies that had already passed academic refereeing.

The failure mode of skipping the test is that you lose the ability to tell an edge from a fit. Both look the same on the results page: a strategy with a genuine 3% annual edge and one tuned into a 3% annual edge produce the same equity curve, the same Sharpe ratio, and the same confident feeling. Only fresh data separates them, and if you never hold any back, the market supplies it later at full price.

How SledgeKey Implements Out-of-Sample Testing

SledgeKey does not split your history for you, and there is no train-and-test switch in the configuration panel. The Backtest Period control is a slider from 1 to 10 years in one-year steps (free accounts are capped at 2 years), and every run ends at the most recent market close, so the available windows nest inside one another rather than partitioning the past into separate design and validation blocks. Out-of-sample discipline is therefore something you impose on your own workflow, not a setting you switch on.

What the platform does give you is the ability to inspect a result period by period instead of in aggregate. The calendar year returns table and the rolling 12-month returns and Sharpe charts show how the same unchanged rules behaved in each stretch of the window, including years you were not thinking about when you picked your thresholds. A strategy whose entire ten-year total return was earned in one calendar year has told you something important, and no headline number will say it out loud.

The real out-of-sample test is the forward one, and it is the one SledgeKey is best suited to. Finish your screen, write down the criteria and the date, and then leave them alone. Because the platform refreshes prices daily and records each company's fundamentals against the date the filing became public, the months that accumulate after your design date are genuinely untouched data. Re-run the identical criteria a few quarters later and compare. The rule that makes this work is also the hard part: you do not get to adjust the screen while you wait.

Common Pitfalls

The most common mistake is calling something out-of-sample after you have already looked at it. If you test on the holdout period, see a disappointing result, adjust two thresholds and test again, that period is now part of your design set. This is why serious researchers treat untouched data as a consumable resource and ration it: you can hold back five years of history, but you can only spend it once.

A second pitfall is a test window too short or too uniform to say anything. Six months of a rising market will validate almost any long-only strategy with a beta above one, and a two-year out-of-sample slice that contains no drawdown is not evidence of resilience. Judge the result against the benchmark over the same stretch rather than in isolation, and be honest about whether the period actually put the strategy under stress.

A third is expecting a clean verdict. Real strategies degrade out of sample, and a modest decline is the normal outcome, not a failure. As a working expectation, plan for roughly half the in-sample edge to survive. Full retention deserves suspicion rather than celebration, because it often means the test period was not as clean as you thought. Total collapse is the one unambiguous signal, and it is a rejection.

Watch Out

An out-of-sample test only counts once. The moment you use its result to revise the strategy, that period has joined your design data, and the next run on it is in-sample again. If you have iterated against the same holdout five times, you no longer have an out-of-sample result; you have a slower, better-disguised optimization.

Put a strategy to the test

Run a backtest on point-in-time data, then leave the rules alone and check it again next quarter, free.

Run a Backtest
Written by The SledgeKey Team · Last updated July 13, 2026