Quantitative Finance · Risk Modelling

OTC Derivatives
Margining
Simulator

A Monte Carlo study of liquidity risk, fire-sale dynamics, and procyclical margin requirements in non-centrally-cleared derivatives markets.

Simulation Scale
10,000Monte Carlo paths · 300 trading days
Framework
PythonNumPy · SciPy · Matplotlib
Model
Arith. BMσ = 20% return vol · ATM forward
01

The Case

The 2008 financial crisis exposed a fundamental fragility in OTC derivatives markets. Bilateral credit exposure between counterparties was largely unhedged, and the failure of institutions such as Lehman Brothers and AIG created cascading losses across the global financial system.

In response, regulators mandated margining for non-centrally-cleared derivatives under Basel III, EMIR (Europe), and Dodd-Frank (US). The core idea: require counterparties to post cash collateral that moves daily with mark-to-market values.

But mandatory margining introduces its own risk. Institutions forced to post margin under stress must liquidate assets quickly — often at steep discounts. This creates a liquidity spiral: forced selling depresses prices, which triggers more margin calls, which forces more selling.

The Central Tension

Tighter margin requirements protect the Dealer from credit losses. But they drain the Investor's liquidity buffer, increasing the probability that the Investor defaults not from insolvency, but from running out of cash to meet margin calls.

Regulatory Context

Post-2008 margining rules were calibrated under relatively stable market conditions. The procyclicality problem — that IM requirements double during stress precisely when institutions are most fragile — remains an active area of regulatory debate.

02

What We Built

Price Simulation

10,000 independent asset price paths via arithmetic Brownian motion with dollar volatility σs = σ × S₀ = 20. MTM value Vt = Q(St − K) updates daily.

Two Default Channels

Exogenous Poisson defaults (1% annual PD) and endogenous liquidity defaults when the Investor exhausts both cash and illiquid assets meeting VM calls.

Fire-Sale Mechanics

When cash is insufficient, the Investor sells illiquid assets at a 10% discount. Assets to sell = shortfall ÷ (1 − h), so each sale incurs a permanent wealth loss of h × assets sold.

MPOR Close-Out

On default, VM exchange freezes for 10 days (the Margin Period of Risk). The Dealer closes out at t + MPOR. Loss = max(0, −Vclose − collateral held).

Regime-Switching Vol

For procyclicality analysis, volatility switches from 15% to 30% when the daily price drop exceeds 2% of S₀, triggering an IM top-up demand simultaneous with the VM call.

Systemic Externality

Endogenous haircut ht = min(h₀ × (1 + θ · ft−1), 50%) where ft−1 is the lagged fraction of institutions fire-selling, creating a liquidity spiral.

Key Equations
IM = z₀.₉₉ · Q · σₛ · √(MPOR · dt) = $9,268 VMt = Vt − Vt−1 = Q · (St − St−1) ~ N(0, Q²·σₛ²·dt) Dealer Loss = max(0, −Vt+MPOR − (IM + last VM payment))
03

Main Results

Total Default Rate
36.3%
vs 1.4% exogenous only
Liquidity-Driven Defaults
3,492
of 3,632 total defaults
Paths with Fire-Sales
59.9%
Mean cost $833 per affected path
Mean Dealer Loss
$4,557
P99: $20,620 · Max: $28,089
Policy Experiment 6a
How does raising the Initial Margin multiplier affect the risk/liquidity trade-off?
IM Multiplier IM ($) Default Rate Liq. Default Rate Mean Fire-Sale Cost Mean Dealer Loss
1.0× (baseline) $9,268 36.3% 34.9% $499 $4,557
1.5× $13,903 48.2% 46.8% $646 $1,934
2.0× $18,537 61.5% 60.1% $812 $121 ↓↓
2.5× $23,171 77.2% ↑↑ 75.8% $972 ↑↑ $0 ↓↓↓

Higher IM fully protects the Dealer but systematically destroys Investor liquidity. At 2.5×, Dealer losses reach zero while 77% of Investors default — all from liquidity exhaustion, not insolvency.

