Basic Prerequisites: 01 · From Zero.
1. Intuition & Practical Objective
Contagion is the mechanism by which an idiosyncratic failure becomes a system failure. This page’s objective: build the standard tools - the exposure matrix, the loss-propagation cascade, and the connectivity-dependence result - and learn from the numbers that more connectivity is neither always safe nor always dangerous.
The core object is the exposure matrix , where is the claim bank holds on bank . Rows are creditors, columns debtors. Two derived quantities:
- Out-degree (bank ‘s number of counterparties it lends to) - with a fixed total lending split evenly, a higher out-degree means smaller individual exposures.
- Capital buffer - losses absorbed before default.
The cascade rule is the one from §01 generalised to an arbitrary graph: a bank defaults when cumulative losses exceed capital; the default then imposes its full claim on each creditor. Iterate to a fixed point.
The headline empirical pattern (Gai–Kapadia 2010) is robust-yet-fragile: moderate connectivity is the most dangerous - individual exposures are still big, but the channel connecting them now spans the system - whereas very high connectivity diversifies each exposure to the point where the shock is absorbed. The experiment below reproduces a non-monotone default count with a subtle twist you should notice.
2. Mathematical Ground Truth & Derivations
The cascade in matrix form (Eisenberg–Noe 2001 picture). Let be bank ‘s external/net capital, interbank claims, and its total claims. In a clearance round, bank ‘s value after payments satisfies, for a default-absorbing allocation,
where a defaulting pays creditors proportionally to its remaining value (a clearing condition). The default of one bank reduces other banks’ assets through the second term, which can push them negative, which changes their payments, etc. - a fixed-point problem. The simple sequential/cascade version (what we compute) drops the proportional-recoveries subtlety and treats a default as a full write-off, which is conservative and standard for first-pass contagion analysis.
Connectivity and exposure concentration. Fix total lending and connectivity probability . Expected out-degree , so each exposure . A defaulting counterparty’s hit on a creditor is . Two regimes:
- Sparse, small: each exposure → one default bankrupts its creditor → chain of concentrated hits. Fragile.
- Dense, large: each exposure → a default hurts but doesn’t kill → “diversification by connectivity” contains it.
Hence the default count is non-monotone in - which is exactly why “more connected = safer” is a false slogan.
3. Computational Implementation - contagion on a random network
We build a random directed interbank network, knock out a few banks, and let the cascade run. Lower connectivity concentrates losses (big per-edge exposures) into effective contagion; very high connectivity diversifies them away. Stdlib only.
Read the output. Sparse/moderate connectivity (–) turns the four seeded failures into near-complete collapse (35–40/40 defaults): each bank has few, large exposures (with and out-degree –, a single exposure wipes a full neighbour). But at (out-degree ) each claim is only , so a neighbour survives the loss and the contagion sputters at . This non-monotonicity is the robust-yet-fragile result: diversifying the network past a point converts a single-bank failure from a shock-wave into a contained dent - but only because each edge is then too small to breach a neighbour’s capital. The danger hump sits in the middle, where edges are still big enough to kill and many enough to transmit.
4. Failure Modes & First-Principles Breakdowns
- Partial observability of . The entire method needs the adjacency/claim matrix, but interbank exposures are opaque (bilateral netting, off-balance-sheet, CCP positions). Missing edges are exactly the ones that matter for contagion - the model is most fragile where it is most useful.
- Full recovery is not full write-off. Sequential models treat a default as 100% loss to creditors; in reality recovery/fire-sale values are partial and endogenous to how many default simultaneously (the recovery rate itself is a systemic quantity). Eisenberg–Noe gives a fixed-point correction, but with unknown collateral it stays approximate.
- Static graph, dynamic system. Networks rewire during stress (counterparties cut lines, flight-to-quality); the pre-crisis you measured is not the post-crisis . Connectivity is endogenous to the stress it transmits.
5. References
- Eisenberg & Noe, Systemic Risk in Financial Systems, Management Science 47(2):236–249 (2001)
- Gai & Kapadia, Contagion in Financial Networks, Proc. R. Soc. A 466 (2010)
- Allen & Gale, Financial Contagion, JPE 108 (2000)
- Gregory, The xVA Challenge (2025)
6. Connected Graph Bridges
- Back: 01 · From Zero · Index Hub
- Forward: 03 · Systemic Risk Measures
- Sibling mechanisms: Margin & Funding Spirals (the fire-sale channel) · Counterparty Contagion