canli-mcp / Deflated Sharpe

How do I calculate a deflated Sharpe ratio with AI?

canli-mcp's validate_deflated_sharpe asks how likely a Sharpe ratio is real once you count the tries behind it. For a Sharpe of 2 over 756 days after 50 independent tries, luck alone reaches 1.138 and the deflated Sharpe is 93.1%. It runs on your machine, free with no key, and neither number is a forecast.

Price: $0 to run. Updated 2026-11-08. Free and MIT-licensed, with no account and no API key. Or run claude mcp add canli -- npx -y canli-mcp in Claude Code.

Ask it

My best backtest has a Sharpe of 2 over three years of daily data, after about 50 independent tries. Is that real?

The agent finds the tool through canli-mcp's find_tool and runs it through run_tool. This is the call:

{
  "name": "validate_deflated_sharpe",
  "arguments": {
    "observed_sharpe_annualized": 2,
    "observations": 756,
    "periods_per_year": 252,
    "skew": 0,
    "non_excess_kurtosis": 3,
    "effective_independent_trials": 50,
    "cross_trial_sharpe_sd_annualized": 0.5
  }
}

What came back

Recorded from canli-mcp 0.16.1 on 2026-11-02, with no API key set. The model read 1,514 characters.

The result validate_deflated_sharpe sent back
{
  "ref": "r3",
  "computed": "locally",
  "note": "Computed on this machine in local mode. Nothing was sent to canlicapital.com and no receipt was stored.",
  "data": {
    "input_mode": "contract_inputs",
    "derived_inputs": {
      "observed_sharpe_annualized": 2,
      "observations": 756,
      "periods_per_year": 252,
      "skew": 0,
      "non_excess_kurtosis": 3,
      "effective_independent_trials": 50,
      "cross_trial_sharpe_sd_annualized": 0.5
    },
    "result": {
      "observed_sharpe_per_period": 0.125988,
      "cross_trial_sharpe_variance_per_period": 0.000992063,
      "expected_max_sharpe_per_period": 0.0716968,
      "expected_max_sharpe_annualized": 1.13815,
      "psr_against_zero": 0.999718,
      "deflated_sharpe_ratio": 0.931346,
      "non_normality_variance_term": 1.00794,
      "search_haircut_annualized": 0.861848,
      "psr_z_score": 3.44815,
      "dsr_z_score": 1.48589
    },
    "plain_reading": "Counting only sample uncertainty, the probability this Sharpe is above zero is 100.0 percent. Deflated for the best-by-luck Sharpe the decla…"
  },
  "limits": [
    "This verdict is about the series exactly as submitted. The service never saw the data source, its costs, survivorship, or any lookahead in h…",
    "A deflated Sharpe or overfitting probability above or below any threshold is not admission to anything and is not a forecast.",
    "The receipt is content-hashed, reproducible from the open-source core it names, and signed with Ed25519 by a key published at https://canlic…"
  ],
  "receipt": null
}

Prices, filings and statistics are as the sources published them on that day; run the call again for today's. Nothing here is investment advice.

The tools behind the answer

From canli-mcp's tool index
ToolPackWhat it does
validate_deflated_sharpevalidationDeflated Sharpe ratio: the probability (0 to 1) that the selected strategy's Sharpe beats the best that luck gives across the variants tried, with the probabilistic Sharpe and that luck benchmark. Send the seven statistics or a return series. With every variant's returns use validate_overfitting; luck as a trial count, validate_luck_trials; a multiple-testing haircut, validate_haircut_sharpe. A deflated Sharpe or overfitting probability above or below any threshold is not admission to anything and is not a forecast.

Add canli-mcp

Claude Code
claude mcp add canli -- npx -y canli-mcp
Cursor, Claude Desktop or any MCP client
{ "mcpServers": { "canli": { "command": "npx", "args": ["-y", "canli-mcp"] } } }
claude.ai, ChatGPT or any client that takes a URL
https://canlicapital.com/mcp/canli

Everything canli-mcp does · How it compares with other finance MCP servers

Related questions