CREDIT RISK ENGINE
A portfolio credit loss engine that turns a book of obligor exposures into a full loss distribution, not just an expected-loss number, covering both default risk (exact Panjer recursion) and migration risk (Merton/CreditMetrics-style single-factor stress) as separate, additively-combined capital components.
Go to Repo
THE IDEA
A one-number expected loss hides everything a risk manager actually needs: how fat the tail is, how much a handful of names drive the whole book's capital, and how much worse things get in a downturn. This engine builds the full loss distribution instead, anchored to three real market-data points already retrieved from live IG quotes (PFE volatility shock, collateral haircut, and the risk-free curve), with everything credit-specific (ratings, PD, recovery, transition matrix, correlation) simulated from public-style reference tables and fully documented in a PROVENANCE dict.
Default risk and migration risk are modelled as genuinely separate mechanisms and combined additively into total credit capital, rather than folded into one blended number.
THE THREE SCOPES
| Scope | Method | Output |
|---|---|---|
| 1. Exposure | Ultimate-parent aggregation, EAD incl. derivative PFE add-on, downturn LGD | Per-obligor EAD, PD, LGD, expected loss |
| 2. Default Loss | Banding, negative-binomial frequency, exact Panjer recursion | Full aggregate loss distribution, default capital (99.5%), HHI, marginal capital |
| 3. Migration | Merton-style single-factor stressed transition matrix | Migration capital, reverse stress, combined marginal capital |
DEFAULT LOSS (EXACT, NOT SIMULATED)
Rather than approximating the aggregate default loss distribution with Monte Carlo noise, Scope 2 computes it exactly via Panjer recursion on a Poisson-Gamma (negative-binomial) frequency model, validated against brute-force enumeration to floating-point precision. On an example 18-obligor, $21.0m EAD book, that yields a portfolio EL of $0.96m and a 99.5% default capital of $5.29m.
CONCENTRATION IS CONVEX
A worked example makes diversification tangible: the same $10m of total exposure concentrated in a single name costs roughly 7x more capital per dollar of EAD than the identical exposure spread across 20 obligors, the concentration-convexity result that motivates the leave-one-out marginal capital reported per obligor.
MIGRATION UNDER STRESS
The single-factor Merton stress shifts mass from stay/upgrade toward downgrade/default across the entire transition matrix. On the reference matrix, a CCC-rated obligor's one-year default probability moves from 20% unconditional to 64% under the 99.5% stress, the kind of nonlinearity a static, unconditional transition matrix can't show.
SELECTED CHARTS