The best development result is not always the most repeatable strategy. Sometimes it is simply the specification most closely adapted to one sample. A useful way to investigate this is to repeat the act of choosing a winner on different parts of the same historical dataset and then inspect that winner elsewhere. You are evaluating the selection process, not merely admiring its final output.

Suppose an optimizer compares input sets A, B, C and D. A dominates an early trending segment. C dominates a later rebound. B earns modest but steady results. Depending on which segment you use for selection, either A or C can appear exceptional. If that winner consistently loses its relative rank on the complementary sample, the selection rule deserves scrutiny.

What PBO asks

The Probability of Backtest Overfitting framework of Bailey, Borwein, López de Prado and Zhu uses combinatorially symmetric cross-validation to study the out-of-sample ranks of in-sample winners. Historical observations are divided into blocks, combinations of blocks form selection samples, and the complements form evaluation samples. A rank below the middle indicates that the selected winner underperformed the typical available alternative in that complementary evaluation. The reported frequency is conditional on the candidate set, historical sample and selection method, not a universal probability of future failure.

That distinction matters. PBO does not answer “Will this exact strategy lose money tomorrow?” A selected strategy can be profitable yet rank poorly compared with its alternatives. It can also rank well while every candidate loses. Relative selection quality and absolute profitability are separate questions, so inspect both.

How CSCV tests the selection rule

Bailey, Borwein, López de Prado and Zhu's original methodology, Algorithm 2.3, starts with synchronous observations from competing candidates. Split the rows into an even number of equal chronological blocks. For each half-block combination, pool its raw observations in time order, calculate every candidate's selection score, and select the in-sample winner. Calculate scores on the complementary half, then rank that same winner against all candidates there. Repeat for every directed combination, including the reverse assignment.

For ascending OOS rank r, with 1 worst and N best:

ω = r / (N + 1)
λ = ln(ω / (1 − ω))
K = C(S, S/2)
PBO estimate = count(λ ≤ 0) / K

The denominator N + 1 keeps the relative rank away from 0 and 1, avoiding infinite logits. A logit is dimensionless, not a return. We pin the non-positive convention in section 3.1 of the paper for this discrete implementation. We also report λ < 0 and λ = 0 separately. Equality and tie handling must be disclosed when the distribution has mass exactly at zero.

This is not the percentage of candidate strategies that lose OOS. The unit counted is a split's selected winner and its relative rank. Neither 100% nor 0% in a tiny construction establishes a strategy's chance of future failure or success.

What data do you need for PBO?

Start with a matrix whose rows represent the same observation dates and whose columns represent different specifications. Each cell should contain a comparable net return or another carefully defined performance observation. A flat strategy on a valid day can correctly have zero return. An unavailable observation cannot be repaired by silently inserting zero.

EvidenceRequired distinctionNot sufficient
Candidate population NThe actual alternatives that competed under the declared selection procedure, including unattractive completed candidates.One selected strategy, a shortlist chosen afterward, or only winning trades.
Synchronous observations TOne common time index and economic definition for all columns, with data and cost provenance.Equity curves with unrelated dates or noncomparable leverage.
Blocks SAn even count of equal disjoint row blocks. S is not N and neither is the split count.One arbitrary Development/Validation split.
Selection metricA fixed objective that can be evaluated on each pooled half with enough observations. A Sharpe objective needs a defined return variance.A final headline score, or the average of individual block Sharpes.
Selection and ranking rulesIS winner, OOS scores and ranks for the same candidate identities, declared tie and missing-data rules.Choosing an OOS winner retrospectively.

Decide whether you are comparing signals, risk sizing or complete executable strategies. One contract versus five contracts under total profit is not a pure parameter comparison. Record failed or unavailable trials as missing evidence, rather than inventing return columns for them. Preserve enough history to reconstruct what actually competed. A neat spreadsheet of survivors is not a faithful research record.

The CRAN pbo interface likewise requires a return matrix, a performance function and compatible partitions. A chosen metric is evaluated on the reassembled observations. Averages of nonlinear per-block metrics generally do not equal the metric of the pooled sample.

Three complete, reproducible controls

These are synthetic method controls, not market findings. Each case contains T = 12 observations, N = 4 candidates and S = 6 blocks, with two observations per block. Every entry is an already-net return in basis points per equal synthetic period. One basis point is 0.0001 as a decimal return. No market data, trades, fills or additional costs are modeled.

