How to use the deflated Sharpe ratio calculator
The page has two tools. Probabilistic Sharpe tests a single track record. Deflated Sharpe tests a strategy that was chosen from many backtests.
- Choose how to describe the strategy. Enter the statistics directly, or paste the return series and let the calculator estimate the Sharpe ratio, skewness and kurtosis.
- Enter the observed Sharpe ratio per period, not annualized, together with the number of returns. An annualized 1.0 from monthly data is about 0.289 per month.
- Enter skewness and kurtosis. Kurtosis here is the standardized fourth moment, not excess kurtosis, so normal returns have 3 and fat-tailed returns more. Skewness is 0 for symmetric returns and negative for strategies that earn small, steady gains and suffer occasional large losses.
- Probabilistic Sharpe: set the benchmark Sharpe ratio (0 tests for any skill at all) and the confidence level for the minimum track record length.
- Deflated Sharpe: enter the number of effectively independent trials and the variance of their Sharpe ratios, both from your research log.
The formulas
The denominator is the standard error of the Sharpe ratio when returns are independent but not normal, a result building on Lo (2002) and Mertens (2002). Negative skewness and high kurtosis both enlarge it, so the same Sharpe ratio proves less.
DSR = PSR(SR0)SR0 is the expected maximum Sharpe ratio of N independent trials whose true Sharpe ratio is zero, V the variance of the trials' Sharpe ratios, γ ≈ 0.5772 the Euler–Mascheroni constant and e ≈ 2.718. Bailey and López de Prado (2014).
The calculator evaluates Φ with a double-precision rational approximation and Φ−1 with Acklam’s algorithm plus one refinement step, so the results agree with standard statistical software to many decimal places.
A worked example
A backtest of 60 periods monthly returns shows a Sharpe ratio of 0.25 per month, or 0.87 annualized. The returns are negatively skewed (-0.8) with a kurtosis of 5.
Probabilistic Sharpe. Against a benchmark of zero, the standard error of the monthly Sharpe ratio is 0.146, and the PSR is 95.6%: just above the 95% bar. With normal returns it would have been 97.1%. The minimum track record length at 95% is 56 months, about 4.6 years.
Deflated Sharpe. Now suppose this was the best of 50 variants whose monthly Sharpe ratios had a variance of 0.005. The best of 50 skill-less variants would be expected to show an annualized Sharpe ratio of 0.56 by luck. Measured against that benchmark, the deflated Sharpe ratio is 72.9%. To reach 95%, the same record would need an annualized Sharpe ratio of about 1.47.
Why the number of trials matters so much
Run enough backtests on noise and one of them will look excellent. The expected maximum grows with the number of trials, slowly but without limit, so a Sharpe ratio that would be convincing as a single pre-registered test can be unremarkable as the winner of a search. With the example’s spread of trial results:
| Trials tried | Luck benchmark (annualized Sharpe) | Deflated Sharpe ratio |
|---|---|---|
| 10 | 0.39 | 82.8% |
| 50 (example) | 0.56 | 72.9% |
| 200 | 0.68 | 64.5% |
| 1,000 | 0.80 | 55.4% |
The variance V matters as much as N: the benchmark scales with √V. A search over wildly different strategies produces a wide spread of Sharpe ratios and a high luck benchmark; a search over minor parameter tweaks produces a narrow spread, but those trials are also highly correlated, so they count as fewer independent tries.
What changes the answer most
- Track record length. The test statistic grows with √(n − 1). Doubling the record to 120 months lifts the deflated Sharpe ratio from 72.9% to 80.6%, with the same Sharpe ratio.
- Return shape. Negative skewness and fat tails raise the minimum track record from 3.8 years to 4.6 years in the example. Strategies that sell volatility deserve the strictest treatment, because their Sharpe ratios look best just before the losses arrive.
- The benchmark. Testing against a hurdle instead of zero is a stronger claim. A benchmark of 0.1 per month cuts the example’s PSR to 84.7%.
- Honest trial counts. Underreporting N is the most common way to inflate a backtest. Log everything tried, including ideas dropped early.
How to read PSR and DSR
Both are probabilities, not ratios: 95% means that, under the model’s assumptions, the observed result would be unlikely if the true Sharpe ratio were at or below the benchmark. A DSR below 50% means the strategy did no better than the best of N random trials would be expected to. The figures are a screen, not a verdict: a high DSR does not protect against look-ahead bias, unrealistic costs or a market regime that has ended. For a direct, data-driven estimate of how often the in-sample winner disappoints out of sample, use the probability of backtest overfitting; to compare in-sample and out-of-sample returns, use the walk-forward efficiency calculator.
What this calculator does not include
- Serial correlation. The formulas assume returns are independent from one period to the next. Autocorrelated returns, common with illiquid assets and smoothed prices, make the true standard error larger than shown.
- Sampling error in the moments. Skewness and kurtosis estimated from a few dozen returns are themselves very uncertain, and one extreme month can move them a lot.
- The small-N approximation. The expected-maximum formula is an asymptotic approximation. Checked against exact values, it is within about 3% from five trials upward, but it understates the expected maximum of two trials by about 8%.
- Trial correlation. The calculator takes N as given; estimating the effective number of independent trials is up to you.
- Costs and implementation. The Sharpe ratio is only as good as the backtest behind it. The Sharpe ratio calculator computes it from a return series.