Skip to main content
aifinhub

Worked example

Running the shipped deflated-sharpe-ratio engine on the input below produces exactly this output. Continuous integration recomputes it against the engine bundle on every build, so these numbers cannot drift from the code.

Input

{
  "tool": "deflated-sharpe-ratio",
  "observed_sr": 1.5,
  "n": 252,
  "skew": -0.4,
  "kurt": 3,
  "num_trials": 100,
  "periods_per_year": 252
}

Output

{
  "psr": 0.15567084965284061,
  "z": -1.012410796223196,
  "maxExpectedSr": 2.5356389255626124,
  "effectiveBenchmark": 2.5356389255626124,
  "deflatedSr": -1.0356389255626124
}

Frequently asked questions

What does the Deflated Sharpe Ratio methodology page document?
Formulas, derivation, and reference paper for the AI Fin Hub Deflated Sharpe Ratio calculator (Bailey & López de Prado 2014). It states the formulas, assumptions, data sources, limitations, and reproducibility steps behind the Deflated Sharpe Ratio, in the Finance category.
When was the Deflated Sharpe Ratio methodology last reviewed?
This methodology was last reviewed on 2026-05-08. The matching tool is at https://aifinhub.io/deflated-sharpe-ratio/.
Are the Deflated Sharpe Ratio numbers reproducible?
Yes. This page embeds a worked example whose output is the verbatim result of running the shipped deflated-sharpe-ratio engine on a fixed input; the embedded JSON is recomputed and diffed against the engine in CI, so the numbers cannot drift from the code.

Methodology · Tool · Last updated 2026-05-08

How Deflated Sharpe Ratio works

How the Deflated Sharpe Ratio Calculator applies Bailey & López de Prado (2014) to correct an observed Sharpe for multiple-testing.

What problem this solves

An observed Sharpe ratio looks impressive in isolation. After K trials of a backtest grid, the maximum observed Sharpe is biased upward by selection. Deflated Sharpe Ratio (DSR) corrects this bias and reports the probability the underlying skill is positive.

Probabilistic Sharpe Ratio (PSR)

Equation 2 of Bailey-López (2014). For an observed annualized Sharpe SR_obs, n observations, sample skew γ₃, and sample kurtosis γ₄:

z = (SR_obs − SR_*) · √(n − 1) / √(1 − γ₃·SR_obs + ((γ₄ − 1) / 4) · SR_obs²)
PSR(SR_*) = Φ(z)

PSR is the probability that the true Sharpe exceeds the benchmark SR_*.

Maximum Sharpe under the null

For K independent trials with true Sharpe = 0, the expected maximum observed Sharpe is approximated by:

E[max] ≈ (1 − γ_E) · Φ⁻¹(1 − 1/K) + γ_E · Φ⁻¹(1 − 1/(K·e))

where γ_E ≈ 0.5772 is the Euler-Mascheroni constant. This bracketed term is the expected maximum of K independent standard normals — a dimensionless extreme-value quantity, not itself a Sharpe. To form the benchmark SR_*, the calculator multiplies it by the standard error of the Sharpe estimator, √(periods_per_year / (n − 1)), so SR_* = E[max] · √(periods_per_year / (n − 1)). Treating the bare bracket as a Sharpe skips that scaling and inflates the benchmark by roughly √(n − 1).

Deflated Sharpe Ratio

DSR = PSR computed against the deflated benchmark E[max]:

DSR = PSR(SR_obs; SR_* = E[max])

Output as a probability between 0 and 1. Above 95% means the observed Sharpe survives the multiple-testing haircut at the 5% level.

References

  • Bailey, D. H., López de Prado, M. (2014). "The Deflated Sharpe Ratio: Correcting for Selection Bias, Backtest Overfitting and Non-Normality." Journal of Portfolio Management 40(5): 94–107. DOI: 10.3905/jpm.2014.40.5.094.
  • Bailey, D. H., López de Prado, M. (2012). "The Sharpe Ratio Efficient Frontier." Journal of Risk 15(2): 3–44.

Limitations

  • K-trial estimate assumes independent trials. Correlated grid searches need a smaller effective K (Bailey-López appendix).
  • Sample skew and kurtosis are noisy with n < 250; the resulting z-statistic widens accordingly.
  • Annual conversion uses √(periods/year). Assumes i.i.d. returns; serial correlation overstates the sample size.

External resources