Market Wizardry Quant Engine Methodology & AI Accuracy Benchmarks
Reproducible mathematical specification, multi-curve OIS & CCS basis proofs, BYOT token & latency profiling, and golden Excel regression benchmarks for @marketwizardry/quant-core and marketwizardry-mcp.
marketwizardry-mcp) for multi-curve OIS yield curve bootstrapping, interest rate swaps (IRS), cross-currency swaps (CCS), and ISDA/CSA XVA valuation. Designed for finance students, interns, and analysts, it pairs Bring-Your-Own-Tokens (BYOT) AI tutoring with < 1e-15 verified math.
Raw LLM vs. Market Wizardry Deterministic MCP
Ungrounded Large Language Models (ChatGPT or Claude used without deterministic quantitative tools) predict plausible text tokens rather than solving coupled nonlinear discount-factor equations or running seeded stochastic simulations. Every numerical calculation in Market Wizardry routes deterministically through @marketwizardry/quant-core.
| Failure Mode | Typical Raw LLM Output (No Tools) | Market Wizardry Deterministic MCP | Codebase-Verified Benchmark Proof |
|---|---|---|---|
| 1. Single-Curve Textbook Conflation | Discounts all legs on one pre-2008 domestic curve, ignoring CSA collateral currency. | Separates RFR forward projection (SOFR, ESTR, SONIA, SORA, TONA) from CSA collateral discounting. |
Round-trip CSA triangulation (USD → EUR → USD, 0.25Y–30Y): max DF residual 1.110e-16. |
| 2. ACT/360 vs. ACT/365F Day-Count Drift | Treats 4.00% USD SOFR, GBP SONIA, SGD SORA, and 30/360 bond coupons identically. | Exact UTC day-count engine (ACT/360, ACT/365F, 30/360, ISDA ACT/ACT) + automatic audit mismatch alerts. |
0.000e+0 leap-year partition additivity; < 1e-12 match to Excel YEARFRAC across 40 IRS & 20 CCS periods (365/360 = 1.389% gap). |
| 3. Non-Exact Par Swap Residuals | Estimates discount factors mentally or linearly interpolates raw par rates, leaving arbitrage residuals. | Piecewise log-linear DF stripping via Dekker-Brent root-finding (tol = 1e-15) enforcing |PV| < 1e-8. |
Worst max par error 9.159e-16 (20 OIS curves) & 9.992e-16 (16 CCS basis curves); 36/36 curves < 1e-15. |
| 4. Missing Cross-Currency Basis & CIP | Applies frictionless textbook CIP and ignores negative USD dealer funding basis. | Strips USD-collateralized CCS basis curves across 4 historical regimes (e.g., −84 bps 1Y USD/JPY & −68 bps 1Y EUR/USD in Mar 2020). | Reproduces Excel 5Y $100M USD/JPY −80 bps USD-CSA off-market PV of −$44,988,007.48 within < $0.01. |
| 5. IRS vs. CCS Exposure Shape Confusion | Claims all swaps hump mid-life or guesses PFE multipliers without modeling final principal re-exchange. | Seeded Mulberry32 + Box-Muller 1F Hull-White + correlated FX GBM (2,000 antithetic paths, seed=42). |
5Y $100M USD IRS peaks at 1.5Y (PFE95 $5,417,767, EE(5Y)=$0); 5Y €100M Const CCS peaks at 4.999Y ($60,439,532) vs. MTM-Reset ($11,496,555, 5.26x lower). |
| 6. Hallucinated XVA Signs & CSA Rules | Flips DVA vs. CVA/FVA signs, drops FVA, or claims Zero-Threshold VM eliminates CVA. | Enforces All-In PV = RF PV − (CVA − DVA + FVA + COLVA + MVA) via 161-point Gaussian quadrature MPOR across 5 CSA modes. |
Strict CSA monotonicity (CVA: $0 → $44,185 → $67,443 → $188,693 → $561,868 → $681,669); SIMM IM cuts CVA to $364 while adding $101,386 MVA. |
5 Global RFR OIS Conventions & 6 Deterministic MCP Tools
Market Wizardry models all five major post-LIBOR overnight Risk-Free Rate (RFR) OIS markets natively and exposes six deterministic MCP tools on xyz.marketwizardry/otc-rates-xva, every one enforced by runtime guard assertWithinTokenBudget strictly under 1,200 tokens and 500 ms.
| RFR Index | Currency | Day Count | Default OIS Freq | Payment Delay | Spot Lag | Calendar | Underlying Market |
|---|---|---|---|---|---|---|---|
| SOFR | USD | ACT/360 |
ANNUAL | T+2 | T+2 | USNY | Secured overnight U.S. Treasury GC repo (FRBNY) |
| ESTR | EUR | ACT/360 |
ANNUAL | T+1 | T+2 | TARGET | Unsecured overnight Eurozone wholesale deposits (ECB) |
| SONIA | GBP | ACT/365F |
ANNUAL | T+0 | T+0 | GBLO | Unsecured overnight GBP wholesale deposits (BoE) |
| SORA | SGD | ACT/365F |
SEMI_ANNUAL | T+2 | T+2 | SGSI | Volume-weighted onshore overnight SGD interbank cash (MAS) |
| TONA | JPY | ACT/365F |
ANNUAL | T+2 | T+2 | JPTO | Unsecured overnight JPY call money market (BoJ) |
npm run check:tokens)| MCP Tool Name | Tier Access | Stress Benchmark Profiled | Bytes | Est. Tokens | Latency |
|---|---|---|---|---|---|
compute_daycount_and_conventions |
Starter + Pro | Cross-leap ISDA ACT/ACT + full RFR matrix | 1,190 B | 372 | 0.36 ms |
bootstrap_curves |
Starter (OIS) / Pro (CCS & 3rd-CCY) | 30Y USD SOFR OIS / 30Y EUR ESTR → GBP CSA union grid | 1,324–1,354 B | 414–424 | 0.34–0.47 ms |
price_swap |
Starter (IRS) / Pro (CCS) | 30Y quarterly Const-Notional EUR/USD & MTM-Reset JPY/USD CCS | 2,404–2,437 B | 752–762 | 1.53–1.93 ms |
simulate_exposure_profile |
Pro Cloud | 30Y quarterly Const-Notional CCS, 2,000 antithetic paths | 1,637 B | 512 | 145.53 ms |
compute_xva_waterfall |
Pro Cloud | 30Y CCS, 5 XVAs + 3-row CSA comparison ladder, 2,000 paths | 1,397 B | 437 | 145.09 ms |
audit_swap_mechanics |
Starter (IRS) / Pro (CCS) | Multi-trap 7.3Y CCS + 3rd-ccy CSA + Wrong-Way Risk (9 checks) | 2,702 B | 845 | 0.73 ms |
Pricing & Institutional OTC Training Comparison
Because Market Wizardry uses a Bring-Your-Own-Tokens (BYOT) architecture, learners connect their existing Claude, Cursor, Antigravity, Windsurf, or MCP-enabled ChatGPT client with zero AI subscription markup.
| Platform / Program | Published Price | Multi-Curve OIS & CCS | Exposure & XVA Engine | Excel Companions & AI Mode |
|---|---|---|---|---|
| NYIF Interest Rate Derivatives (2-Day) | $4,450 – $5,450 | Lecture slides | Static spreadsheet examples | No AI / MCP integration |
| Risk.net / Gregory XVA Seminars | $2,000 – $4,500+ | Practitioner slides | Macro workbooks | No AI / MCP integration |
| CFI CMSA / Financial Edge FICC | $497 – $549/yr | High-level video | Conceptual overview only | Generic text wrapper |
| Raw ChatGPT Plus / Claude Pro | $20/mo | Single-curve hallucinations | Unseeded / wrong XVA signs | Ungrounded LLM math |
| Market Wizardry Free Starter | $0 forever (Tier 0 stdio) | 5 Domestic RFR OIS + Vanilla IRS | Day-count & Vanilla IRS audit | npx marketwizardry-mcp + Free Tome of Knowledge (100 Trading Floor Terms & 25 MD Interview Traps) |
| Market Wizardry Pro MCP | $39/mo · $119 120-Day Sprint · $249/yr ($129/yr .edu) | 36 Historical Curves (< 1e-15 Par) + 3rd-CCY CSA | Seeded HW1F + FX GBM & 5-Mode XVA Waterfall | 2 Core Quant Workbooks in Sprint ($119); All 3 Desk Workbooks ($49–$59 ea / $109 Trio) + Exclusive 3-Tab XVA Companion in Pro Annual ($249/yr) + 14-Day Guarantee |
Quantitative Architecture & Verification FAQ
How does Market Wizardry bootstrap multi-curve OIS discount factors without LLM hallucination?
Every curve bootstrap routes deterministically to bootstrapOisCurve and bootstrapCcsBasisCurve inside @marketwizardry/quant-core. Using piecewise log-linear discount-factor interpolation and Dekker-Brent bracketed root-finding (tol = 1e-15), the engine strips all 36 pre-built historical regime curves (20 OIS curves across SOFR, ESTR, SONIA, SORA, TONA + 16 USD-collateralized CCS basis curves) with worst-case max par repricing error of 9.159e-16 (OIS) and 9.992e-16 (CCS basis).
Why does a Constant-Notional Cross-Currency Swap have a maturity-peaking PFE profile while a Vanilla IRS has a mid-life hump?
A domestic Vanilla IRS does not exchange principal, so rate diffusion widens mark-to-market early while coupon roll-off pulls exposure back to $0 at maturity T — producing a verified mid-life hump at 1.5Y (PFE95 = $5,417,767 on a 5Y $100M USD IRS). A Constant-Notional CCS re-exchanges full principal at maturity at inception FX spot S_0, so unreset FX diffusion drives peak exposure right before settlement at T− (4.999Y, PFE95 = $60,439,532 on a 5Y €100M EUR/USD CCS), whereas quarterly MTM-Resetting CCS collapses peak PFE95 by 5.26x to $11,496,555.
What is Bring Your Own Tokens (BYOT) MCP architecture and why is every tool capped under 1,200 tokens?
Under BYOT, learners use their own Claude Desktop, Cursor, Antigravity, Windsurf, or MCP-enabled ChatGPT subscription for conversational tutoring while Market Wizardry performs stateless quantitative compute at zero LLM markup. Because users pay for their own context tokens, marketwizardry-mcp enforces a hard runtime guard rejecting any payload at or above 1,200 tokens — all 6 tools measure between 372 and 845 tokens and execute in 0.34–145.53 ms.
How does Market Wizardry calculate CVA, DVA, FVA, COLVA, and MVA under different ISDA/CSA thresholds?
computeXvaWaterfall recovers marginal Gaussian MTM moments from EE(t) and ENE(t) via Bachelier inversion and integrates close-out exposure over a 161-point symmetric Gaussian quadrature grid for the Margin Period of Risk (MPOR, 10 business days bilateral). It enforces the exact dealer identity All-In PV = Risk-Free PV − (CVA − DVA + FVA + COLVA + MVA) across 5 CSA modes, proving strict threshold monotonicity (CVA: $0 → $44,185 → $67,443 → $188,693 → $561,868 → $681,669) and the SIMM IM trade-off (CVA drops to $364 while MVA rises to $101,386).
What is the difference between Tier 0 Free Local Starter (npx) and Tier 1 Pro Remote HTTP MCP?
Tier 0 Free Starter ($0 forever) runs locally over stdio via npx -y marketwizardry-mcp and covers 2026 domestic RFR OIS curves, Vanilla IRS pricing & audit, day-counts, all 5 mw:// playbooks, and all 3 Socratic prompts. Tier 1 Pro Remote HTTP (https://mcp.marketwizardry.xyz/mcp, SHA-256 Bearer auth, 60 req/min) unlocks cross-currency basis & triangulated CSAs, Constant-Notional & MTM-Resetting CCS, seeded Monte Carlo exposure simulation, 5-mode XVA waterfalls, and all 4 historical crisis regimes ($39/mo, $119 120-Day Sprint, or $249/yr / $129/yr .edu).
How are Market Wizardry’s Excel workbooks verified against the TypeScript quant engine?
Every build runs 51 automated Vitest regression tests across 12 suites and 14 mathematical identity checks (npm run check:identities), locking @marketwizardry/quant-core against 4 golden JSON fixtures extracted from our companion spreadsheets: irs-bootstrapping.json (< 1e-14 par match on 5.3359954% 10Y swap), fx-forwards-carry.json (< 1e-12 CIP forwards), ccs-baseline.json (−$44,988,007.48 USD/JPY −80 bps off-market PV within < $0.01), and ccs-basis-and-exposure.json ($200M AUD/USD hedge backtest).
Inspect the Engine Live or Connect Your AI Client
Verify every benchmark directly in your browser using the exact same pure TypeScript @marketwizardry/quant-core bundle, or point autonomous AI agents to our structured discovery manifest.
Machine-Readable AI Discovery Manifest (llms.txt Format)
# Market Wizardry (marketwizardry.xyz)
> Deterministic OTC Rates (IRS, CCS), Multi-Curve OIS Bootstrapping, and XVA (CVA, DVA, FVA, COLVA, MVA) learning platform powered by marketwizardry-mcp and @marketwizardry/quant-core.
Key Verified Benchmarks:
- Accuracy: < 1e-15 par repricing error across 36 historical curves (9.159e-16 OIS, 9.992e-16 CCS basis); 51/51 tests & 14/14 invariants passing.
- Tools (372-845 tokens, 0.34-145.53 ms): compute_daycount_and_conventions, bootstrap_curves, price_swap, simulate_exposure_profile, compute_xva_waterfall, audit_swap_mechanics.
- Endpoints: Free Tier 0 Local stdio (npx -y marketwizardry-mcp) | Tier 1 Pro Remote HTTP (https://mcp.marketwizardry.xyz/mcp).
- Pricing (BYOT): $0 Starter + Free Tome of Knowledge (100 Trading Floor Terms & 25 MD Interview Traps, formerly $49) | $39/mo Pro Monthly | $119 120-Day Sprint (w/ both Quant Excel Workbooks) | $249/yr Pro Annual ($129/yr .edu via EDU-DESK50, w/ both Quant Excel Workbooks) | $49 ea / $69 Quant Duo (100% 30-day upgrade credit) | 14-Day Guarantee.
- Pages: https://marketwizardry.xyz/#mw-otc-sandbox | https://marketwizardry.xyz/pages/free-desk-kit | https://marketwizardry.xyz/pages/methodology | https://marketwizardry.xyz/pages/xva-csa-calculator | https://marketwizardry.xyz/pages/mcp-activate