The predeclared objective is maximum arithmetic mean of pooled raw returns, measured in bp. It is not Sharpe, compounded wealth or risk-adjusted performance. Six observations are pooled in each half. This tiny construction verifies mechanics, not the statistical adequacy of such a sample for trading research.

  • Case A: candidate A has a deliberately fixed advantage over the other columns, despite shared fluctuation. It is a constructed dominance control, not a real economic edge.
  • Case B: different candidates excel in different blocks. Selecting a local winner repeatedly produces poor complementary ranks.
  • Case C: every candidate contains exactly the same noisy observations. This limiting indistinguishable case tests whether software admits that there is nothing to select between.
A — constructed stable dominance: all 12 × 4 observations
ObservationBlockA (bp)B (bp)C (bp)D (bp)
11720-3
21942-1
3250-2-5
42720-3
53831-2
6310530
7461-1-4
84831-2
95942-1
10511641
116720-3
126942-1
B — selection reversals: all 12 × 4 observations
ObservationBlockA (bp)B (bp)C (bp)D (bp)
1170-51
2192-33
3281-3-1
42103-11
53-4081
63-22103
74-617-1
84-4391
9510-23
1053205
116-2100
1260322
C — identical noisy candidates: all 12 × 4 observations
ObservationBlockA (bp)B (bp)C (bp)D (bp)
11-2-2-2-2
213333
32-1-1-1-1
422222
53-3-3-3-3
631111
742222
84-2-2-2-2
954444
105-4-4-4-4
1161111
126-1-1-1-1
The complete Case B return matrix has 12 observations and four candidates. A wins on blocks 1, 2, 3 with 4.667 bp mean, then ranks worst on blocks 4, 5, 6 with minus 1.333 bp mean.
All 48 Case B entries are visible, including losses and zeros. Row order and block membership match the downloadable matrix. Color is supplementary to the exact signed labels.

A complete split: blocks 1, 2, 3 versus 4, 5, 6

  1. Choose the IS half. Blocks 1–3 contain observations 1–6, not three precomputed Sharpe ratios.
  2. Select using IS only. Candidate A's six returns sum to 28 bp, so its mean is 28/6 = 14/3 bp. The table shows all competitors.
  3. Locate A on the complement. Its observations 7–12 sum to −8 bp, giving −8/6 = −4/3 bp.
  4. Rank A OOS. It is worst, rank 1 of four. ω = 1/5 = 0.20 and λ = ln(1/4) ≈ −1.386294.
  5. Repeat every assignment. Reversing the halves selects C instead. The reverse is another view of the same data, not an independent experiment.
CandidateIS mean (bp)OOS mean (bp)OOS rank
A — IS winner4.666667−1.3333331
B1.3333331.6666672.5
C1.0000002.6666674
D1.3333331.6666672.5

Ties, equality and what the controls actually return

Our fixture breaks exact tied IS scores by candidate ID, A before B before C before D. This is an explicit teaching selection rule, not a universal rule mandated by CSCV. OOS ties receive average ascending ranks. Integer bp sums make equality exact here. A decimal-return implementation needs an explicit numerical policy and must not round scores merely to manufacture ties.

Caseλ ≤ 0λ < 0λ = 0Meaningful result
A — constructed stable dominance0/20 (0%)0/20 (0%)0/20 (0%)0% under the pinned convention
B — selection reversals20/20 (100%)19/20 (95%)1/20 (5%)100% under the pinned convention
C — identical noisy candidates20/20 (100%)0/20 (0%)20/20 (100%)Unavailable: identical columns

Case B has 19 negative logits and one zero. Thus the strict-below-middle diagnostic is 95%, while the stated non-positive PBO convention is 100%. The difference is entirely the one tied OOS rank, not changed evidence. For IS blocks 1, 3, 6, C's OOS rank is 2.5 and its logit is zero. For IS blocks 1, 4, 6, B and C tie for selection, so the frozen ID rule selects B.

Case C has average OOS rank 2.5 in every split. A mechanical implementation can return either 100% under ≤ 0 or 0% under < 0. Neither is a meaningful selection diagnosis. Our runner reports an uninformative state with a null PBO value and retains the mechanical counts for auditing. Small economic differences between almost identical candidates likewise require inspection alongside ranks.

Case A's 0% only records rank preservation in an engineered matrix. Subtracting 100 bp from every cell leaves all its ranks and PBO unchanged while every selected OOS mean becomes negative. Relative selection quality and absolute loss are different quantities. Case B's selected winner loses OOS in 8 of 20 splits, another frequency distinct from its 20 non-positive rank logits.

