Combinatorial purged cross-validation: the “Combinatorial windows with a gap” check
Combinatorial purged cross-validation (CPCV) cuts the period into slices, holds out every pair of slices in turn, fits the strategy on the rest and tests it on the held-out pair. A gap of days is removed around each held-out slice so information can’t leak across the seams. Matana Labs runs every fit and every test on the engine.
What it checks
Time is serial: ordinary cross-validation peeks across the seams. Here the seams are closed off by a gap, and the test slices are any pair, not necessarily consecutive.
The question behind it: Is it overfitted to history? In the app it is in Analysis Lab → Checks, stage “After optimization”. Were the numbers overfitted by brute force? Needed after parameter optimization in the “Improvement” step.
How it works
The period is cut into 5 slices. Each pair of slices, in turn, is validation (10 combinations), the rest is optimization over a grid of −20, 0, +20% for the marked numbers (or the first two from the blocks, if none are marked); a 5-day gap is dropped around the validation slices. Optimization and validation are continuous engine runs over day lists.
How it gets its status
These are the app’s own rules, shown on the check’s card:
- holds: the test is positive in 70% of combinations or more
- with a caveat: 40–70%
- broke down: below 40%
- can't be computed: the period is shorter than 100 trading days (five slices of 20)
- not applicable: no numbers in the blocks
With fewer than 30 trades or 20 days in the run, the check still shows its numbers, but its status is at most “with a caveat” and the result is marked as unreliable.
How to read the result

- One row per held-out pair, with the values chosen on the other slices and the test result on the pair; click the date to open the first day on the chart.
- The note on top gives the number of slices and the gap around each test slice.
- The status uses the share of pairs where the test result is positive.
In the score out of 100
When it has a status, it counts toward the overall score with weight 1: “holds” earns full points, “with a caveat” half and “broke down” none; “can’t compute” is left out.
Every plan, the free one included, can run it; any engine runs it needs are counted in backtest-years.
If it breaks down
What's optimized on some slices doesn't work on others — the parameters are overfit.
This is the app’s own suggestion; under Improvement the app tests candidate changes on the engine before it shows them.
Keep reading
Questions
Why not ordinary cross-validation?
Market time is serial: nearby days are related, so a test slice next to a fitting slice can peek through the seam. The gap removes those days.
Which numbers are fitted?
The numbers you marked for optimization, or else the first two numbers in the strategy’s blocks, on a small grid around their current values.
How is it different from walk-forward?
Walk-forward only tests forward in time. CPCV tests on every pair of slices, so it gets many more test results from the same history.