Margin & Prime Brokerage — how the margin call is computed
Every margin methodology — from the fixed percentages of Reg T to a prime broker's house model — is an answer to one question: if this client defaults now, and I liquidate over the next few days, how much do I lose?This track walks the whole landscape: rules-based margin, the scenario grids behind portfolio margin and SPAN, the add-ons where real houses differentiate, cross-margining and its correlation traps, what digital assets break, and how the engine is actually built and backtested. There's an interactive lab in every module, and the track connects to the Fixed Income material on VaR, SIMM and repo.
- ⏱️Module 0Available
Initial margin vs variation margin
VM settles the past, IM pre-funds the close-out window — the default timeline, the margin period of risk, segregation, SIMM and MVA.
🎛 Default-timeline simulator
- 🧭Module 1Available
The one question every margin model answers
If this client defaults now, how much do I lose before I'm out? Risk measure, liquidation horizon, add-ons — and why Reg T over-margins hedged books.
🎛 Reg T vs risk-based lab
- 🎯Module 2Available
Portfolio margin & the scenario grid
The OCC/TIMS approach: shock spot and vol across a grid, fully reprice everything, charge the worst cell — the ancestor of every risk-based system.
🎛 Interactive scenario grid
- 📊Module 3Available
SPAN & SPAN 2 — the futures standard
The 16-scenario risk array, the charges that scanning misses (spreads, delivery, the short option minimum), and why SPAN 2 moves to VaR.
🎛 Risk array explorer
- 🧱Module 4Available
House margin — where the add-ons live
The base number is commoditized; concentration (√t), liquidity, gap, wrong-way and stress add-ons are where prime brokers differentiate.
🎛 Add-on stack builder
- 🔗Module 5Available
Cross-margining & the correlation problem
Offsets are only worth granting if the correlation survives the liquidation scenario — stressed correlations, offset caps, and cross-entity netting.
🎛 Correlation stress lab
- ₿Module 6Available
Digital assets — what actually breaks
24/7 markets, vol several times equity scale, venue and custody risk, stablecoin haircuts, and the weekend gap in the margin period of risk.
🎛 Crypto scan-range calibrator
- ⚙️Module 7Available
Inside a margin engine
The seven-stage pipeline from positions to margin call — reproducibility, caching, add-ons as config, and the millisecond pre-trade what-if API.
🎛 Pipeline explorer
- 🚦Module 8Available
Backtesting the margin model
Did losses ever exceed the margin held? Exception counting, Kupiec and Christoffersen tests, and the traffic-light zones — same machinery as VaR backtesting.
🎛 Exception counter
- 🔀Module 9Available
Wrong-way risk
Exposure that peaks exactly when the counterparty is most likely to default — specific vs general WWR, the monoline and crypto-collateral cases, and Basel's alpha.
🎛 Wrong-way scenario lab
Start with Module 0
Initial margin vs variation margin on the default timeline — the two collateral flows everything else in this track exists to compute.
Open IM vs VM →Educational analysis, not investment advice.