backte.st

Out-of-sample testing: how to use a holdout period honestly

Why scoring the last part of your history on its own catches overfitting, how Backte.st’s unseen-period check works, and how to avoid using it up.

Out-of-sample testing means judging a strategy on data that played no part in designing it. It is one of the simplest and most effective defenses against overfitting.

In-sample vs out-of-sample

If performance falls apart out of sample, the in-sample result was probably describing noise.

How the unseen-period check works

In Backte.st the Unseen period check splits each market’s history in time: the first 70% and the last 30%. It scores the last 30% on its own, as if you had never seen it, and reports its return and the number of closed trades since the split date.

Splitting by time, not randomly, matters. Markets have trends and regimes, and prices on neighboring days are related. A random split would leak information from the future into the past.

The catch: a holdout is only unseen once

If you run a test, see that the last 30% did badly, tweak the rules and run again until it looks good, the holdout is now part of your design process. It has become in-sample data. The report says this explicitly in its limitations.

Practical ways to keep it honest:

  1. Decide your rules first, using only the earlier part of the history if you want to explore.
  2. Look at the unseen result once and write down what you saw.
  3. If you must iterate, get fresh data: a different market, a later period, or a different candle size.

Reading the result

Beyond one split

Professionals often use walk-forward analysis, which repeats the split many times as the window rolls forward. A single holdout is a simpler version of the same idea, and it already catches a lot.

Try it on any strategy in the lab and compare the unseen-period line with the full-period return.

Try it in the lab

Build a strategy from indicators, no code needed, run it on a few markets and see this check on your own rules. It’s free and runs in your browser.

Open the lab