Sharpe Ratio Statistics
workflow.run_sharpe_statsSharpe ratio with the Lo (2002) serial-correlation-aware annualization correction, computed in its lag-1 form rather than the full multi-lag sum (the naive sqrt(periods_per_year) scaling overstates or understates the true annualized Sharpe when returns are autocorrelated), plus the Probabilistic Sharpe Ratio (Bailey & Lopez de Prado): the probability the true Sharpe exceeds a benchmark, adjusted for the sample's skewness/kurtosis and length, not just its point estimate. Edge cases: at least 3 returns; periods_per_year from 1 to 100,000,000 (default 365, the crypto convention); benchmark_sharpe is per period, not annualized (default 0); a flat series (zero standard deviation) is an error. Not covered: the multi-lag Lo correction beyond lag 1, a risk-free rate series (the benchmark is one number), transaction costs, and any statement about future Sharpe. The result describes the sample you give. Use when user asks "what's my real annualized Sharpe, not the naive one?" or "how confident can I be this Sharpe ratio is actually good?". Returns: sharpe_period, sharpe_annualized_naive, sharpe_annualized_lo, autocorrelation_lag1, psr, skewness, kurtosis.
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>"
},
"name": "workflow.run_sharpe_stats"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| returns | Yes | Return series, one value per period | |
| benchmark_sharpe | No | Benchmark Sharpe ratio for the PSR test, same periodicity as returns (default 0) | |
| periods_per_year | No | Periods per year for annualization (default 365, crypto convention - trades every day). Any number from 1 to 100 million, e.g. 365.25. |