# Market Wizardry

> Market Wizardry (marketwizardry.xyz) is a deterministic OTC Rates (Interest Rate Swaps, Cross-Currency Swaps), Multi-Curve OIS Bootstrapping, and XVA (CVA, DVA, FVA, COLVA, MVA) learning platform powered by a Model Context Protocol (MCP) server (`marketwizardry-mcp` v0.2.0) and institutional open-formula Excel Quant Workbooks.

Market Wizardry solves the "LLM financial math hallucination problem" by pairing Socratic Sales, Trading & Structuring tutoring in any MCP-compatible AI client (Claude Desktop, Claude Web, ChatGPT, Cursor, VS Code, Antigravity, Windsurf) with a pure TypeScript deterministic quantitative engine (`@marketwizardry/quant-core`). Under its "Bring Your Own Tokens" (BYOT) model, learners use their own AI subscription for conversational tutoring while Market Wizardry executes stateless, machine-precision quantitative calculations at near-zero token overhead.

Key verified platform facts:
- **Zero LLM Math:** Every curve bootstrap, day-count fraction, par swap rate, cross-currency basis spread, Monte Carlo exposure profile, and XVA waterfall is computed deterministically via `@marketwizardry/quant-core` (never mental arithmetic by an LLM).
- **Machine-Precision Accuracy:** Strips all 36 pre-built historical regime curves (20 RFR OIS curves across USD SOFR, EUR ESTR, GBP SONIA, SGD SORA, JPY TONA + 16 USD-collateralized cross-currency basis curves) with worst-case par repricing error `< 1e-15` (`9.159e-16` OIS, `9.992e-16` CCS basis) and passes 14/14 mathematical invariants, 4 golden Excel regression fixtures, and full automated Vitest unit/HTTP suites.
- **Token-Efficient & Sub-500ms:** All 6 MCP tools stay strictly under 1,200 tokens per response (measured 372–845 tokens) and under 500 ms execution latency (measured 0.34–145.53 ms), with explicit read-only MCP annotations (`readOnlyHint: true`, `destructiveHint: false`, `idempotentHint: true`, `openWorldHint: false`).
- **MCP Server Identifier:** `xyz.marketwizardry/otc-rates-xva` (`marketwizardry-mcp` `v0.2.0`), supporting Tier 0 Free Starter via both local `stdio` (`npx -y marketwizardry-mcp`) AND zero-auth remote Streamable HTTP (`https://mcp.marketwizardry.xyz/mcp`), plus Bearer-authenticated Tier 1 Pro on the same `/mcp` endpoint.
- **Pricing Summary (BYOT):** `$0` Free Starter MCP (local `stdio` & zero-auth remote `/mcp`), `$0` *The Tome of Knowledge* (`/pages/free-desk-kit`), `$39/mo` Pro Monthly, `$119` 120-Day Sprint Pass (includes 2 Core Recruiting Workbooks V2, `$98` value), `$249/yr` Pro Annual (`$129/yr` verified `.edu` via `EDU-DESK50`, includes All 3 V2 Desk Workbooks `$157` value + Annual-Exclusive 3-Tab *XVA & CSA Waterfall Companion*), `$49` *Bootstrapping Robes V2*, `$49` *Option Wands V2*, `$59` *Basis Scrolls*, `$69` *Quant Workbook Duo V2*, and `$109` *Quant Workbook Trio V2* (with 100% 30-day workbook upgrade credit and a 14-Day "Desk-Grade Math" Guarantee).

## Dual-MCP Endpoints

Market Wizardry operates two distinct, complementary MCP surfaces:

1. **Quant Engine MCP (`https://mcp.marketwizardry.xyz/mcp`):** Deterministic OTC Rates (IRS, CCS), Multi-Curve OIS Bootstrapping, Counterparty Exposure, and ISDA/CSA XVA modeling server (`xyz.marketwizardry/otc-rates-xva` `v0.2.0`).
   - **SEP-2127 Server Card:** `https://mcp.marketwizardry.xyz/.well-known/mcp/server-card.json` (aliases: `/mcp/server-card`, `/.well-known/mcp.json`, `/.well-known/ai-catalog.json`)
   - **Authoritative Quant Manifest:** `https://mcp.marketwizardry.xyz/llms.txt`
   - **Dual-Mode Auth:** Send no `Authorization` header for zero-auth Free Starter (domestic OIS, Vanilla IRS, Day-Count, Structurer Audit; IP rate-limited) OR `Authorization: Bearer mw_live_...` for Pro (all 6 tools, CCS basis, 4 historical crisis regimes, seeded Hull-White exposure & 5-component XVA waterfall).
