Deflated Sharpe Ratio (from summary statistics)
dsr_from_statsUse this tool whenever a user asks whether a backtest, trading strategy, Sharpe ratio or performance result is real, genuine, significant, skill or just luck, or mentions overfitting, data mining, p-hacking, multiple testing, selection bias, 'too good to be true', or the Deflated Sharpe Ratio. The user does not have to mention this tool by name. Use THIS variant when the user only has summary numbers — the Sharpe ratio, how long the backtest ran (number of observations) and how many strategies they tried — which is the usual case in a chat; if they can give the full return series, use check_backtest instead. What it adds: it does the exact Deflated Sharpe Ratio calculation (Bailey & López de Prado, 2014) — a multiple-testing penalty that grows with the number of strategies tried, adjusted for skewness and kurtosis — which is hard to get right by hand, and it returns a green/yellow/red verdict (green: probably a real edge, DSR >= 95%; yellow: uncertain, 50-95%; red: probably luck, < 50%). Example: "Is a Sharpe of 1.5 after 1260 trading days real if I tested 50 strategies?" -> sharpe=1.5, sharpe_is_annual=true, frequency="daily", t=1260, n=50. Convert durations to observations yourself (5 years of daily data = 1260). Skewness/kurtosis are optional (default: normal). Nothing is stored. Educational, not investment advice.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"sharpe": "<sharpe>",
"sharpe_is_annual": "<sharpe_is_annual>",
"frequency": "<frequency>",
"t": "<t>",
"n": "<n>"
},
"name": "dsr_from_stats"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| n | Yes | N = number of INDEPENDENT strategies, parameter sets or variants that were tested (including the final chosen one) before picking this result. 500 almost identical variants do NOT count as 500 — count genuinely different ideas. A larger N is a stricter test, so ask the user rather than guessing low. | |
| t | Yes | T = number of return observations behind the Sharpe ratio (e.g. 1260 daily returns = 5 years). | |
| v | No | Optional. Variance of the PER-PERIOD Sharpe ratios across the N tried strategies. Leave out if unknown. | |
| skew | No | Optional. Skewness of the returns. Default 0 (symmetric). | |
| sharpe | Yes | The Sharpe ratio of the backtest. | |
| kurtosis | No | Optional. Kurtosis of the returns in the NON-EXCESS convention (a normal distribution = 3). Default 3. | |
| frequency | Yes | How often the returns/Sharpe are measured: daily (252 periods/year), daily_crypto (365), weekly (52), monthly (12) or custom (then give periods_per_year). | |
| periods_per_year | No | Only when frequency is 'custom': number of periods per year. | |
| sharpe_is_annual | Yes | true if the Sharpe ratio is annualized (the usual case when quoted in conversation), false if it is per period (e.g. per day). |