deflated_sharpe_ratio

Defined in fynance.research

deflated_sharpe_ratio(sr, n_obs, n_trials, *, skew=0.0, kurt=3.0, sr_variance=1.0)[source]

Deflated Sharpe ratio (DSR).

The PSR against a benchmark set to the expected maximum Sharpe of n_trials independent strategies — i.e. the probability the edge survives the multiple testing implied by trying n_trials strategies.

Parameters:
srfloat

Observed per-observation (non-annualized) Sharpe ratio of the selected strategy. An annualized Sharpe must be divided by sqrt(period) first, or the DSR saturates to ~1.

n_obsint

Number of return observations.

n_trialsint

Number of strategy configurations tried.

skew, kurtfloat

Skewness / kurtosis of the selected strategy’s returns.

sr_variancefloat

Variance of the (per-observation) Sharpe estimates across the trials. The default 1.0 is a conservative placeholder — it overstates the expected-maximum benchmark and so understates the DSR; pass the empirical variance of the trial Sharpes whenever available (as fynance.research.Ledger.deflated_sharpe does).

Returns:
float

DSR in [0, 1]. Low values flag a likely overfit selection.