Exact discrete logit counts. Dominance: twenty plus 1.386. Reversals: sixteen minus 1.386, two minus 0.847, one minus 0.405 and one zero. Identical candidates: twenty zeros and no informative PBO.
Counts, not a fitted probability density. Each case reuses the same observations across 20 dependent splits. No binomial confidence interval treats these recombinations as independent new data.

Inspect every split, not just the headline

Scores and logits below are rounded to six decimals for display. The JSON retains numeric precision, both complete score vectors, raw observation IDs, all ties and flags. The primary summary counts exact rank events, not displayed rounded values.

A — constructed stable dominance: all 20 split results
IS blocksOOS blocksIS winnerIS mean (bp)OOS mean (bp)OOS rankλ
1, 2, 34, 5, 6A7.6666678.33333341.386294
1, 2, 43, 5, 6A7.0000009.00000041.386294
1, 2, 53, 4, 6A8.0000008.00000041.386294
1, 2, 63, 4, 5A7.3333338.66666741.386294
1, 3, 42, 5, 6A8.0000008.00000041.386294
1, 3, 52, 4, 6A9.0000007.00000041.386294
1, 3, 62, 4, 5A8.3333337.66666741.386294
1, 4, 52, 3, 6A8.3333337.66666741.386294
1, 4, 62, 3, 5A7.6666678.33333341.386294
1, 5, 62, 3, 4A8.6666677.33333341.386294
2, 3, 41, 5, 6A7.3333338.66666741.386294
2, 3, 51, 4, 6A8.3333337.66666741.386294
2, 3, 61, 4, 5A7.6666678.33333341.386294
2, 4, 51, 3, 6A7.6666678.33333341.386294
2, 4, 61, 3, 5A7.0000009.00000041.386294
2, 5, 61, 3, 4A8.0000008.00000041.386294
3, 4, 51, 2, 6A8.6666677.33333341.386294
3, 4, 61, 2, 5A8.0000008.00000041.386294
3, 5, 61, 2, 4A9.0000007.00000041.386294
4, 5, 61, 2, 3A8.3333337.66666741.386294
B — selection reversals: all 20 split results
IS blocksOOS blocksIS winnerIS mean (bp)OOS mean (bp)OOS rankλ
1, 2, 34, 5, 6A4.666667−1.3333331−1.386294
1, 2, 43, 5, 6A4.000000−0.6666671−1.386294
1, 2, 53, 4, 6A6.333333−3.0000001−1.386294
1, 2, 63, 4, 5A5.333333−2.0000001−1.386294
1, 3, 42, 5, 6C4.333333−0.6666671−1.386294
1, 3, 52, 4, 6D2.6666670.3333331−1.386294
1, 3, 62, 4, 5C2.0000001.6666672.50.000000
1, 4, 52, 3, 6D2.0000001.0000001−1.386294
1, 4, 62, 3, 5B (tie: B/C)1.6666671.3333331−1.386294
1, 5, 62, 3, 4A3.0000000.3333331−1.386294
2, 3, 41, 5, 6C5.000000−1.3333331−1.386294
2, 3, 51, 4, 6A2.6666670.6666671−1.386294
2, 3, 61, 4, 5C2.6666671.0000001−1.386294
2, 4, 51, 3, 6A2.0000001.3333331.5−0.847298
2, 4, 61, 3, 5C2.3333331.3333332−0.405465
2, 5, 61, 3, 4A3.3333330.0000001−1.386294
3, 4, 51, 2, 6C5.333333−1.6666671−1.386294
3, 4, 61, 2, 5C6.000000−2.3333331−1.386294
3, 5, 61, 2, 4C3.0000000.6666671.5−0.847298
4, 5, 61, 2, 3C2.6666671.0000001−1.386294
C — identical noisy candidates: all 20 split results
IS blocksOOS blocksIS winnerIS mean (bp)OOS mean (bp)OOS rankλ
1, 2, 34, 5, 6A (tie: A/B/C/D)0.0000000.0000002.50.000000
1, 2, 43, 5, 6A (tie: A/B/C/D)0.333333−0.3333332.50.000000
1, 2, 53, 4, 6A (tie: A/B/C/D)0.333333−0.3333332.50.000000
1, 2, 63, 4, 5A (tie: A/B/C/D)0.333333−0.3333332.50.000000
1, 3, 42, 5, 6A (tie: A/B/C/D)−0.1666670.1666672.50.000000
1, 3, 52, 4, 6A (tie: A/B/C/D)−0.1666670.1666672.50.000000
1, 3, 62, 4, 5A (tie: A/B/C/D)−0.1666670.1666672.50.000000
1, 4, 52, 3, 6A (tie: A/B/C/D)0.166667−0.1666672.50.000000
1, 4, 62, 3, 5A (tie: A/B/C/D)0.166667−0.1666672.50.000000
1, 5, 62, 3, 4A (tie: A/B/C/D)0.166667−0.1666672.50.000000
2, 3, 41, 5, 6A (tie: A/B/C/D)−0.1666670.1666672.50.000000
2, 3, 51, 4, 6A (tie: A/B/C/D)−0.1666670.1666672.50.000000
2, 3, 61, 4, 5A (tie: A/B/C/D)−0.1666670.1666672.50.000000
2, 4, 51, 3, 6A (tie: A/B/C/D)0.166667−0.1666672.50.000000
2, 4, 61, 3, 5A (tie: A/B/C/D)0.166667−0.1666672.50.000000
2, 5, 61, 3, 4A (tie: A/B/C/D)0.166667−0.1666672.50.000000
3, 4, 51, 2, 6A (tie: A/B/C/D)−0.3333330.3333332.50.000000
3, 4, 61, 2, 5A (tie: A/B/C/D)−0.3333330.3333332.50.000000
3, 5, 61, 2, 4A (tie: A/B/C/D)−0.3333330.3333332.50.000000
4, 5, 61, 2, 3A (tie: A/B/C/D)0.0000000.0000002.50.000000

