Server data from the Official MCP Registry
Is a backtest's Sharpe ratio real or luck? Deflated Sharpe Ratio check with green/yellow/red.
About
Is a backtest's Sharpe ratio real or luck? Deflated Sharpe Ratio check with green/yellow/red.
Remote endpoints: streamable-http: https://dsr-web.pages.dev/mcp
Security Report
This is a client-side Deflated Sharpe Ratio calculator with a stateless MCP endpoint, input validation, rate limiting, and no hardcoded secrets in the reviewed code; the only secret (SHARE_SECRET) is read from the environment. Minor observations include that the share-link feature transmits user return series to the server (clearly disclosed in the UI and not stored or logged), that the MCP endpoint is unauthenticated but rate-limited and only performs computation, and that the rate limiter is in-memory per instance. Permissions match the stated purpose, so the score remains in the good range. Supply chain analysis found 5 known vulnerabilities in dependencies (0 critical, 1 high severity).
7 files analyzed · 9 issues found
Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.
Permissions Found in Source Code
Found by scanning the linked source code. This listing connects to a hosted endpoint, so none of this runs on your machine: it describes what the server software does where it is hosted.
How to Connect
Remote Plugin
No local installation needed. Your AI client connects to the remote endpoint directly.
Add this to your MCP configuration to connect:
{
"mcpServers": {
"io-github-jagerstromebbe01-dot-dsr-web": {
"url": "https://dsr-web.pages.dev/mcp"
}
}
}Documentation
View on GitHubFrom the project's GitHub README.
Backtest Overfitting Calculator
A free, static, client-side calculator for the Deflated Sharpe Ratio (DSR) — Bailey & López de Prado (2014). All calculations run in the browser; nothing entered into the calculator is ever sent to a server.
What's here
src/lib/dsr.ts— the core math (PSR, the deflation benchmark SR*₀, DSR).src/lib/check.ts— pure "backtest check": raw returns + N → DSR and a green/yellow/red verdict (no React, reusable in a future API).src/lib/parseReturns.ts— parsing of pasted text / CSV return series.src/pages/CheckPage.tsx— the backtest-check UI (default page,#check).src/lib/normal.ts— dependency-free standard normal CDF / inverse CDF.src/lib/evaporationCurve.ts— shared chart geometry (used by both the on-page SVG chart and the shareable PNG, so they can't drift apart).src/lib/shareImage.ts— canvas-based PNG export.src/pages/CalculatorPage.tsx— the calculator UI.src/pages/ArticlePage.tsx— "Why your backtest is probably lying".src/lib/dsr.test.ts— Vitest unit tests, including a cross-check against an external Python reference implementation (see below).tools/— one-off Python scripts:gen_reference_values*.pygenerate the test fixtures intools/reference_values*.json,gen_og_image.pygeneratespublic/og-image.png(requires Pillow and Windows fonts — only needs rerunning if the share image's design changes). None of these are part of the shipped site.
Running locally
npm install
npm run dev
Opens at http://localhost:5173.
Running tests
npm test
Building
npm run build
Output goes to dist/. It's a fully static site — no server, no database,
no build-time secrets.
Regenerating the reference test values (optional)
Only needed if src/lib/dsr.ts changes and you want to re-verify it against
the reference implementations. Requires Python 3 with scipy/numpy.
gen_reference_values.py cross-checks this project's "V unknown" mode
against an external Deflated Sharpe Ratio implementation — it does not
ship or vendor one. Point it at your own local copy (a file defining
deflated_sharpe_ratio(observed_sr, n_trials, n_obs, skew=0.0, kurt=3.0)
per Bailey & López de Prado (2014)) via an environment variable or a
command-line argument:
cd tools
# V-unknown mode: point at your own local reference implementation
REFERENCE_DSR_IMPL=/path/to/deflated_sharpe_ratio.py python gen_reference_values.py
# or: python gen_reference_values.py /path/to/deflated_sharpe_ratio.py
# V-measured mode: independent scipy implementation, no external file needed
python gen_reference_values_v_measured.py
Both scripts only ever write inside tools/ in this repo.
API, share links and badge (Cloudflare Pages Functions)
functions/api/check.ts+functions/_lib/checkApi.ts—POST /api/check(reusesrunBacktestCheck, 1 MB / 100,000-value limit, 30 requests/min/IP in-memory rate limit, open CORS). Returns are never stored or logged.functions/r.ts,functions/badge.svg.ts,functions/_lib/shareApi.ts— signed result page/r?...and SVG badge/badge.svg?....src/lib/share.ts— HMAC-SHA256 signing of the result summary.- Needs ONE secret,
SHARE_SECRET, set in the Cloudflare dashboard (never in the repo): Workers & Pages → dsr-web → Settings → Variables and Secrets → Add → type Secret. Without it the API still works but returnsshareUrl: null, and every link is shown as "unverified". - Local full-stack test:
npm run build, create.dev.varscontainingSHARE_SECRET=anything-for-local-testing(gitignored), thennpx wrangler@4 pages dev distand open http://localhost:8788. - The build prerenders every page to static HTML (
scripts/prerender.mjs), so crawlers that don't run JavaScript see the text.
Deploying for free
Option A: Cloudflare Pages
- Push this repo to GitHub (or GitLab).
- Go to the Cloudflare dashboard → Workers & Pages → Create → Pages → Connect to Git.
- Select this repository.
- Build settings:
- Framework preset: Vite
- Build command:
npm run build - Build output directory:
dist
- Click Save and Deploy. Cloudflare gives you a
*.pages.devURL immediately; a custom domain can be attached afterwards under Custom domains.
Option B: GitHub Pages
- Push this repo to GitHub.
- In
vite.config.ts, setbase: '/<your-repo-name>/'(only needed if deploying tohttps://<user>.github.io/<repo-name>/rather than a custom domain or a root*.github.iorepo). - Add a GitHub Actions workflow (
.github/workflows/deploy.yml) that runsnpm ci && npm run buildand publishesdist/withactions/deploy-pages, or simply build locally and push thedist/folder to agh-pagesbranch using a tool likegh-pages(npm i -D gh-pages, thennpx gh-pages -d dist). - Enable Pages in the repo's Settings, pointing at the
gh-pagesbranch (or the Actions workflow, if used).
Adding an email field later (not built yet)
A placeholder exists in the UI copy only — no form, no field, no third-party script. To add a real one later without a custom backend, the simplest options are:
- Cloudflare Pages Functions (a
functions/subscribe.tsfile) writing to a KV namespace or forwarding to an email service's API. - A third-party form endpoint (e.g. Buttondown, ConvertKit, Formspree) — add
the
<form action="...">pointing at their endpoint; no backend code needed on this side, but review their privacy terms first since that reintroduces a third party the current "your numbers never leave your browser" claim doesn't apply to (the email field only, not the calculator itself).
Notes on the math
- All Sharpe ratios inside the formulas are per period, never annualized. The UI converts for you based on the frequency you pick.
- Kurtosis is in the non-excess convention (normal distribution = 3). The UI has a toggle if your kurtosis is in the excess (normal = 0) convention instead.
- V unknown mode (default) approximates V — the variance of the tried
strategies' per-period Sharpe ratios — as
1 / (T - 1), the variance of the Sharpe estimator itself evaluated at SR = 0. This implicitly treats "the typical tried strategy" as pure noise; it's a standard, conservative fallback, not a precise measurement. - V measured mode lets you supply an actual variance, either directly or computed from a pasted list of the Sharpe ratios of everything you tried.
Reviews
No reviews yet
Be the first to review this server!
More Developer Tools MCP Servers
Rea
Freeby Morluto · Developer Tools
Reverse engineer anything from your terminal or agent with one CLI and MCP server.
Paperclip
Freeby Paperclipai · Developer Tools
Trending hip-hop artist momentum scores across four cultural dimensions.
Scrapling
Freeby D4Vinci · Developer Tools
Web scraping with stealth HTTP, real browsers, and Cloudflare bypass. CSS selectors supported.
Server Time
Freeby Modelcontextprotocol · Developer Tools
Current time lookup and conversion between IANA timezones
Toleno
Freeby Toleno · Developer Tools
Toleno Network MCP Server — Manage your Toleno mining account with Claude AI using natural language.
MCP Marketplace
Freeby mcp-marketplace · Developer Tools
Search and install MCP servers from inside your AI client.
