Systematic trading

Deflated Sharpe ratio calculator: is a backtest's Sharpe ratio real?

Systematic trading · Published 2026-11-13 · Updated 2026-11-13

A backtest with a Sharpe ratio of 1.5 looks impressive until you ask two questions: how long was the sample, and how many variations were tried before this one? This calculator answers both with the probabilistic Sharpe ratio and the deflated Sharpe ratio of David Bailey and Marcos López de Prado. Everything runs in your browser; nothing you type is sent anywhere.

Indicative estimate, not advice. The results are statistical estimates that rest on the assumptions set out under Method, sources and licence. A high deflated Sharpe ratio does not make a strategy profitable in the future, and costs, capacity and regime changes are not modelled.

The calculator

1. The backtest
Optional: compute these from a column of returns

Paste one periodic return per line (daily, weekly or monthly, matching the frequency below). A decimal comma is accepted. The fields below are then filled in for you.

Excess return over volatility, per year.
About 5.0 years.
0 for a normal distribution; negative when large losses dominate.
3 for a normal distribution; fat tails give more.
The level the strategy must beat; 0 means "any skill at all".
2. The search behind it
Strategies, parameter sets or variants tested, including discarded ones. 1 = no search.
Standard deviation of the annualised Sharpe ratios across those trials.
Sharpe ratio per period
–
Standard error of the annualised Sharpe ratio
–
Probabilistic Sharpe ratio, against the benchmark
–
Minimum track record length
–
Best annualised Sharpe expected from luck alone
–
Deflated Sharpe ratio
–

Enter values and press Calculate.

How to read the results

The two inputs in part 2 are the hardest to fill honestly. The number of trials should count every configuration you looked at, not only the ones you kept; when the trials are strongly correlated, for example neighbouring values of the same parameter, the number of truly independent ones is lower and can be estimated by clustering the trials' return series, as López de Prado describes. The spread of their Sharpe ratios can be computed directly from the trials if you logged them, which is a good reason to log them. Our article on building a strategy in the open explains why that record matters.

Worked examples

The table shows how the same headline Sharpe ratio fares as the search widens. All rows use daily returns. Figures computed with the formulas below; they are illustrations, not results of real strategies.

Probabilistic and deflated Sharpe ratio for illustrative backtests (benchmark 0)
Annual SharpeYearsSkewKurtosisTrialsSpread of trialsPSRLuck thresholdDSR
1.03031–0.95800.958
1.03−16100.710.9531.110.425
1.03−161000.710.9531.790.093
1.55−0.551000.710.9991.790.265
1.55−0.551,0000.710.9992.300.041
2.55−3101000.711.0001.790.900

The last row is the numerical example of Bailey and López de Prado (2014), with 1,250 daily returns, 250 trading days a year and a variance of 0.5 for the trials' annualised Sharpe ratios; the calculator reproduces their deflated Sharpe ratio of 0.90. A strategy that looks excellent on its own can fall well short once a hundred or a thousand discarded attempts are taken into account.

Method, sources and licence

With SR the Sharpe ratio per period (the annualised figure divided by the square root of the number of periods per year), n the number of returns, γ3 their skewness and γ4 their kurtosis, the calculator uses:

σ(SR) = √( (1 − γ₃·SR + (γ₄ − 1)/4 · SR²) / (n − 1) )
PSR(SR*) = Φ( (SR − SR*) / σ(SR) )
MinTRL = 1 + (1 − γ₃·SR + (γ₄ − 1)/4 · SR²) · ( zα / (SR − SR*) )²
SR₀ = √V · ( (1 − γ)·Φ⁻¹(1 − 1/N) + γ·Φ⁻¹(1 − 1/(N·e)) ), DSR = PSR(SR₀)

Φ is the standard normal distribution function, zα its quantile at the chosen confidence level, N the number of trials, V the variance of the trials' Sharpe ratios per period (the square of the spread you enter, divided by the periods per year), γ ≈ 0.5772 the Euler–Mascheroni constant and e Euler's number. The standard error is shown annualised. The first three formulas come from Bailey and López de Prado (2012), building on Andrew Lo's work on the statistics of Sharpe ratios; the last two from Bailey and López de Prado (2014). The formulas assume that returns are independent from one period to the next: with autocorrelated returns, Lo (2002) shows that annualising by the square root of time misstates the ratio.

When you paste returns, the calculator subtracts the risk-free rate divided by the number of periods per year, takes the mean over the sample standard deviation as the Sharpe ratio per period, multiplies it by the square root of the periods per year, and computes skewness and kurtosis as standardised third and fourth moments. The normal distribution function and its inverse use standard numerical approximations accurate to about seven significant digits, more than enough at the two decimals shown.

The calculator uses no external data set. Its code is part of this page, published on 13 November 2026 and checked against the numerical example of the 2014 paper on the same date; it may be reused freely. For the wider context, read our pieces on validation in financial machine learning and on combining strategies.