Check a backtest (from returns)
check_backtestUse 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 can provide the actual per-period return series (e.g. daily returns); if they only know summary numbers (Sharpe, number of observations, strategies tried), use dsr_from_stats 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%). It also computes the Sharpe ratio, skewness and kurtosis from the real returns and returns a signed link to a result page anyone can verify. N (number of independent strategies tried) is required: ask the user if they did not say. The return series is processed in memory and never 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": {
"returns": "<returns>",
"frequency": "<frequency>",
"n": "<n>"
},
"name": "check_backtest"
}
}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. | |
| v | No | Optional. Variance of the PER-PERIOD Sharpe ratios across the N tried strategies. Leave out if unknown (it is then estimated as 1/(T-1)). | |
| returns | Yes | Returns per period as DECIMALS (0.012 = +1.2%), oldest first. Not percentages. Needs at least 2 values; 60+ is recommended. | |
| 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. |