Bayesian Methods for Risk
What do you do with a portfolio of 300 loans and zero defaults? Frequentist statistics shrugs; Bayesian methods answer. Priors as reference classes, beta-binomial machinery, and shrinkage across segments.
Here is a question every credit shop eventually faces, stated at its sharpest: you lend to 300 project-finance borrowers over five years and observe zero defaults. What is the PD? The frequentist answer — the maximum likelihood estimate, defaults over loans — is 0%. Which is not an estimate; it’s a wish. Feed PD = 0 into pricing, provisioning, or the IRB formula and you’ve declared the portfolio risk-free on the evidence of not-yet. Everyone knows this is wrong. Bayesian methods are the machinery for saying precisely how wrong, and what to say instead.
The move: probability as updated belief
The Bayesian recipe never changes: start with a prior distribution over the unknown (here, the PD), observe data, and produce a posterior — beliefs after evidence — via Bayes’ rule:
The controversial ingredient is the prior — where did it come from? In risk work the honest answer is usually the reference class: what has this kind of exposure done historically, across the industry, before I saw my own book? Rating-agency long-run default studies (Module 8 of the credit track), Basel’s own floors, portfolio data from similar segments. Far from being unscientific, a disciplined prior is the outside view — starting from the base rate of things like this, then letting your specific data pull you away from it exactly as fast as its sample size deserves.
The workhorse: beta-binomial
For a PD estimated from defaults in loans, the conjugate machinery makes everything closed-form. Give the PD a Beta() prior — most intuitively parameterized as a prior mean and a prior strength (in pseudo-loans): , . Observe the data, and the posterior is simply
with posterior mean
Read the last form slowly, because it’s the whole philosophy in one line: the estimate is a weighted average of the prior mean and the MLE, with weights proportional to their sample sizes — pseudo-loans of prior experience against real ones. Small book? The reference class dominates, as it should. Ten thousand loans? Your data drowns the prior, as it should. The transition is automatic, smooth, and auditable.
Work the zero-default problem yourself:
Set and watch the posterior: it piles up near zero but assigns real probability to PDs of 1–2% — the data cannot distinguish “safe” from “lucky so far,” and the posterior says exactly that. Now raise with still 0: the credible interval tightens toward zero honestly, at the rate the evidence actually accumulates. Then flip the regime: , — the prior fades to a whisper. The estimator needs no supervision; it becomes frequentist precisely when frequentism earns it. (One classical patch deserves mention: the “rule of three” — with zero events in trials, the 95% upper bound is roughly . It’s a decent emergency approximation, and the notebook shows it’s close to what a flat-prior posterior says.)
Shrinkage: many small segments, one portfolio
The single-segment problem generalizes into the shape credit actually has: dozens of segments, most too small to estimate alone. Regional books, industry buckets, product variants — each with its own “true” PD, each with laughably little data. Two bad options present themselves: estimate each segment separately (noise — this year’s zero-default segment is next year’s embarrassment) or pool everything (blindness — segments genuinely differ).
The Bayesian answer is the middle path with a mechanism: hierarchical modeling. Let each segment’s PD be drawn from a shared portfolio-level distribution, estimate that distribution from all segments jointly, and then each segment’s estimate gets pulled — shrunk — toward the portfolio center, with small segments pulled hard and large segments barely moved. The empirical-Bayes version is exactly the beta-binomial above run per segment, with the prior itself fitted from the cross-section of segments. The effect on a league table is immediate and healthy: extreme small-sample segments (0% here, 9% there, on thirty loans each) migrate toward the middle, and what remains at the extremes is the differences the data can actually support. This is the same statistical phenomenon behind regression to the mean — used on purpose, instead of suffered.
Credible intervals, and saying what you mean
A payoff worth the whole framework: Bayesian intervals mean what everyone already thinks intervals mean. A 90% credible interval is a statement about the parameter — “given the evidence, the PD is in this range with 90% probability.” The frequentist confidence interval famously is not that (it’s a statement about the procedure’s long-run coverage), and the difference stops being pedantry exactly where risk lives: small samples and boundary cases like , where classical intervals misbehave and the credible interval stays sensible. When your uncertainty statement feeds a pricing buffer or a conservatism add-on, you want the version that means what the committee will inevitably assume it means.
The same logic extends to everything downstream of an estimated PD: the posterior is a distribution, so anything you compute from PD — expected loss, a capital number, a price — inherits a distribution too. Instead of one number plus hand-waving, you get “the loss is 40–90bp with 90% probability,” which is the honest input to a decision about buffers. Uncertainty stops being a caveat and becomes an object you can propagate.
When to reach for this toolkit
Not everywhere — on big retail portfolios the data overwhelms any prior, and Module 2’s frequentist scorecard pipeline is the right tool. The Bayesian machinery earns its complexity where data is structurally scarce: low-default portfolios (sovereigns, banks, project finance — where regulators explicitly demand conservative PD estimation and this is the coherent way to be conservative), new products and new segments (no history by definition — the prior is the launch decision, made explicit), small-segment league tables (shrinkage), LGD with few workout observations, and expert-plus-data blends (an underwriter’s judgment expressed as pseudo-observations, then updated — rather than argued about in meetings). The common thread: whenever someone says “we don’t have enough data to estimate that,” the Bayesian reply is “then let’s be precise about what we believed beforehand and how far this data moves it.”
Where this connects
- The prior-as-reference-class idea is the statistical formalization of the outside view — the same discipline as benchmarking a segment against rating-agency long-run tables before trusting your own history.
- Zero-default machinery is what regulators informally expect behind low-default-portfolio PDs feeding the IRB formula; prior sensitivity analysis is SR 11-7 effective challenge applied to assumptions.
- Shrinkage reappears inside ML as regularization — a ridge penalty is a Gaussian prior — connecting this module to every regularized model in credit Module 12.
- Updating beliefs as data arrives is the principled version of what Module 6’s monitoring does operationally.
Try it yourself
The notebook below implements the full toolkit with nothing beyond numpy/scipy: beta-binomial updating with the pseudo-loan parameterization, the zero-default problem with credible intervals versus the rule of three, prior-sensitivity tornado plots, and an empirical-Bayes shrinkage model across twenty synthetic segments — watch the league table reorder as small segments shrink toward the center, then check which version predicts the next simulated year better (spoiler: shrinkage wins, every time the truth is drawn from the hierarchy). The closing exercise prices a conservatism buffer directly off the posterior.
Get new posts by email
One email per new article. No spam, no upsells, unsubscribe anytime.