Strategy audit and overfitting check
strategy_auditAn independent performance auditor for a trading strategy or backtest. From a trade list and/or periodic returns it computes win rate, expectancy, profit factor, streaks, Sharpe/Sortino/drawdown, and tests whether the edge is real: t-stat, Probabilistic Sharpe Ratio and the Deflated Sharpe Ratio that corrects for how many variants you tried. Returns a verdict and red flags. Price: $0.1.
Example tool call
This call uses example arguments supplied in the tool’s input schema.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"trades": [
{
"pnl": 120
},
{
"pnl": -60
},
{
"pnl": 45
},
{
"pnl": -30
},
{
"pnl": 90
}
],
"n_trials": 20
},
"name": "strategy_audit"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| trades | No | Closed trades. | |
| api_key | No | Optional. Your AFA API key (afa_...), from get_api_key. Pass it on every call so free calls and credits apply; without it calls use the anonymous trial. | |
| returns | No | Periodic strategy returns as decimals. | |
| n_trials | No | How many strategy/parameter variants were tested before picking this one. Default 1. | |
| starting_equity | No | For risk-of-ruin and drawdown in dollars from trades. | |
| periods_per_year | No | ||
| avg_trial_correlation | No | Average pairwise correlation (0 to 1) between the returns of the variants you tested. Near-duplicate variants (a 20-day vs. 21-day lookback) are not independent trials; with this the audit deflates by an effective trial count instead of the raw n_trials. | |
| trial_sharpe_variance | No | Variance of per-period Sharpe across trials, if known. |