Deflated Sharpe ratio calculator
You tried a hundred variants and kept the best one. Its Sharpe is not the Sharpe you found — it is the best of a hundred draws. This computes the Deflated Sharpe ratio (Bailey & López de Prado, 2014): the probability that the winner's edge is real once the search that produced it is priced in.
Why a searched Sharpe needs deflating
Run a hundred parameter sets on pure noise and one of them will look brilliant. That is not a flaw in the data — it is what "best of a hundred" means. The Deflated Sharpe ratio makes the cost explicit in two steps:
- Work out SR₀, the Sharpe the best of N independent noise trials would post on its own, from how many things you tried and how widely their Sharpes were spread.
- Ask, given your sample length and the shape of your returns, how probable it is that the true Sharpe exceeds that bar. That probability is the Deflated Sharpe ratio.
SR₀ = σ(SR) × [ (1−γ)·Φ⁻¹(1−1/N) + γ·Φ⁻¹(1−1/(N·e)) ]
DSR = Φ( (SR − SR₀)·√(n−1) ÷ √(1 − skew·SR + (kurt−1)/4·SR²) )
γ is the Euler–Mascheroni constant (0.5772…), n the number of observations, and the Sharpes enter the second line per-observation. The engine behind this site uses these exact formulas — this page is the same arithmetic with the numbers typed in by hand.
How to read the result
- 95% or more — the edge survives the search. Not proof it will repeat, but the number is no longer explainable by how hard you looked.
- 90–95% — borderline. Treat it as unproven rather than as proven: one more round of tuning would push it back below the line.
- Below 90% — indistinguishable from the best of N lucky draws. A higher raw Sharpe will not fix this; fewer trials or more data will.
The lever people forget is N. Going from 20 trials to 2,000 raises the hurdle substantially even though nothing about the strategy changed — and every abandoned variant counts, not just the ones you wrote down.
The two inputs people get wrong
The number of trials is every configuration you evaluated, including the ones you discarded early and the ones you tried last week on the same idea. Selection bias does not care whether you kept a record.
The spread of Sharpe across trials is the dispersion you actually observed. Careful here: an adaptive search (Bayesian, TPE) deliberately clusters its samples around the optimum, so the observed spread understates the real one — which shrinks SR₀ and under-deflates exactly the search that overfits most. When in doubt use a wider spread, not a narrower one. Half a Sharpe point is a reasonable starting guess for a grid over a single idea.
Frequently asked questions
Is a Deflated Sharpe ratio of 100% possible?
It rounds there, but it is a probability and never truly reaches one. A very high value means the observed Sharpe is far above what the best of N noise trials could produce over a sample that long. It still says nothing about the future — only that the past is not explained by the search.
What if I only ran one backtest?
With N = 1 there is nothing to deflate, and the right statistic is the Probabilistic Sharpe ratio against a benchmark of zero. Be honest about N though: if you looked at a chart, adjusted a parameter and looked again, you ran more than one trial.
Why does my Sharpe of 2 fail while a Sharpe of 1.2 passes?
Usually sample length or trial count. A Sharpe of 2 over eighteen months of data after a thousand-combination sweep clears a much higher bar than a Sharpe of 1.2 over fifteen years after trying five things. The formula prices both.
Does this replace out-of-sample testing?
No, and it is not meant to. Deflation corrects a number you already have; walk-forward earns a new one on data the search never saw. They fail differently, which is exactly why the verdict in the app needs both.