Edgoro
Planning · Free tool

Deflated Sharpe Ratio Calculator

Test whether your best backtest beats luck: the Sharpe ratio expected from N random tries, the probabilistic and deflated Sharpe ratios, and the data needed.

Returns measured
Spread of Sharpe ratios across your tries
Deflated Sharpe ratio
52.6%
Verdict at 95%Could be luck
Best Sharpe expected from luck (100 tries)1.46
Probabilistic Sharpe, as a single test99.5%
Return observations756

Data needed for 95% confidence

As a single test1.2 years
After 100 tries7.8 years

Bailey and López de Prado (2014). The deflated Sharpe ratio is the probability that the true Sharpe ratio beats the best one you would expect from luck after that many tries. It treats the tries as independent; similar settings are partly the same test, so the real penalty sits between this and a single test.

Trading involves substantial risk of loss and is not suitable for every investor. Edgoro is a software tool, not a broker or financial adviser: nothing it produces is investment advice, and past or backtested performance does not guarantee future results.

What the deflated Sharpe ratio answers

If you test enough strategies, one of them will look good by luck. That's not a figure of speech: among 100 strategies with no edge at all, the best one's Sharpe ratio over three years of daily data is expected to be about 1.46. So a Sharpe of 1.5 found after 100 tries is barely better than what pure noise produces.

The deflated Sharpe ratio, from a 2014 paper by David Bailey and Marcos López de Prado, puts a number on this. It is the probability that the true Sharpe ratio of your best strategy is higher than the best one luck alone would give after the same number of tries. A value above 95% means the result is unlikely to be a fluke of the search. A value around 50% means you can't tell it apart from the best of N coin flips.

How to use it

  1. Enter the annualized Sharpe ratio of the strategy you picked.
  2. Enter how many strategies, settings or variants you tried before picking it. Be honest: every parameter set in an optimization counts.
  3. Enter the length of the backtest and how often returns are measured.
  4. Optional: enter the skewness and kurtosis of the strategy's returns (0 and 3 for a normal distribution). Fat tails make a Sharpe ratio less reliable.
  5. If you know how spread out the Sharpe ratios of all your tries were, choose I measured it and enter their standard deviation. Otherwise the calculator assumes your tries had no skill, which is the standard null case.

The formulas

The calculator works with the Sharpe ratio per period (SR = annual Sharpe ÷ √periods per year) and T return observations.

probabilistic Sharpe  PSR(SR*) = Φ( (SR − SR*) × √(T − 1) ÷ √(1 − skew × SR + (kurt − 1) ÷ 4 × SR²) )

luck Sharpe           SR0 = σ × [ (1 − γ) × Φ⁻¹(1 − 1/N) + γ × Φ⁻¹(1 − 1/(N × e)) ]
                      σ  = spread of the tries' Sharpe ratios (1/√(T − 1) with no skill)
                      γ  = 0.5772 (Euler–Mascheroni constant)

deflated Sharpe       DSR = PSR(SR0)

PSR(0) asks whether the Sharpe ratio beats zero as a single test. DSR asks the same question against the luck Sharpe. The bracket is an approximation of the expected maximum of N standard normal draws; it is good for N of 10 or more and rough for two or three tries.

Worked example

A strategy shows an annualized Sharpe ratio of 1.5 on 3 years of daily data (756 trading days), with roughly normal returns. It was the best of 100 parameter sets.

  • Sharpe per day: 1.5 ÷ √252 = 0.0945
  • As a single test, PSR(0) = 99.5%. It looks solid.
  • Luck Sharpe after 100 tries: (1/√755) × 2.531 = 0.0921 per day, 1.46 annualized
  • Deflated Sharpe ratio: 52.6%, close to a coin flip

As a single test, this Sharpe would need 1.2 years of data to be significant at 95%. After 100 tries, it needs about 7.8 years. The extra data is the price of the search.

How lucky can a backtest get?

Best annualized Sharpe ratio expected from N strategies with no edge, on daily data (252 days a year), from the formula above:

Backtest length10 tries100 tries1,000 tries
1 year1.582.543.26
3 years0.911.461.88
5 years0.701.131.46
10 years0.500.801.03

A one-year backtest that picked the best of 100 variants should show a Sharpe of about 2.5 even if none of them works. An optimizer that tests 1,000 settings will find a Sharpe above 3 on one year of noise.

What counts as a try

  • Every parameter combination an optimizer evaluates.
  • Every indicator, filter or timeframe you swapped in and out by hand.
  • Every market you tested the idea on before keeping the ones that worked.
  • Ideas you abandoned after looking at the backtest.

Similar settings are partly the same test (a 20-period and a 21-period average trade almost alike), so the effective number of independent tries is smaller than the raw count. The calculator treats tries as independent, so the true penalty sits somewhere between its answer and a single test. Use the raw count for a cautious answer, or a smaller number if your variants were very alike.

Where to get skewness and kurtosis

Export the strategy's daily (or weekly) returns and compute them in a spreadsheet: SKEW() gives skewness; KURT() gives excess kurtosis, so add 3. Trend-following systems that sit in cash often show positive skew and very high kurtosis, because most days are flat and a few are large. High kurtosis widens the uncertainty around the Sharpe ratio.

Limits

  • It tests the Sharpe ratio, not the strategy. Costs, fills and look-ahead bugs must already be right in the backtest.
  • It assumes returns are independent from one period to the next.
  • A high deflated Sharpe ratio says the result is unlikely to be luck from the search. It doesn't say the edge will survive a change of market regime.

The companion guide, walk-forward analysis and out-of-sample testing, runs a real example on Bitcoin and puts the result through this calculator. For annualized Sharpe and Sortino ratios from a list of returns, use the Sharpe ratio calculator.

Frequently asked questions

What is a deflated Sharpe ratio?

It is the probability that a strategy's true Sharpe ratio is higher than the best Sharpe ratio you would expect from luck after testing the same number of strategies. It corrects the Sharpe ratio for the number of tries, the length of the backtest and the shape of the returns (Bailey and López de Prado, 2014).

What is a good deflated Sharpe ratio?

Researchers usually ask for 95% or more before calling a result significant. Around 50% means the strategy is no better than the best of the same number of random strategies.

What is the difference between the probabilistic and the deflated Sharpe ratio?

The probabilistic Sharpe ratio tests one strategy against a Sharpe of zero, as if it were the only one you ever tried. The deflated Sharpe ratio tests it against the luck Sharpe expected from all the strategies you tried, so it is always lower when you tried more than one.

How many trials should I enter?

Every strategy, parameter set or variant you evaluated before choosing this one, including ideas you dropped. Very similar settings are partly the same test, so the raw count gives a cautious answer.

Why does a longer backtest help?

The luck Sharpe shrinks with the square root of the number of observations. With more data, random strategies have less room to look good, so a real edge stands out more clearly.

Related guides

All guides
All free tools

Let AI build the indicator behind your numbers.

Turn the rules you just calculated into a TradingView indicator, an MT5 bot or a crypto bot. Instant access, with a 7-day money-back guarantee.