Probability of backtest overfitting calculator

Estimate how often the configuration selected in sample falls below the median rank out of sample. Paste the return series for all configurations in your search; calculation takes place in your browser.

Method and assumptions

CSCV divides T observations into S contiguous blocks. For each combination of S/2 in-sample blocks, the calculator selects the configuration with the highest in-sample score and ranks its out-of-sample score among all K configurations.

omega = OOS rank / (K + 1)
logit = ln(omega / (1 - omega))
PBO = (1 / C) * sum over the C splits of count(tied winners with logit < 0) / k

Tied OOS scores receive their average rank. Columns that are identical once each is divided by the power of two just above its largest absolute return (a column and its double, for example, but not its triple) are one configuration: they are merged before the splits, and K counts the distinct configurations. When k configurations tie for the highest in-sample score (k = 1 without a tie), the split counts the average of their k readings, each with weight 1/k in the PBO and in the histogram. This is the expected value of picking one of them at random; Bailey, Borwein, López de Prado and Zhu define a single winner and leave ties open. An undefined score discards the split. If any split is discarded, PBO is undefined; the counts and reasons remain visible. The final T mod S rows are excluded.

Sharpe is the default score. Stochastly's desktop CSCV uses Sortino and an optional embargo at IS-to-OOS boundaries. Select Sortino and enter the same observations per year and embargo to compare results. Each block needs at least four observations (T >= 4S), the same minimum as the app.

An embargo removes observations at the start of an OOS block when its preceding block is in sample. Other observations adjacent to an IS block remain in the OOS score. Returns within a time block can depend on each other, and correlated strategy variants can reduce the effective search breadth.

With fewer than about 100 configurations, the PBO estimate is exploratory and can be unstable. The number of configurations and the caveat appear beside each result. PBO is a descriptive estimate of the tested search.

The browser limit is 20,000 combinations and 1,000,000 matrix cells. If a limit is reached, reduce S, rows or configurations; keep a record of excluded trials because omitted configurations change the estimand.

Source: Bailey, Borwein, López de Prado and Zhu, The Probability of Backtest Overfitting, Journal of Computational Finance 20(4), 39–69 (source read 2026-10-03). Read the PBO guide.

CSCV calculator

Paste a CSV matrix with time in rows and every tried configuration in columns. Returns are decimals per observation. A header row may name the configurations. The matrix stays in this browser.

The synthetic example has seeded noise and one configuration with added drift. It is illustrative and is not market data.

Embed this calculator

Other sites can show the probability of backtest overfitting calculator in a frame served from /embed/probability-of-backtest-overfitting-calculator: the same fields and results, computed in the visitor's browser, with a visible credit and a link to the full calculator. The code below places the probability of backtest overfitting calculator frame, a plain link to the full calculator under it, and a script that fits the frame height to its content.

The script applies a height message only when it comes from https://stochastly.com and from the probability of backtest overfitting calculator frame, with a height from 200 to 4000 pixels, and drops any other message. The probability of backtest overfitting calculator frame registers no message handler of its own, so a host page has no channel to change its inputs or its results.

<iframe id="stochastly-pbo" src="https://stochastly.com/embed/probability-of-backtest-overfitting-calculator" title="Probability of backtest overfitting calculator by Stochastly" width="100%" height="1400" style="border:0;max-width:720px" loading="lazy" sandbox="allow-scripts allow-same-origin allow-popups allow-popups-to-escape-sandbox" allow="clipboard-write"></iframe>
<p style="font-size:13px"><a href="https://stochastly.com/tools/probability-of-backtest-overfitting-calculator">Probability of backtest overfitting calculator</a> by Stochastly</p>
<script>
(function () {
  var allowed = ["https://stochastly.com"];
  window.addEventListener("message", function (e) {
    var f = document.getElementById("stochastly-pbo");
    if (!f || allowed.indexOf(e.origin) < 0 || e.source !== f.contentWindow) return;
    var d = e.data;
    if (!d || d.type !== "stochastly-pbo-height" || typeof d.height !== "number") return;
    if (!(d.height >= 200 && d.height <= 4000)) return;
    f.style.height = Math.ceil(d.height) + "px";
  });
})();
</script>

Cite this calculator

To cite the probability of backtest overfitting calculator in a paper, a report or a post, copy the reference below. Its address is https://stochastly.com/tools/probability-of-backtest-overfitting-calculator.

Stochastly (2026). Probability of backtest overfitting calculator [web calculator]. https://stochastly.com/tools/probability-of-backtest-overfitting-calculator

The method behind the probability of backtest overfitting calculator comes from the paper below: cite that paper for the method, and the reference above for the probability of backtest overfitting calculator itself.

Bailey, D. H., Borwein, J., López de Prado, M. and Zhu, Q. J. (2017). The Probability of Backtest Overfitting. Journal of Computational Finance 20(4), 39-69.

Source on GitHubstochastly-calculators · MIT