Deflated Sharpe Ratio (DSR)
A high Sharpe ratio is not evidence of a real edge if it was selected from thousands of tested configurations. The Deflated Sharpe Ratio corrects this: it discounts an observed Sharpe for the number of trials run, the non-normality of the return distribution, and the length of the track record, yielding a statistically honest measure of whether the edge is real.
Module 5 — Backtesting Rigorously: Backtesting Pitfalls (pillar) · Walk-Forward Analysis · Deflated Sharpe Ratio ← you are here · CPCV · Survivorship Bias · Look-Ahead Bias
See also: Sharpe Ratio (the base metric this corrects)
The Problem: Sharpe Ratios Are Inflated by Multiple Testing
Suppose you run 1,000 strategy configurations on the same historical dataset and report the best Sharpe ratio. Even if all 1,000 configurations have a true Sharpe of zero — no edge at all — the expected maximum Sharpe from 1,000 random trials is not zero. By the statistics of order statistics, you should expect a spuriously impressive maximum. The exact value depends on the return distribution, but Bailey, Borwein, López de Prado, and Zhu showed in 2014 that for 1,000 independent trials, the expected maximum is often well above 1.0 even when the true distribution has zero mean.
This means any observed Sharpe ratio from a grid search or parameter sweep carries information about the search process that inflates its statistical meaning. A Sharpe of 1.5 from a single strategy tested once means something very different from a Sharpe of 1.5 selected from 1,000 configurations. The standard Sharpe ratio cannot distinguish these cases. The Deflated Sharpe Ratio was introduced precisely to make this adjustment explicit and quantitative.
The Three Adjustment Factors
The DSR (and its companion, the Probabilistic Sharpe Ratio) corrects the observed Sharpe for three sources of inflation:
- Trial count. As the number of strategy configurations tested increases, the expected maximum Sharpe from chance alone increases. The DSR applies a correction that grows with the log of the number of trials.
- Non-normality. Financial returns exhibit negative skewness (more extreme negative returns than positive) and excess kurtosis (fat tails). Sharpe ratios computed on non-normal returns are overestimated relative to a normal benchmark because the denominator (standard deviation) underestimates tail risk. The DSR applies the Cornish-Fisher correction for skewness and kurtosis.
- Track length. A Sharpe of 1.0 computed over 20 observations is statistically very uncertain; the same Sharpe computed over 2,000 observations is much more reliable. The DSR scales the adjustment for the length of the track record.
DSR and PSR: The Formula (Plain Language)
The Probabilistic Sharpe Ratio (PSR) is the probability that the true Sharpe ratio exceeds a benchmark value SR* given the observed Sharpe, the distribution parameters (skewness, kurtosis), and the number of observations T:
The Deflated Sharpe Ratio takes PSR and further corrects for the number of trials N by adjusting the benchmark SR* upward to the expected maximum Sharpe from N trials:
The full formulas, including the Cornish-Fisher expansion and the Gaussian-expected-maximum term, are given in Bailey & López de Prado (2014), SSRN 2460551.
Worked Example: The Deflation in Practice
Suppose a daily strategy has an observed annualized Sharpe of 1.5, computed over 252 trading days (T = 252 observations). The return distribution has mild negative skew (skewness = −0.3) and moderate excess kurtosis (kurtosis = 0.5). The researcher tested 500 parameter combinations to find this champion.
- Raw Sharpe: 1.5 — looks excellent.
- PSR (no trial correction): ~0.93 (93 percent confidence the true Sharpe > 0, adjusted for non-normality and T = 252 — the observed Sharpe sits about 1.5 standard errors above zero).
- Expected max Sharpe from 500 trials (Gaussian): the expected maximum of 500 independent zero-edge trials is roughly 3.1 standard deviations of the trial distribution above zero — for this search, roughly an annualized Sharpe of ~2.0 from noise alone.
- DSR: PSR evaluated at SR* = 2.0. With a raw Sharpe of 1.5 and the benchmark at 2.0, DSR ≈ 0.31 — only 31 percent confidence the edge is real.
This illustrates why testing many configurations without reporting the trial count is a form of statistical dishonesty. The same 1.5 Sharpe from a single committed strategy is statistically significant; selected from 500 configurations, it can no longer be distinguished from a lucky draw.
Minimum Backtest Length (MinBTL)
The Minimum Backtest Length is the inverse question: given N trials and a desired confidence level, how many observations T does the backtest need to be statistically credible? MinBTL increases with N (more trials require a longer track record to be credible) and decreases with the observed Sharpe (a higher Sharpe requires less data to be statistically meaningful). As a rule of thumb, 252 observations (one year of daily data) is often insufficient when N is in the hundreds; 504–756 observations (two to three years) is a more robust minimum for moderately large searches.
Computing DSR in Python
The pypbo library (github.com/esvhd/pypbo) implements DSR, PSR, MinBTL, and PBO in Python. Install via pip and call the relevant function with your Sharpe estimate, return series moments, and trial count. López de Prado's Advances in Financial Machine Learning (AFML, ch. 14) provides the derivation and includes Python pseudocode. The SSRN paper (2460551) includes worked numerical examples that can be validated against any implementation.
Frequently Asked Questions
- What is the Deflated Sharpe Ratio?
- The Deflated Sharpe Ratio (DSR), introduced by Bailey and López de Prado in 2014, discounts an observed Sharpe ratio for the number of strategy trials tested, the non-normality of returns (skewness and kurtosis), and the length of the track record. It answers: given that this observed Sharpe was selected from N tested configurations over T periods, what is the probability that the true Sharpe exceeds a reference value (typically zero)? A strategy selected from 1,000 trials with an observed Sharpe of 1.5 may deflate to a DSR near zero — meaning there is no statistical confidence that the strategy has any real edge. The companion metrics are the Probabilistic Sharpe Ratio (PSR) and the Minimum Backtest Length (MinBTL).
- How does the number of trials affect the Deflated Sharpe Ratio?
- Each trial in a strategy search represents an opportunity to discover a high Sharpe by chance alone. With enough trials, any dataset will yield configurations with impressive observed Sharpe ratios — even if the underlying edge is zero. The DSR applies a correction factor that grows with the trial count: as the number of tested configurations increases, the expected maximum Sharpe from random sampling also increases, and the DSR discount grows accordingly. A single strategy tested once with an observed Sharpe of 1.5 has a high DSR. The same 1.5 Sharpe selected from 1,000 configurations has a much lower DSR — potentially below the threshold of statistical significance. This is why p-hacking is so dangerous: each optimization run or parameter tweak is a new trial.
- What is the Minimum Backtest Length (MinBTL)?
- The Minimum Backtest Length (MinBTL) is the shortest backtest duration required for an observed in-sample Sharpe ratio to be statistically unlikely to arise by chance, given the number of trials performed. It is a companion to the DSR: the DSR measures whether an observed Sharpe is credible given the trial count; MinBTL tells you how long your backtest must be for any observed Sharpe to be credible. If you tested 100 configurations and want to claim a Sharpe of 1.0 is statistically meaningful, the MinBTL formula tells you the minimum number of observations required. If your backtest is shorter than MinBTL, the result is statistically inconclusive regardless of the observed Sharpe.
- How do I compute the Deflated Sharpe Ratio in Python?
- The pypbo library (github.com/esvhd/pypbo) implements DSR, PSR, and related statistics in Python. Install with pip and call the psr or dsr functions with your observed Sharpe, number of trials, skewness, kurtosis, and sample length. For manual computation: the PSR is the normal CDF applied to a z-statistic that adjusts the observed Sharpe for non-normality (via the Cornish-Fisher approximation) and track length. The DSR adds a trial-count correction derived from the expected maximum Sharpe ratio over N independent trials. The formulas are given in full in Bailey and López de Prado 2014 (SSRN 2460551), which includes worked numerical examples.
- What is a practically meaningful Deflated Sharpe Ratio?
- A DSR above 0.95 (95 percent confidence that the true Sharpe exceeds zero) is the conventional threshold for claiming statistical significance. In practice, strategies from retail systematic research rarely achieve this without long track records and very few tested configurations. A more useful frame: the DSR is not a pass/fail gate but a communication tool. If your DSR is 0.6, it tells you that 40 percent of the time, a strategy with this observed Sharpe selected from this many trials would be noise. Use this to calibrate your confidence, size the strategy smaller during incubation, and commit to a longer paper-trading period before full deployment.
Drill Sharpe ratio statistics, DSR mechanics, and backtesting rigor with AlgoDrill's spaced-repetition flashcards.
Start Flashcards → View Reading List →