← Derivatives Underwriting Workbench

Monte Carlo exposure & CVA

A browser version of the workbench's core idea. It simulates the mark-to-market of a swap-like trade, applies a CSA threshold, and computes Expected Exposure (EE), 95% Potential Future Exposure (PFE), and unilateral CVA.

Illustrative only · synthetic data · simplified model, not a pricing tool

Notional 100 · 2,000 paths · LGD 60% · discount rate 3% · 5-day margin period of risk ignored for clarity.

CVA (% of notional)

–

Peak EE

–

Peak PFE 95%

–

Default prob. over tenor

–

━ sample MtM paths━ EE━ PFE 95%┅ CSA threshold H░ default-weighted EE (drives CVA)

Model

MtM(t) = σ·W(t)·(T−t)/T·N, a Brownian driver with linear amortization (the classic swap "hump"). Collateral posted C(t) = max(MtM(t) − H, 0), so exposure E(t) = min(max(MtM(t), 0), H). EE(t) = mean E(t); PFE(t) = 95th percentile of E(t). CVA = LGD · Σ DF(tᵢ) · EE(tᵢ) · [e^(−λtᵢ₋₁) − e^(−λtᵢ)].