Backtest Overfitting Calculator

Backtest check API

A free JSON API that answers the same question as the backtest check: is this strategy's Sharpe ratio probably real, or just luck after trying many strategies? It uses the Deflated Sharpe Ratio (Bailey & López de Prado, 2014). No sign-up, no API key.

Privacy: the returns you send are used for the calculation and then discarded. They are never stored and never logged.

Request

POST https://dsr-web.pages.dev/api/check with a JSON body:

  • returns — array of numbers: returns per period as decimals (0.01 = +1 %). At least 2 values, at most 100,000.
  • frequency — "daily" (252/yr), "daily_crypto" (365/yr), "weekly", "monthly" or "custom" (then also send customPeriodsPerYear).
  • n — whole number ≥ 1: how many independent strategies you tried. 500 nearly identical variants do not count as 500.
  • v — optional: variance of the per-period Sharpe ratios across your tried strategies. If left out, it is estimated as 1/(T−1) and the response says vEstimated: true.

curl

curl -X POST https://dsr-web.pages.dev/api/check \
  -H "Content-Type: application/json" \
  -d '{
    "returns": [0.012, -0.004, 0.007, 0.001, -0.009, 0.015, 0.003, -0.002],
    "frequency": "daily",
    "n": 20
  }'

Python

import requests

# Decimal returns per period (0.01 = 1 %), e.g. from your backtest.
returns = [0.012, -0.004, 0.007, 0.001, -0.009, 0.015, 0.003, -0.002]

resp = requests.post(
    "https://dsr-web.pages.dev/api/check",
    json={"returns": returns, "frequency": "daily", "n": 20},
    timeout=30,
)
data = resp.json()
if resp.ok:
    print(data["verdict"], data["dsr"])   # e.g. "red" 0.12
else:
    print("error:", data["error"])

Response

{
  "dsr": 0.101,
  "verdict": "red",
  "sharpe": 0.0276,
  "sharpeAnnualized": 0.44,
  "skew": -0.36,
  "kurtosis": 3.68,
  "T": 504,
  "N": 20,
  "vEstimated": true,
  "vUsed": 0.00199,
  "benchmarkSR": 0.085,
  "periodsPerYear": 252,
  "warnings": ["V (the spread of Sharpe ratios ...) is estimated ..."],
  "shareUrl": "https://dsr-web.pages.dev/r?dsr=0.1010&verdict=red&...&sig=...",
  "badgeMarkdown": "[![DSR check](https://dsr-web.pages.dev/badge.svg?...)](https://dsr-web.pages.dev/r?...)"
}
  • verdict — "green" (DSR ≥ 0.95, probably a real edge), "yellow" (0.50 to 0.95, uncertain) or "red" (below 0.50, probably luck).
  • sharpe is per period; sharpeAnnualized is scaled by √(periods per year). kurtosis is the non-excess kind (normal = 3).
  • warnings — things worth knowing, e.g. a short series or returns that look like percentages.

Share link and badge

Every response includes a signed shareUrl and ready-made badgeMarkdown for a GitHub README. The link carries only a summary (DSR, verdict, annualized Sharpe, skewness, kurtosis, T, N, whether V was estimated) — never your returns. It is signed by this site, so nobody can invent a "verified" result: a link that is altered or unsigned is shown as unverified.

MCP server for AI assistants

The same check is available to ChatGPT, Claude and other AI assistants through the Model Context Protocol (MCP). Server URL (Streamable HTTP, no sign-in): https://dsr-web.pages.dev/mcp. Two read-only tools: check_backtest (from a return series) and dsr_from_stats (from a Sharpe ratio, number of observations and number of strategies tried). See the privacy policy for how data is handled.

Errors

  • 400 — invalid input; {"error": "..."} explains what to fix.
  • 413 — request body larger than 1 MB.
  • 429 — too many requests (about 30 per minute per IP); see the Retry-After header.

CORS is open (Access-Control-Allow-Origin: *), so you can call the API from the browser too.

Educational tool only — not investment advice. A green result is evidence, not proof of skill.