Policy Experiment 6c
Does a shorter Margin Period of Risk reduce systemic risk?
MPOR IM ($) Default Rate Mean Fire-Sale Cost Mean Dealer Loss P99 Dealer Loss
10 days (baseline) $9,268 35.1% $493 $4,426 $20,624
5 days $6,554 29.5% $414 $5,262 $24,091
3 days $5,077 26.9% ↓↓ $377 ↓↓ $5,532 ↑↑ $25,886 ↑↑

Reducing MPOR lowers the IM requirement, reducing defaults and fire-sale costs for the Investor. But the Dealer closes out with less collateral, increasing tail losses. A true two-sided trade-off.

Policy Experiment 6b
Daily vs Weekly VM Settlement
MetricDailyWeekly
Default rate36.3%34.3%
Mean dealer loss$4,557$4,656
Mean fire-sale cost$499$505
Fire-sale events/path5.092.34

Weekly VM reduces event frequency but concentrates exposure into larger lump-sum calls. Outcomes are nearly identical — the risk is rescheduled, not reduced.

Policy Experiment 6d
Accepting Illiquid Assets as VM Collateral
MetricFire-SalesPledging
Default rate36.3%36.3%
Fire-sale cost$499$0
Mean illiquid pledged$4,406
Mean dealer loss$4,557$1,762

Pledging eliminates fire-sale costs and reduces Dealer losses (more collateral held). Default rate unchanged — the Investor's solvency problem remains. Risk is redistributed, not eliminated.

Section 7 — Procyclicality and Systemic Risk
What happens when IM is recalculated from current stressed volatility?
ScenarioDefault RateMean Fire-Sale Cost
Fixed-vol baseline36.3%$499
Procyclical IM79.1%$1,037
Systemic (endogenous h)36.4%$520
Stress-regime IM spike
+100%
$6,951 → $13,903 when vol doubles from 15% to 30%
Through-the-cycle IM alternative
$7,087
Stable level based on long-run mean vol (15.3%) — avoids the spike

Procyclical IM more than doubles the default rate — from 36% to 79% — by demanding additional cash top-ups precisely when prices are falling. The through-the-cycle alternative holds IM near $7,087 regardless of current vol, avoiding the spiral at the cost of slightly underestimating risk in calm periods.

04

Key Findings

01

Liquidity default dwarfs credit default

96% of all defaults in the simulation are liquidity-driven — the Investor runs out of assets to meet margin calls, not because it is insolvent. A 1% annual credit probability becomes a 36% actual default rate under realistic balance sheet constraints.

02

Tighter IM is a strict trade-off

Doubling the IM multiplier reduces mean Dealer losses from $4,557 to $121 but raises the default rate from 36% to 62%. At 2.5×, Dealer losses vanish entirely while 77% of Investors default from liquidity exhaustion.

03

Pledging redistributes, not reduces, risk

Accepting illiquid assets as collateral eliminates fire-sale costs and reduces Dealer losses through better collateralisation. But the Dealer now holds illiquid assets it must liquidate at the same 10% haircut on default. The systemic risk is shifted, not removed.

04

Procyclical IM is catastrophic under stress

Recalculating IM from current stressed volatility more than doubles the default rate — 36% to 79% — by simultaneously demanding IM top-ups and VM payments when prices are falling. Through-the-cycle IM avoids the spiral at minimal cost in normal times.

05

MPOR reduction is genuinely two-sided

Cutting MPOR from 10 to 3 days lowers the IM requirement by 45%, reducing defaults and fire-sale costs for the Investor. But the Dealer closes out with less collateral, raising the P99 Dealer loss from $20,624 to $25,886.

06

VM frequency reschedules, not reduces, risk

Weekly settlement halves the number of fire-sale events per path but concentrates exposure into larger lump-sum calls. Total defaults, fire-sale costs, and Dealer losses are nearly identical to daily settlement — the risk is rescheduled, not mitigated.