strateva.

Articles

Deflated Sharpe Ratio and PBO, explained without the maths

In this article

Say you test 50 versions of a strategy — different moving averages, different stops, different filters — and keep the best one. Its Sharpe ratio is 1.0. Looks solid.

Here's the uncomfortable question: if none of the 50 had any real edge, what Sharpe would the best one have shown? Roughly 1.0.

This article explains why, and walks through two tools built to measure exactly that problem: the Deflated Sharpe Ratio (DSR) and the Probability of Backtest Overfitting (PBO).

The Sharpe ratio in one sentence

Sharpe measures how much return you earn per unit of volatility. A Sharpe of 1 means, roughly, that your annual return above the risk-free rate equals your annual volatility. Higher is better: more reward for the ride. How it's annualised and what it doesn't say: Sharpe, Sortino, Calmar and drawdown.

Sharpe isn't the problem. Calculating it after picking the best of many options is.

The 50 random strategies experiment

We ran our own simulation, for illustration only. Fifty "strategies" made of pure noise: zero average return, five years of daily data. None has an edge, by construction. Then we looked at which one came out on top.

Repeating that 2,000 times, the best of the 50 typically showed an annual Sharpe of around 1.0 (the mean of those best Sharpes was 1.00). No edge. Just the act of choosing the winner.

This is selection bias, often called data snooping: the more things you try, the more likely one of them looks good by chance. No cheating required. Test a lot, show only the best, and you get there on your own.

It's exactly what happens in a lot of parameter optimisation: hundreds of combinations tested, the shiniest one kept.

Deflated Sharpe Ratio: correcting for having tried a lot

The DSR answers one specific question: what is the probability that the chosen variant's true Sharpe beats what you'd expect from the best of N attempts by pure luck?

It takes four things into account:

  1. How many variants were tried. More attempts raise the bar.
  2. How spread out those variants' results are. If their Sharpes vary a lot, the luckiest one can be very high.
  3. How much data there is. With a short history, any measured Sharpe is imprecise.
  4. The shape of the returns. Fat tails or rare sharp losses — very common in trading — make Sharpe more misleading, and the DSR penalises that.

The output is a probability between 0 and 1. A high value means the result is hard to explain just by having picked the best. A low value means the Sharpe you're looking at is about what luck would have produced anyway.

One detail of how we evaluate it: the DSR counts every declared variant as if they were independent. If they're actually very similar (a 50-day and a 51-day average, say), that's a conservative penalty — stricter than strictly necessary. We'd rather err that way than the other. The output also records the average correlation between variants as supporting information, but never uses it to quietly lower the bar.

PBO: does the past winner stay near the top?

PBO tackles the same problem from another angle. Instead of adjusting a number, it runs an experiment on the data itself.

The version we use is called CSCV (combinatorially symmetric cross-validation). The name is a mouthful; the idea isn't:

  1. Split the history into 16 consecutive blocks.
  2. Take 8 blocks as "the past" and the other 8 as "the future".
  3. In "the past", pick the best variant — just as an optimiser would.
  4. Check where that variant ranks in "the future". Still near the top, or in the bottom half?
  5. Repeat for every possible way of splitting the 16 blocks into two halves: 12,870 combinations.

Here "the past" and "the future" are just labels for the two halves of each split, not an order in time: in many splits, blocks in the "future" half come before blocks in the "past" half.

PBO is the share of those splits in which the past winner ends up below the median in the future. It measures relative ranking among the candidates, not whether the strategy makes or loses money.

  • A PBO near 0 suggests that the past winner tends to stay in the top half in the future: picking the best is not the same as picking at random. That does not mean it is profitable. If every candidate loses money, a low PBO only says that the least-bad one in the past tends to stay among the least-bad. It is still a losing strategy.
  • A PBO around 50% or higher suggests picking the best is no better than picking at random — or worse: what ranked high in one part of history doesn't hold in the other.
The winning rule of one half ends mid-tableEach dot is a real trend rule on the S&P 500 (averages of 2 to 24 months and momentum of 1 to 24 months). The best of 1873–1948, the 3-month average (Sharpe 0.91), ranks 24 of 47 in 1948–2026. Note: here the rules do resemble each other across halves (correlation 0.70); what does not hold is the winner’s lead. The series uses monthly averages of daily closes, which flatters trend rules.
0.91.01.11.21.30.50.60.70.80.9