How much computation does CSCV require?

Blocks SDirected assignments C(S, S/2)
46
620
870
10252
12924
1612,870

Six blocks produce 20 assignments, not ten, because each direction selects its own winner. Increasing candidate count N adds scoring and ranking work within each assignment but does not change this combination count. A direct implementation scans roughly T × N observations per assignment. Additive sufficient statistics can reduce repeated work for compatible metrics. The sample-mean metric is such a case, but this tiny runner pools raw rows to keep the procedure inspectable.

More blocks do not create more historical information. They shorten contiguous segments and can disturb dependence. Choose block design and computational limits before seeing the result, and disclose skipped or sampled splits. This runner evaluates all splits or rejects input, drops no observations, rejects incomplete matrices and caps work at 20,000 assignments. The cap is a teaching safeguard, not a recommended statistical threshold.

Read the failure pattern, not just the percentage

The useful next question is why the selected winners reverse rank. In our example, A and C concentrate their strongest profits in different blocks. The selection rule repeatedly follows whichever concentration happens to be included. B is steady, but its modest returns rarely win the selection contest. The optimization objective rewards historical peaks rather than cross-block consistency.

That does not automatically mean you should replace the winner with B. The dataset was constructed to illustrate a mechanism. In real research, you would investigate exposure, regime dependence, transaction costs and the possibility that different candidates have valid but different economic roles. Selecting a “stable” candidate after looking at every diagnostic is itself another selection decision that needs fresh evaluation.

Inspect the distribution of degradation as well. A small ranking reversal among very similar candidates is economically different from a collapse from strong profit to a large loss. Record changes in average return, drawdown, turnover and performance relative to a simple benchmark. A single frequency cannot describe all of those dimensions.

Block design and leakage

Blocks should preserve the intended unit of time and enough local structure for the score to make sense. Extremely small blocks create noisy measurements and can cut through positions. Extremely large blocks leave few distinct arrangements. Neither choice has a universal optimal value. Examine a predeclared range and explain which time dependence the design is intended to preserve.

Boundary handling is critical when trades overlap or signals use long histories. A trade's outcome must not be partly visible in the selection data and partly reused as evaluation evidence without a documented rule. Removing overlapping labels or adding a separation gap can help in a separately specified validation design. Those changes must be audited, not silently called the equal-half CSCV procedure used here. A gap chosen from convenience rather than the information horizon may be inadequate.

Combinatorial splits are also not a literal simulation of live chronological retraining. Some arrangements select using later blocks and evaluate earlier blocks. That is part of this diagnostic construction, not permission to deploy a model with future information. The forward-only walk-forward and reused-holdout example answers the operational question of what could have been chosen at each historical date. A CSCV complementary sample is not automatically a previously untouched final holdout.

A practical implementation checklist

  1. Freeze the candidate universe and the selection objective.
  2. Reconcile each candidate's net returns on the common calendar.
  3. Define blocks, boundary rules and tie handling before inspecting results.
  4. For every split, select using only the selection score.
  5. Evaluate every candidate on the complement and rank the selected winner.
  6. Store each split, winner, rank and absolute performance change.
  7. Compare the diagnostic with a genuinely chronological validation process.

