Sweep 50 settings of a strategy and the best one will look good even if none of them work. The deflated Sharpe is the correction: it asks how good the best result has to be before it beats what luck alone would produce.

Parameter sweeps and the deflated Sharpe

A parameter sweep runs one strategy at many settings: lookbacks of 63, 126 and 252 days, holding 5, 10 or 20 names, rebalancing weekly or monthly. It is the fastest way to learn what a strategy depends on — and the fastest way to fool yourself.

The best of 50 problem

Suppose none of your 50 settings has any real edge. Each backtest still produces a Sharpe, scattered around zero by chance. The best of the 50 is simply the luckiest draw, and it will not look like zero — it will look like a discovery. The more settings you try, the higher the luckiest draw climbs, with no skill anywhere in sight. Reporting only the winner, as if it were the only test you ran, is the whole trick — usually played on yourself.

Two habits break it. First, count every trial: a sweep of 50 is 50 trials, and the count follows you. Second, judge the winner against the score luck alone would be expected to reach at that trial count. That judge is the deflated Sharpe.

What the deflated Sharpe computes

The deflated Sharpe is a probability between 0 and 1: the chance that the true Sharpe is above zero, after allowing for how many variants were tried, how long the record is, and how lumpy the returns are.

It starts from the Sharpe you would expect the best of N no-skill trials to reach by chance. With N trials and a record of n observations, the variance of a no-skill Sharpe estimate is V = 1 / (n − 1), and the expected maximum is:

SR0 = sqrt(V) × [ (1 − γ) × Φ⁻¹(1 − 1/N) + γ × Φ⁻¹(1 − 1/(N × e)) ]

where γ is the Euler–Mascheroni constant (about 0.5772), e is Euler's number, and Φ⁻¹ is the inverse of the standard normal distribution. SR0 grows with N: try more variants and the bar rises, exactly as it should.

The deflated Sharpe then measures how far your observed Sharpe (per period, SR) sits above that bar, in units that allow for the shape of your returns:

DSR = Φ( (SR − SR0) × sqrt(n − 1) / sqrt(1 − skew × SR + (kurt − 1) / 4 × SR²) )

Skew and kurt are the skewness and kurtosis of the returns: fat-tailed, lopsided returns make a Sharpe less trustworthy, so they widen the denominator and pull the score down. A DSR of 0.95 or more is the bar used in the Workspace checks for "likely real". A best-of-50 winner with a fine-looking Sharpe and a DSR of 0.6 is, in plain words, probably luck.

Reading a sweep honestly

A sweep answer should give you more than the winner. Look for the median Sharpe across the grid — if the median is weak, the strategy is weak and the winner is a spike. Look at the winner's neighbours: if the settings either side of the best score nearly as well, the result sits on a plateau and is far more believable than an isolated spike, where one exact setting shines and everything around it fails. And always read the winner's deflated Sharpe at the full trial count — every variant you have ever run on that key, not just this sweep.

How the Workspace does it

In the FinzData Alpha Factory (formerly FinzData Workspace), one `backtest_sweep` call runs the whole grid (up to 4 grid keys and 50 variants), records every variant as a trial before ranking, and returns the top 10 with the best variant's deflated Sharpe at your full trial count, the median Sharpe, the share of variants beating the benchmark, and a plain note on whether the best variant stands alone. The full table is saved, so the losers stay on the record too — a sweep you can audit, not a winner you have to take on faith.

FAQ

### Is a high Sharpe from a sweep ever believable?

Yes — when its deflated Sharpe at the full trial count is 0.95 or more, when its neighbours in the grid also score well, and when it survives the other checks: costs doubled, both halves of the period, and its own benchmark.

### Does recording trials punish exploring?

No. It prices exploring honestly. Ten well-chosen variants face a lower bar than 500 random ones — which is the correct incentive: think first, then test.

### What trial count does the deflated Sharpe use?

Every variant tried under your key, across all your sweeps and single backtests — not just the sweep in front of you. Deleting the losers from the count is the one move that makes the number meaningless, so the count is kept on the server, not by the person reporting the result.