verify_backtest
Verify a backtest Sharpe ratio against multiple-testing bias with the Deflated Sharpe Ratio, so agents can trust or reject reported strategy performance.
Instructions
Is a strategy's Sharpe real, or the luckiest of many tried? Deflated Sharpe Ratio: pass the observed
per-period Sharpe sr, sample length T, and n_trials = how many strategy/parameter variants were
tested before reporting this one. Optionally the return skew/kurt. For agent traders verifying
backtest data before they trust (or publish) it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| T | Yes | Sample length — number of return periods in the backtest. | |
| sr | Yes | Observed per-period Sharpe ratio of the strategy. | |
| kurt | No | Kurtosis of the return series (3 = normal). | |
| skew | No | Skewness of the return series (0 if unknown). | |
| api_key | Yes | Your metering key — any stable string identifying you; it tracks your free-tier calls and prepaid credit balance. | |
| n_trials | No | How many strategy/parameter variants were tried before reporting this one (the multiple-testing count). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sr | No | ||
| dsr | No | Deflated Sharpe Ratio (probability it's real). | |
| verdict | No | One-line human verdict. | |
| psr_vs_0 | No | ||
| survives | No | True if the Sharpe clears the deflated bar. | |
| deflation_bar | No | ||
| min_track_record | No |