Sharpe 1873–1948

  • Winner of 1873–1948
  • The other 46 rules
  • Median of 1948–2026: 1.11

Source: Robert Shiller’s monthly S&P 500 series, with dividends. No risk-free rate deducted; time out of the market earns zero.

If several variants tie for first place in "the past", the validation doesn't pick whichever happens to come first in the list: it marks the result as not evaluable. Choosing arbitrarily at that point would inject exactly the bias being measured.

What they need to work (and why almost nobody has it)

This is the part that gets forgotten. Neither DSR nor PBO can be computed from the winning strategy alone. They need:

  • returns for every variant tried, on the same dates;
  • which variant was selected;
  • a declaration that the list of variants is complete.

If someone hands over only the winner, or reconstructs the alternatives "more or less", or the history is incomplete, the right answer is NOT EVALUABLE — never false reassurance. Not knowing how many tests were run doesn't mean few were.

So the most useful practical advice is also the dullest: log everything you test. Every run, every parameter, and keep the returns of each variant. If you ever want your strategy validated, that log is worth more than any screenshot.

Honest limits

  • They can't see what isn't declared. We ask for the complete matrix of tested variants. If it is missing or incomplete, the result is not evaluable, and the report says so. But if you tried 300 things and declare 20, there's no way to tell: completeness is declared by whoever commissions the validation, and the report says so.
  • They're not a substitute for a real future period. DSR and PBO work on history. They tell you whether selection inflated the result; they don't turn the past into a prospective test.
  • They don't tell you whether the strategy is profitable. A high DSR with badly measured costs is still a problem. A low PBO doesn't either: it is a statement about relative rank, not about making money.

Avoiding the problem in the first place

The best defence isn't correcting at the end — it's testing less and deciding earlier. In our public RF100 case, the model was a fixed 300-tree Random Forest with no parameter search on the evaluation period. When an extension with new features was tested later, it was published as a second NO-GO, not as a "rescued" version. That's the opposite of trying until something works.

Where it fits in a validation

Our validation includes computing DSR and PBO via CSCV (16 blocks, 12,870 combinations) when they are applicable and evaluable — that is, when several variants were tried and the complete family is provided. It can also evaluate multiple-testing corrections (Bonferroni, Holm and Benjamini-Hochberg), walk-forward, Monte Carlo and a bias scanner. When something can't be evaluated, the report says so and explains what's missing, rather than hiding it. And, as always, the report can say "no".

These checks are part of a quantitative validation. Strateva validates stock, ETF, spot crypto and spot FX strategies, always unleveraged and without margin. We do not take work on CFDs, futures, perpetuals or options.

To check whether it fits, email stan@strateva.ai with the market (stocks, ETFs, crypto or FX, spot only), frequency, roughly how many variants you tried and whether you kept their results. Please don't send private code or passwords in a first message.


Educational and research content. Not investment advice. The 50-strategy simulation is our own and is illustrative (zero-mean random daily returns, 5 years, 2,000 repetitions; the mean of the best Sharpes was 1.00). Method references: Bailey and López de Prado, "The Deflated Sharpe Ratio" and "The Probability of Backtest Overfitting".

Related cases

RF100 — Can a Random Forest beat simple momentum?

All articles

CONTACT

Tell me about your strategy. I will say whether it fits within 48 business hours.

Tell me what you want checked, the asset, the frequency and what you have: rules, a report or code. I will tell you whether it fits and which plan it would be.

What to include in your email

  • Market, instruments and frequency (Spot only).
  • What you want checked, and the period.
  • Language and approximate code size, without pasting the code.
  • What data you have, and whether you need an NDA.

Do not send private code, keys or passwords.

stan@strateva.ai

Reply within 48 h (business days). No private material in the first message. No obligation to commission work.

Who replies

I am Filip Stanciu. I have an MSc in Quantitative Finance from the University of Alcalá, a degree in Finance from the Complutense University of Madrid, and a MiFID II certificate. I have worked in quantitative research for an asset manager, validating stock and ETF strategies. I read and reply to every email myself.

I am not a certification body and I am not a large team. I am one person, and I say so.

Nicolae Filip Stanciu