Free tool
Deflated Sharpe ratio calculator
A backtest Sharpe ratio looks better the more variants you try. This calculator applies the deflated Sharpe ratio from Bailey and López de Prado to answer one question: after the search you ran, how likely is it that this Sharpe is real and not just the luckiest variant?
The best variant's Sharpe, as your report shows it.
Bars of returns in the test. 3 years of daily bars ≈ 1,095.
365 daily crypto · 8,760 hourly crypto · 252 daily stocks.
0 if returns were normal. Most strategies are negative.
Non-excess: 3 if normal. Crypto is usually well above 3.
Every parameter set or rule change you tested, honestly counted.
Standard deviation of the annualised Sharpes across those variants.
76.8%
Deflated Sharpe ratio · Not proven
The Sharpe beats the luck benchmark, but not with confidence. Test on unseen data or a longer history before trusting it.
- Probabilistic Sharpe
- 99.9%
- Confidence the Sharpe is above 0, ignoring the search.
- Luck benchmark
- 1.37
- Annualised Sharpe the best of N skill-less variants would reach by chance.
- Track record for 95%
- 5,544
- Observations needed to be 95% sure the edge beats the benchmark.
Runs entirely in your browser. Nothing you type is sent anywhere.
What is the deflated Sharpe ratio?
Test fifty versions of a strategy that has no edge and the best of them will still show an impressive Sharpe ratio, purely by chance. The deflated Sharpe ratio (DSR) corrects for that. It raises the bar from “is the Sharpe above zero?” to “is the Sharpe above what the best of N skill-less variants would have reached?”, and it widens the uncertainty for short track records and for returns that are skewed or fat-tailed — which crypto returns almost always are.
The result is a probability between 0% and 100%. It comes from three formulas:
SR₀ = √V · [ (1 − γ)·Φ⁻¹(1 − 1/N) + γ·Φ⁻¹(1 − 1/(N·e)) ] PSR(SR*) = Φ( (SR − SR*) · √(T − 1) / √(1 − γ₃·SR + (γ₄ − 1)/4 · SR²) ) DSR = PSR(SR₀)
Here SR is the per-period Sharpe ratio (the calculator de-annualises yours), T the number of return observations, γ₃ the skewness, γ₄ the kurtosis (3 for a normal distribution), N the number of variants tried, V the variance of their Sharpe ratios, Φ the standard normal distribution and γ ≈ 0.5772 the Euler–Mascheroni constant. SR₀ is the “luck benchmark” the calculator reports.
How to fill in each input
| Input | Where it comes from |
|---|---|
| Sharpe ratio | The annualised Sharpe of the variant you kept, from your backtest report. |
| Observations and periods per year | The return series the Sharpe was computed on. Daily returns over three years of crypto are about 1,095 observations at 365 per year (crypto trades every day). |
| Skewness and kurtosis | Computed from the same return series (e.g. scipy.stats.skew and kurtosis(fisher=False)). If you don’t have them, 0 and 3 assume normal returns — an optimistic assumption for crypto. |
| Variants tried | Every configuration you looked at before choosing this one. Count high when unsure. |
| Spread of their Sharpes | The standard deviation of those variants’ annualised Sharpe ratios. Wider spreads raise the luck benchmark. |
How to read the result
Above 95%, the edge is unlikely to be an artefact of your search. Between 50% and 95% it is not proven: get more data or test on a window you never tuned against. Below 50%, a skill-less search of the same size would usually have found something at least as good, so treat the result as noise. The “track record for 95%” figure tells you how many observations it would take to be confident, given everything else stays the same.
A deflated Sharpe ratio is a filter, not a forecast. Passing it says your history is unlikely to be a fluke; it does not say the edge will continue. For that you need out-of-sample evidence — see walk-forward analysis and backtest overfitting.
Doing this automatically in Spera
Counting your own trials honestly is the hard part. In Spera, a research study records every idea you try for one question — deep runs, quick runs and every branch of a sweep — and its “after the search” reading names the Sharpe that luck alone would have produced for a search that size, and how often yours clears it. Close variations of one idea count as less than one idea; genuinely different ideas count fully.
FAQ
What is a good deflated Sharpe ratio?
The DSR is a probability, so read it like a confidence level. Above 95% means the Sharpe is unlikely to be the luck of picking the best of many variants. Between 50% and 95% is not proven either way. Below 50% means a skill-less search of that size would usually produce a result at least this good.
How do I count the number of trials?
Count every variant whose result you looked at before choosing this one: each parameter set in a sweep, each rule you added and removed, each coin or timeframe you tried. Near-identical variants overlap, so a big grid of tiny parameter steps is fewer independent trials than its raw size; genuinely different ideas each count fully. When unsure, count high.
Why does skewness and kurtosis matter?
The Sharpe ratio assumes returns are roughly normal. Crypto strategy returns usually have fat tails (kurtosis well above 3) and often negative skew: many small wins and rare large losses. Both make a measured Sharpe less reliable, so the calculator widens the uncertainty to match.
Is the deflated Sharpe ratio the same as the probabilistic Sharpe ratio?
No. The probabilistic Sharpe ratio (PSR) asks whether one Sharpe is above zero given its track-record length and return shape. The deflated Sharpe ratio is the PSR measured against a higher bar: the Sharpe the best of N skill-less variants would reach by luck alone.
Does a high deflated Sharpe ratio mean the strategy will make money?
No. It only says the historical result is unlikely to be a statistical fluke of your search. Markets change, costs change, and a real past edge can decay. Confirm it out of sample and on paper before risking money. Nothing on this page is investment advice.
Sources
- Bailey & López de Prado (2014), “The Deflated Sharpe Ratio: Correcting for Selection Bias, Backtest Overfitting and Non-Normality”, Journal of Portfolio Management
- Bailey & López de Prado (2012), “The Sharpe Ratio Efficient Frontier”, Journal of Risk — the Probabilistic Sharpe Ratio
- Bailey, Borwein, López de Prado & Zhu (2017), “The Probability of Backtest Overfitting”, Journal of Computational Finance
Backtests describe the past; they don’t promise future results. Nothing on this page is investment advice.