Use immutable identifiers for code, input set, data snapshot and costs. The same letter B may be a convenient display label, but it should resolve to one precise specification. If a parameter changes, do not overwrite the old column while keeping its old returns. Otherwise the matrix no longer describes any real set of experiments.

Test your implementation on tiny matrices where every result can be inspected by hand. Verify that a consistently superior column stays near the top, that reversed performance patterns produce poor complementary ranks and that tie rules are deterministic. Only then scale to a large optimization archive.

DSR and PBO answer different questions

Method / questionRequired evidenceWhat it measuresWhat it does not measureTypical misuse
DSR: how convincing is the selected Sharpe after search?Selected return statistics, sample length and moments, plus defensible trial-count and Sharpe-dispersion information under the chosen approximation.A Sharpe comparison to a selection-adjusted reference with sampling assumptions.The CSCV distribution of candidate-selection ranks, economic causality or valid fills.Treating raw correlated trial count as validated independent trials, or 1 − DSR as PBO.
PBO/CSCV: does the IS selection rule degrade in complementary samples?Complete synchronous candidate histories, partitions, fixed metric and selection rules.A relative OOS-rank event frequency across symmetric selections.Future loss probability, missing research choices or the credibility of one Sharpe in isolation.Using only the winner's curve or reading a low value as proof of profit.

A parameter plateau is a local surface diagnostic, not a substitute for either method. Likewise, the Monte Carlo drawdown tool resamples path risk rather than reselecting among candidate histories. The published trade-order versus block-bootstrap study demonstrates why dependence assumptions matter while keeping synthetic trade outcomes fixed. These are complementary questions.

What this means in the current EdgeVeris workflow

Compatible Optimization runs retain the full successfully backtested candidate return matrix before performance filtering. PBO is available only where the recorded search, candidate universe and scores can be verified. The Sharpe path requires a compatible non-adaptive full-Development search, complete recorded family history, enough aligned sessions and a reproduced unique winner. It rejects tied IS winners or undefined folds. Supported non-Sharpe paths replay the original objective and its recorded selection rules. Those rules are not the ID-tie teaching policy above.

The diagnostic concerns the original recorded selection procedure, not a manually picked candidate's personal probability of being overfit. Adaptive searches, Pareto or walk-forward selection, incomplete matrices and incompatible histories are not automatically eligible for ordinary CSCV. A saved report alone does not establish eligibility. Portfolio DSR/PBO is unavailable when composition and weight-search histories are missing.

The platform's research-family ledger does not capture every external experiment, cloned research family or undocumented manual revision. Its indicative raw-trial DSR approximation does not validate an effective independent trial count and does not decide the Robustness verdict. This article's synthetic results are educational evidence, not an empirical product certification.

What PBO cannot establish

  • Unrecorded search: missing candidates, changed objectives and external research decisions cannot be recovered from the supplied matrix. Adding implausibly bad alternatives afterward can also distort ranks.
  • Independent evidence: candidates often share trades and blocks share market regimes. The many overlapping assignments are not independent experiments. A large split count cannot manufacture an effective sample size.
  • A universal metric: mean return, Sharpe and drawdown-based objectives can select different winners. Undefined metrics, short samples and near ties need an explicit unavailable or qualified state, not an invented score.
  • A stationary future: rank behavior in observed regimes does not establish how strategies respond to a new structural break.
  • Correct execution: look-ahead, missing data and wrong costs can contaminate every column. Audit futures execution and contract assumptions independently.
  • An untouched test after repeated use: redesigning candidates or blocks until PBO improves turns the diagnostic into another optimization target.

The backtesting cautions in Palomar's Portfolio Optimization emphasize trial history and the loss of independence when evaluation informs repeated revision. Read PBO inside the full strategy-validation evidence chain, not as a replacement for it.

How to act on the result

A high overfitting diagnostic invites a simpler hypothesis, a smaller justified search and better separation between selection and evaluation. It does not invite repeatedly changing the block design until the percentage falls. That would optimize the diagnostic itself. Write down which changes are economically motivated, then test them with information not used to choose those changes.

A low value is encouraging only within the tested setup. It cannot detect every data error, guarantee realistic fills or anticipate a new market regime. It also does not excuse an unrecorded history of discarded ideas. Treat PBO as one view of research repeatability alongside execution audits, cost sensitivity and forward evidence.

The central lesson is practical: save the alternatives, not just the winner. Once the full experiment history is available, you can ask whether your method of choosing a strategy survives changes in the sample. Without that history, a beautiful equity curve tells you much less than it appears to.