Prediction markets · Portfolio margin
A portfolio-margin framework for binary prediction markets
Prediction-market portfolios sit awkwardly inside conventional margin engines. Payoffs are binary, contracts can correlate through systematic factors that don't map cleanly to delta exposure, and a position you'd call a hedge on paper can leave threshold-divergence basis risk uncovered. This project is a working margin framework that takes those structural features seriously.
What the framework does
- Organizes contracts under a generalized asset hierarchy (Crypto / Equity / Macro / Politics / Sports) and derives the full inter-cluster correlation matrix by lowest-common-ancestor rules rather than hand-tuning a 64-cell grid.
- Computes 99% expected shortfall per cluster, then aggregates with a multi-factor Monte-Carlo driven by latent systematic factors and contract-level idiosyncratic noise — and floors the result at a top-2 concentration value so single-cluster blow-ups can't be correlation-diversified away.
- Surfaces a structural insight that the dashboard makes obvious: long-X / short-Y on co-moving assets gets ~0% offset at the 99% confidence level for binaries, because what matters at the tail is whether each leg crosses its threshold, not how they co-move on average.
Headline result
On the 8-cluster reference portfolio: full collateralization is $63,097; portfolio margin is $18,313 — a ~71% capital release. With several correlated risk-asset classes present, the correlation-aggregated base ($13,257) overtakes the top-2 concentration floor ($11,426), so the systematic correlations — not the concentration floor — are what bind.
Drive it yourself
The dashboard below is the same engine as the paper: add or edit positions across BTC, ETH, SOL, S&P 500, oil, plus the politics and sports clusters; pull the two systematic-factor correlations on sliders; re-run the joint Monte-Carlo; and inspect how the binding margin component changes.
If the dashboard doesn't load, drop margin_dashboard.html into public/legacy-dashboards/ — see the README under source-imports/.