Book a demoSign in
Algo Creator School
November 16, 2026

One backtest is one path. CPCV hands you a crowd of them (Algo Creator School #36)

Anthony Garcia, QuantVue CTO
CTO Anthony Garcia
Author
One backtest is one path. CPCV hands you a crowd of them

Combinatorial purged cross-validation. Four words, and people stop reading at the first one. Each word is one idea, and none of the ideas is hard. Take them in reverse.

Cross-validation. Cut your history into blocks. Build the rule on some of the blocks, test it on the ones you held back, rotate, repeat. #5 covered why the plain version leaks on market data and why you purge the training samples that overlap a test block and embargo a buffer after it. Walk-forward is the trader's version of the same idea, with one rule added. The test block always comes after the training blocks, so the sequence reads past to future, the way you'd have traded it.

Walk-forward's weakness is that it gives you one path. One sequence of out-of-sample windows, in the one order history happened to come in. Move the cut points a month and the number moves. Start a year later and it moves again. You have an out-of-sample result, which is more than most people have, and you still have no idea how lucky that particular arrangement was. It's one draw from a distribution you never got to see.

Combinatorial fixes that. Instead of holding out one block at a time in order, hold out every pair of blocks. Six blocks of history, two held out at a time, and there are fifteen ways to do it. Each of the fifteen is a full train-and-test run. The two test blocks might be years apart, with training data on both sides of each, which is why the purging matters twice as much here. Every test block has two edges now, and a sloppy purge leaks through both. You need the entry time and the resolution time for every sample, same as #5 said. If your pipeline only carries one, this is where it bites.

Now we chop them up. Every block was held out in five of the fifteen runs, so every block has five different out-of-sample results, each produced by a rule that never saw it. Take block one's result from one run, block two's from another, and so on across all six, and you have stitched together a complete out-of-sample history covering the whole window exactly once. Do it again with different runs and you have a second complete history. Six blocks, two out at a time, gets you five of these paths. More blocks, or three out at a time, gets you dozens, then hundreds.

Left, the fifteen train-and-test runs of combinatorial purged cross-validation with six blocks and two held out at a time, one row per run, held-out blocks marked and the purged edges hatched. Right, the five complete out-of-sample paths stitched from those runs as synthetic equity curves fanning out from one start, worst and median labelled, and a table of which run scored each block of each path. Relative axes, no values.

What you get is a crowd of out-of-sample equity curves instead of one. A median path, a spread, a worst path, and the share of paths that lost money. The question stops being "did it work" and becomes "how often does it work, and how bad is the bad version." That second question is the one your account will ask you.

CPCV is a stress test, and it has to be read as one. Nobody trades a rule that was trained on next year, so a CPCV path is never a trading record and never a performance number. It asks one thing. Does the rule's result depend on the particular arrangement of history it was tested on? A real mechanism scores about the same whichever blocks it learned from. A fit scores well on one arrangement and falls apart on the rest. That's why both get run on every strategy here. Walk-forward for realism, CPCV for whether the realism was luck.

There's a bonus that ties back to #32. Run CPCV across every setting the optimizer considered, and in each of the fifteen runs ask whether the setting that won in training also won out of sample. If the training winner lands below the middle of the pack out of sample about half the time, selecting the winner was a coin flip, and the optimizer's answer was noise with a results tab. There's a name for that number and a formula for it, and you don't need either to understand what it's telling you.

The build is smaller than the name. Wednesday gave you pandas and the time-aware split. Writing the block splitter with the pairs and the purge around both edges is a few dozen lines on top of that. The scary part was never the code.

A strategy that only works on one arrangement of the past was fitted to that arrangement. CPCV is how you find out before the market does.

This lesson was originally sent to the Algo Creator School email list on October 16, 2026. New lessons go out by email regularly. Join the list at quantvue.io.

Educational content only, not financial advice. Futures trading involves substantial risk of loss and is not suitable for all investors. Individual results vary, and past performance, actual or simulated, does not guarantee future results.

Read next

Free 20,000+ member Discord!

faqs

Your questions answered

What happens after I purchase?

After check out, you will receive a Welcome Email with your login details.

Use these details to Login to our dashboard, where you'll then submit your TradingView or NinjaTrader information.

Access is granted automatically if the form is filled out properly.

If you are having issues with access being granted, please submit a support ticket here.

Can I use this if I'm a total beginner?

No. Our core system is designed for those with baseline trading knowledge and live-trading experience. Do not sign up if you're a beginner trader. Intermediate to advanced experience is recommended.

Will I win every trade with this?

No. There is no algorithm or indicator that can accurately predict with 100% certainty the financial markets.

QuantVue is not responsible for trading losses. Past results are never indicative of future performance. Use QuantVue and trade at your own risk.

Which markets & timeframes does QuantVue work on?

Our tools are designed for futures. However, clients can tweak our toolkit to any chart or market.

Do I need a paid TradingView plan?

Most clients use a paid TradingView plan, and the most popular among users is TradingView premium.

How do I cancel my membership?

You can manage your account in the "My Account" tab or submit a support ticket here and we will process your cancellation immediately!

What is the refund policy?

Our monthly & yearly Pro / Elite plans are backed by a 30-day money back guarantee. If you are not 100% satisfied within 30 days from the time of purchase, you may request a full refund.

Beyond the 30-day period, all sales are final.

The 30 day money back guarantee only applies to first time customers. If you have used our system or had a plan in the past, you are not eligble for a refund. This means if you have used the PRO plan in the past and sign up for ELITE at a later date, you will not be elgible for the refund guarantee and vice versa.

This refund policy does not apply to our ATS program.

See our full refund policy here.

Does the 30 day money back guarantee apply to the ATS?

There is a separate money back guarantee for the ATS Program. The ATS refund policy has certain conditions that must be met to receive a full refund.

See our full ATS refund policy here.

Does the Elite plan include prop automation?

The Elite Plan on it's own does not automate into cash or prop firm accounts.

If you want to automate our tools into cash or prop accounts, you can do so via our alert connector QuantLynk here.

Keep in mind QuantLynk is detectable by prop firms, so we recommend using an automation-friendly prop firm.

To automate our tools into prop account undetected, we recommend our ATS Program here.

Is there a free trial on the ATS Program?

No. There is no free trial on the ATS program.