2. **Commerce MCP / UCP (`https://marketwizardry.xyz/.well-known/ucp` & `https://marketwizardry.xyz/api/ucp/mcp`):** Shopify Universal Commerce Protocol (UCP) endpoint for AI shopping agents (`ChatGPT Shopping`, `Perplexity Buy`, `Shop Agent`) to search Market Wizardry's 8 active SKUs, verify pricing/guarantees, and initiate checkout.

## Core Platform & Interactive Tools

- [Market Wizardry Home](https://marketwizardry.xyz/): Storefront overview of Yield Curve Bootstrapping, Interest Rate Swaps, Cross-Currency Swaps, XVA, open-formula V2 Quant Workbooks, and BYOT AI tutoring for finance students and Markets/Structuring candidates.
- [OTC Rates & XVA MCP Platform](https://marketwizardry.xyz/pages/otc-mcp): Full MCP platform hub with 1-click onboarding, zero-auth remote & local `stdio` setup, tool specifications, and plan comparison.
- [FICC Sales, Trading & Structuring Interview Prep](https://marketwizardry.xyz/pages/ficc-interview-prep): Superday and Markets desk preparation hub pairing Socratic MCP drills, open-formula Excel workbooks, and *The Tome of Knowledge*.
- [Interactive Browser Guided Yield Curve & Swap Lab](https://marketwizardry.xyz/#mw-otc-sandbox): Zero-signup browser lab powered by `@marketwizardry/quant-core` featuring Guided Lab (USD/EUR/GBP yield curve stripping & rate-shock P&L) plus a 1-click Advanced Desk Mode toggle for CCS & XVA.
- [Advanced Browser XVA & CSA Sandbox](https://marketwizardry.xyz/pages/xva-csa-calculator): Dedicated client-side institutional calculator powered by `@marketwizardry/quant-core` comparing IRS vs. Constant-Notional CCS vs. MTM-Resetting CCS exposures and 5-mode ISDA CSA XVA waterfalls.
- [The Tome of Knowledge (Free)](https://marketwizardry.xyz/pages/free-desk-kit): `$0` (formerly `$49`) flagship student & analyst reference — 100 Trading Floor Terms & 25 MD Interview Traps (mobile PDF, unlocked Excel vault, and 125-card Anki flashcard deck) paired with an interactive 3-question 7am Desk Screen quiz.
- [Quantitative Methodology & AI Accuracy Benchmarks](https://marketwizardry.xyz/pages/methodology): Mathematical specification of log-linear OIS bootstrapping, USD-CSA cross-currency basis stripping, Hull-White 1F + FX GBM exposure simulation, Andersen-Pykhtin-Sokol XVA waterfall, verified benchmark tables, and [Technical Quant & Architecture FAQ](https://marketwizardry.xyz/pages/methodology#technical-faq).
- [Student & Pro Pricing Plans](https://marketwizardry.xyz/#mw-pricing): Transparent BYOT tiers covering `$0` Free Starter, `$39/mo` Pro Monthly, `$119` 120-Day Sprint, `$249/yr` Pro Annual (`$129/yr` verified `.edu` via `EDU-DESK50`), and standalone/bundled V2 Quant Workbooks (`$49`/`$59`/`$69`/`$109`).
- [Learner FAQ](https://marketwizardry.xyz/#mw-learner-faq): Plain-English answers covering AI math accuracy, zero-coding setup, student suitability, Excel companion parity, and post-checkout activation.
- [MCP API Key Activation Portal](https://marketwizardry.xyz/pages/mcp-activate): One-click onboarding, zero-leak magic-link key loader, and live `/api/ping` verification for Pro Remote MCP Bearer keys (`mw_live_...`).

## MCP Server Endpoints, Tools & Grounding Resources

- [Remote Streamable HTTP MCP Endpoint](https://mcp.marketwizardry.xyz/mcp): Dual-mode Streamable HTTP JSON-RPC endpoint — zero-auth Free Starter (20 tool calls/min, 150/day per IP; discovery methods up to 60/min) and Bearer-authenticated Tier 1 Pro (`Authorization: Bearer mw_live_...`, 60 req/min, SHA-256 key hashing).
- [MCP Server Card (SEP-2127)](https://mcp.marketwizardry.xyz/.well-known/mcp/server-card.json): Machine-readable capability, transport, repository, and tool/resource/prompt discovery card.
- [npm Package `marketwizardry-mcp`](https://www.npmjs.com/package/marketwizardry-mcp): Free Tier 0 local `stdio` MCP server (`npx -y marketwizardry-mcp`, `v0.2.0`) including domestic OIS bootstrapping (`2026-normalized-multi-speed`), Vanilla IRS pricing & audit, RFR day-count calculator, all 5 `mw://` resources, and all 3 Socratic prompts.

Six deterministic, read-only MCP tools exposed by `marketwizardry-mcp`:
- `compute_daycount_and_conventions` (Starter + Pro): Exact `ACT/360`, `ACT/365F`, `30/360`, and ISDA `ACT/ACT` year fractions plus SOFR, ESTR, SONIA, SORA, and TONA convention registry (372 tokens, 0.36 ms).
- `bootstrap_curves` (Starter domestic OIS; Pro all 4 regimes + cross-currency basis & triangulated 3rd-currency CSAs): Piecewise log-linear discount factor stripping via Brent root-finding across 1M–30Y OIS and 1Y–30Y CCS basis pillars (414–424 tokens, 0.34–0.47 ms).
- `price_swap` (Starter Vanilla IRS; Pro Constant-Notional CCS, MTM-Resetting CCS & cross-currency CSAs): Multi-curve valuation, exact closed-form par fixed rate or par basis spread, 5-bucket Key-Rate `PV01` (`1Y/2Y/5Y/10Y/30Y`), `fxBasisDv01`, and compact cash-flow schedule summaries (752–762 tokens, 1.53–1.93 ms).
- `simulate_exposure_profile` (Pro): Seeded Mulberry32 + Box-Muller Monte Carlo (`2,000` antithetic paths) combining 1-Factor Hull-White short rates and correlated lognormal FX GBM to compute coarse-grid `EE(t)`, `ENE(t)`, `EPE`, `Effective EPE`, and `PFE95`/`PFE99` (512 tokens, 145.53 ms).
- `compute_xva_waterfall` (Pro): Dealer `CVA`, `DVA`, `FVA`, `COLVA`, and `MVA` waterfall across 5 ISDA CSA modes (`UNCOLLATERALIZED`, `ONE_WAY_BANK_POSTS`, `ONE_WAY_CLIENT_POSTS`, `TWO_WAY_VM`, `TWO_WAY_VM_AND_IM`) with 161-point Gaussian quadrature MPOR close-out mitigation and 3-row CSA ladder (437 tokens, 145.09 ms).
- `audit_swap_mechanics` (Starter Vanilla IRS; Pro CCS & multi-currency CSA): Deterministic 9-check Senior Structurer audit catching RFR day-count mismatches, missing CCS principal exchanges, broken stubs, foreign-CSA discounting switches, 1-way CSA FVA traps, and Wrong-Way Risk (845 tokens, 0.73 ms).

Five curated `mw://` grounding resources (1,084–1,473 tokens each):
- `mw://conventions/rfr-ois-daycounts`: Institutional RFR OIS matrix (SOFR, ESTR, SONIA, SORA, TONA), compounded-in-arrears formula, lookback vs. observation shift vs. payment delay.
- `mw://playbooks/ccs-basis-and-mtm-resets`: Initial/final principal exchange, CIP basis economics, Constant-Notional maturity-peaking vs. MTM-Resetting exposure, and corporate DCM trade-offs.
- `mw://playbooks/isda-csa-xva-decision-tree`: Mapping ISDA Netting, Threshold (`H`), MTA, MPOR, CTD Collateral Currency, and SIMM IM to CVA, DVA, FVA, COLVA, and MVA.
- `mw://snapshots/historical-regimes`: JSON catalog of 4 historical regimes (`2020-dash-for-cash`, `2022-global-liftoff-divergence`, `2023-global-hiking-peak`, `2026-normalized-multi-speed`).
- `mw://glossary/otc-desk-terminology`: 15 institutional OTC desk glossary definitions linked to verification tools.

Three Socratic Desk-Mandate MCP Prompts (all enforcing Zero LLM Math):
- `corporate-ccs-issuance-hedge`: 10Y `$500M` USD Eurobond swapped to EUR ESTR or SGD SORA via Constant-Notional vs. MTM-Resetting CCS.
- `ois-multi-curve-bootstrapping-lab`: Post-GFC OIS curve stripping, Par/Zero/Forward ordering in inverted vs. normal curves, and USD-CSA discounting.
- `csa-negotiation-xva-pricing`: Three-way negotiation among Sales, Corporate Treasury, and XVA Desk across Uncollateralized, Threshold VM, Zero-Threshold VM, and SIMM IM CSAs.

## Open-Formula V2 Quant Workbooks & Free Tome of Knowledge

- [Bootstrapping Robes V2](https://marketwizardry.xyz/products/bootstrapping-robes-irs): `$49` standalone — 100% open-formula Post-2008 USD SOFR OIS yield curve bootstrapping and Vanilla Interest Rate Swap (IRS) pricer Excel workbook (included in `$69` Duo V2, `$109` Trio V2, `$119` 120-Day Sprint, and `$249/yr` Pro Annual).
- [Option Wands V2](https://marketwizardry.xyz/products/carrying-option-wands-fx-forwards-carry-and-options): `$49` standalone — 100% open-formula FX Forwards, Covered Interest Parity (CIP), FX carry, and live Garman-Kohlhagen FX Options Excel workbook (included in `$69` Duo V2, `$109` Trio V2, `$119` 120-Day Sprint, and `$249/yr` Pro Annual).
- [Basis Scrolls](https://marketwizardry.xyz/products/basis-scrolls-ccs): `$59` standalone — 100% open-formula Cross-Currency Swaps (CCS), cross-currency basis stripping, and MTM-Resetting notional analytics Excel workbook (included in `$109` Trio V2 and `$249/yr` Pro Annual).
- [Quant Workbook Duo V2](https://marketwizardry.xyz/products/quant-workbook-duo): `$69` bundle (`$98` standalone value) — 2 Core Recruiting Workbooks V2 (*Bootstrapping Robes V2* + *Option Wands V2*) with 100% 30-day upgrade credit toward Sprint or Pro Annual.
- [Quant Workbook Trio V2](https://marketwizardry.xyz/products/quant-workbook-trio): `$109` bundle (`$157` standalone value) — All 3 V2 Desk Workbooks (*Bootstrapping Robes V2* + *Option Wands V2* + *Basis Scrolls*) with 100% 30-day upgrade credit toward Pro Annual.
- [The Tome of Knowledge (Free)](https://marketwizardry.xyz/pages/free-desk-kit): `$0` (formerly `$49`) 100 Trading Floor Terms & 25 MD Interview Traps across OTC Rates, FX & XVA (100-term mobile PDF, unlocked `.xlsx` vault + 25 MD traps, and 125-card Anki flashcard deck).

## Pricing & Access Tiers (All 8 Paid SKUs + Free Starter)

- **Tier 0 Free Starter MCP (`$0` forever):** Available both via local `stdio` (`npx -y marketwizardry-mcp`) AND zero-auth remote Streamable HTTP (`https://mcp.marketwizardry.xyz/mcp`, no API key required) — domestic OIS (`2026-normalized-multi-speed`), Vanilla IRS pricing & audit, RFR day-count calculator, all 5 `mw://` playbooks, all 3 Socratic prompts, plus *The Tome of Knowledge* free at `/pages/free-desk-kit`.
- **[Pro Monthly (`$39/mo`, cancel anytime)](https://marketwizardry.xyz/products/market-wizardry-pro-monthly):** Remote Streamable HTTP Pro MCP (`https://mcp.marketwizardry.xyz/mcp`) — all 6 deterministic tools, Constant-Notional & MTM-Resetting CCS, cross-currency basis & triangulated CSAs, Monte Carlo exposure simulation, 5-mode ISDA/CSA XVA waterfall, and all 4 historical crisis regimes.
- **[120-Day Sprint Pass (`$119` one-time, no auto-renew)](https://marketwizardry.xyz/products/market-wizardry-120-day-sprint-pass):** 120 days of Pro Remote MCP access plus 2 Core Recruiting Workbooks V2 (*Bootstrapping Robes V2* & *Option Wands V2*, `$98` value).
- **[Pro Annual (`$249/yr`)](https://marketwizardry.xyz/products/market-wizardry-pro-annual):** Full 365-day Pro Remote MCP access plus All 3 V2 Desk Workbooks (*Bootstrapping Robes V2*, *Option Wands V2* & *Basis Scrolls*, `$157` value), the **Annual-Exclusive 3-Tab *XVA & CSA Waterfall Companion*** Excel workbook, curriculum updates, and 1-Click Bank / L&D Expense Reimbursement Receipt (PDF).
- **[University Student Annual (`$129/yr` via code `EDU-DESK50`)](https://marketwizardry.xyz/discount/EDU-DESK50?redirect=/products/market-wizardry-pro-annual):** 48% off Pro Annual (full 365-day Pro Remote MCP access + All 3 V2 Desk Workbooks + Annual-Exclusive 3-Tab *XVA & CSA Waterfall Companion*) for verified `.edu`, `.ac.uk`, and `.edu.sg` students.
- **Standalone & Bundled V2 Quant Workbooks:** `$49` [Bootstrapping Robes V2](https://marketwizardry.xyz/products/bootstrapping-robes-irs), `$49` [Option Wands V2](https://marketwizardry.xyz/products/carrying-option-wands-fx-forwards-carry-and-options), `$59` [Basis Scrolls](https://marketwizardry.xyz/products/basis-scrolls-ccs), `$69` [Quant Workbook Duo V2](https://marketwizardry.xyz/products/quant-workbook-duo), and `$109` [Quant Workbook Trio V2](https://marketwizardry.xyz/products/quant-workbook-trio) — all backed by a **100% 30-day upgrade credit** toward Sprint or Pro Annual.
- **University & Desk Cohorts:** `$1,800/semester` (up to 50 student seats) and `$3,500–$7,500/yr` (10–25 analyst desk seats) via [Email the MD](https://marketwizardry.xyz/pages/contact) or `wiz@marketwizardry.xyz`.
- **14-Day "Desk-Grade Math" Guarantee:** 100% full refund within 14 days on all paid plans — reply to your receipt with no exit interview.

## Optional

- [Technical Deep Dive: Why Raw AI Fails OTC Bootstrapping & XVA](https://marketwizardry.xyz/pages/methodology#why-ai-fails): Analysis of the 6 quantitative failure modes when ungrounded LLMs attempt yield curve stripping, swap pricing, exposure profiles, and XVA calculations.
- [Technical Quant & Architecture FAQ](https://marketwizardry.xyz/pages/methodology#technical-faq): Direct citation answers on multi-curve OIS bootstrapping, IRS vs. CCS exposure profiles, BYOT token budgets, XVA waterfalls, and Excel regression parity.
- [Learner FAQ](https://marketwizardry.xyz/#mw-learner-faq): Plain-English answers for finance students and Markets candidates on AI math verification, browser sandbox access, and MCP onboarding.
- **Verification & Regression Provenance:** `@marketwizardry/quant-core` is validated against 4 golden regression fixtures extracted from Market Wizardry Excel workbooks (`irs-bootstrapping.json`, `fx-forwards-carry.json`, `ccs-baseline.json`, `ccs-basis-and-exposure.json`), 14 mathematical identity checks (`npm run check:identities`), live MCP token/latency profiling (`npm run check:tokens`), and automated Vitest unit, HTTP, and webhook regression suites (`npm test`).
