Run
Layers
Quality
Numerical checks
The science
Expected loss
Each loan has a probability of default PD, a loss given default LGD and an exposure EAD: EL = PD · LGD · EAD. A bank prices this in; it is the average loss, not the risk.
One-factor model (Vasicek)
Borrower i defaults when its asset value Ai = √ρ Z + √(1-ρ) εi falls below Φ-1(PD). Given the shared economy Z ~ N(0,1), defaults are independent with PD(Z) = Φ((Φ-1(PD) - √ρ Z)/√(1-ρ)). In the hall, the gold ball on the gauge is Z; low Z (recession) turns many tiles red at once.
Loss distribution
For a large homogeneous portfolio, P(L ≤ x) = Φ((√(1-ρ) Φ-1(x/LGD) - Φ-1(PD))/√ρ) and VaRα = LGD · PD(-Φ-1(α)). The Basel IRB capital charge is K = VaR99.9% - EL, with ρ(PD) = 0.12 w + 0.24 (1-w), w = (1-e-50 PD)/(1-e-50).
Honest simplifications
Constant LGD and PD, no maturity or migration, Gaussian copula (understates joint extreme defaults), one factor. With concentration on, tile height shows loan size and the simulated tail exceeds the infinite-granularity formula. Above 2500 loans only the first 2500 tiles are drawn. Educational model, not a regulatory calculator or financial advice.