Lesson 6.4: Modelling loss given default and exposure at default
Model LGD and EAD: the spike at zero loss, four LGD methods compared, credit conversion factors for revolving lines, and how to combine them with PD.
By the end of this lesson you will be able to build models for the other two parts of expected loss, loss given default and exposure at default. You will see why the distribution of LGD makes it harder to model than default, compare four approaches (bin averages, linear regression, fractional logit and a two-stage model) on one dataset, judge a model with measures that suit a noisy target, estimate a credit conversion factor for revolving lines and weight it correctly, compute the exposure at default of a credit line and combine the three parameters into an expected loss. You should have read Lesson 3.1, which defined LGD and EAD, Lesson 5.4, which binned a predictor against a continuous target, and Lesson 6.1, which fitted a logistic regression. The arithmetic is averages and ratios, and the model results come from calculations on synthetic data built for this course.
Expected loss is the product of three terms: the probability of default, the loss given default and the exposure at default. Lessons 6.1 to 6.3 built the first. Many lenders put most of their effort into PD and use rough averages for the other two, and then are surprised when losses differ from forecasts. For secured and revolving products especially, LGD and EAD are as important as PD, and they need models of their own. They are also harder in some ways, because the targets are not yes or no outcomes but numbers with awkward shapes.
Part one: Loss given default
The data and the shape of the target
The data are 2,000 defaulted secured loans, as in Lesson 5.4, in four bands of loan-to-value ratio (LTV) with 400, 800, 600 and 200 loans. The target is the LGD of each loan: the share of the exposure at default that was lost, after recoveries, costs and discounting, calculated as in Lesson 3.1. The average LGD across all loans is 28.9 per cent, and by band it rises with LTV: 11.0, 22.4, 37.5 and 64.8 per cent. For each loan the data also record whether the loan documents were complete at origination, which turns out to matter: loans with incomplete documents lose more.
The distribution of LGD is nothing like a bell curve. Count the loans in each tenth of the range from 0 to 100 per cent.
Three features of this shape matter for modelling.
1. A spike at zero. A quarter of the loans lost nothing at all, because the borrower caught up or the collateral covered the debt. These are not small losses but exactly none.
2. A long tail towards one. A minority of loans lose most of their value. Real LGD distributions often also have a second bump near 100 per cent for unsecured loans, where almost nothing is recovered.
3. Bounds. LGD cannot go below zero or, usually, above one. A model that predicts −0.05 or 1.2 is breaking a basic rule.
The shape means that methods built for default or for bell-shaped data can mislead. A straight-line regression, for example, assumes errors that are roughly symmetric and unbounded.
A benchmark and four approaches
The sample was split at random into 1,400 loans for development and 600 for testing. Four ways of predicting LGD were fitted and compared.
1. A single average. Predict the overall mean (28.9 per cent, or the development mean) for every loan. This is the benchmark: anything useful must beat it.
2. Bin averages. Predict each loan's LTV band average, as in Lesson 5.4. This is simple, transparent and common. It treats loans within a band alike.
3. Linear regression. Regress LGD on dummy variables for the LTV bands and for the documents flag. This is easy to fit and explain, and it can use several characteristics, but it can predict values outside 0 to 1.
4. Fractional logit. A logistic model for a target between 0 and 1: predict the average LGD as a logistic function of the inputs. The prediction always stays between 0 and 1, and the model can be fitted with the standard logistic machinery by treating LGD as a proportion. It handles the bounds neatly.
5. A two-stage model. First a logistic model predicts whether the loan has any loss at all (LGD above zero). Then a regression predicts the size of the loss among the loans that lost something. The prediction is the probability of loss times the expected size given loss. This matches the shape of the data: the spike at zero is handled in the first stage and the spread in the second.
How to judge a noisy target
Because the target is continuous, the metrics are different from those for default. Three are standard.
Mean absolute error (MAE): the average of the absolute gaps between prediction and outcome, in LGD points. It is easy to read: an MAE of 0.20 means the typical loan is off by 20 percentage points.
Root mean squared error (RMSE): like MAE but weighs large errors more.
R-squared: the share of the variation in LGD that the model explains. Zero means no better than the average, and one means perfect.
The results on the 600 test loans:
Approach · MAE · RMSE · R-squaredSingle average · 0.256 · 0.299 · 0.00
Bin averages (LTV only) · 0.204 · 0.250 · 0.30
Linear regression (LTV bands and documents) · 0.199 · 0.247 · 0.32
Fractional logit · 0.200 · 0.247 · 0.32
Two-stage · 0.200 · 0.247 · 0.32
Four lessons follow from the table.
1. Segmentation does most of the work. Going from a single average to four band averages cut the error from 0.256 to 0.204 and lifted R-squared from 0 to 0.30. The extra model types add only a little, because the data contain one main driver, the LTV band, and one small one.
2. Loan-level accuracy is low, and that is normal. The best R-squared is 0.32, so two-thirds of the variation in LGD is not explained, and the typical loan is still off by 20 points. LGD is intrinsically noisy: two loans with the same LTV can lose 0 and 90 per cent depending on the buyer, the timing and the legal process. This is not a failure of the model. It means that LGD models are best judged on averages for groups of loans, which is how they are used in provisions and capital.
3. Group averages are accurate. In the test sample, the average LGD by band was predicted well.
LTV band · Test loans · Actual average LGD · Linear regression · Fractional logit · Two-stageUp to 60% · 127 · 0.102 · 0.103 · 0.107 · 0.106
60% to 80% · 234 · 0.219 · 0.224 · 0.224 · 0.224
80% to 100% · 171 · 0.380 · 0.367 · 0.366 · 0.366
Above 100% · 68 · 0.653 · 0.645 · 0.645 · 0.644
At the level of the band, every method is within 1.5 points of the actual average. That is the property a lender needs for provisioning and pricing.
4. The shape-aware methods differ at the edges. The fractional logit and the two-stage model cannot produce impossible values by construction. The linear regression produced predictions between 0.09 and 0.72 here, safely inside the bounds, but with a larger dataset or more extreme inputs, a linear model can go below zero or above one and must be clipped. Two-stage models offer a further benefit in interpretation: they tell you separately how likely any loss is and how large it is, which is useful for collections strategy. A loan with a high chance of some loss but a small size calls for a different response from one with a low chance and a large size.
Predict first: would you expect a model for LGD to need more or fewer loans than a model for default to reach a stable estimate? Think about the number of observations each uses before reading on.
It would usually need more, in a sense, and the data are much scarcer. The PD model uses every loan on the book, while the LGD model can use only loans that have defaulted and whose recoveries are complete: a small subset, and often a few hundred or thousand loans. The long recovery period means the data are also old. This is one reason that LGD estimates are less precise, and that lenders lean on simple segmentation and on judgement.
Other issues in LGD modelling
Weighting. As in Lesson 5.4, weight by exposure if the model is for money loss, and treat by count if it is for loan-level experience.
Workout period and open cases. Loans still in recovery have incomplete LGDs. Include only completed workouts, or estimate their final recoveries with a recovery curve.
Downturn LGD. Recoveries fall when asset prices fall and legal processes slow. Regulators and lenders therefore estimate an LGD for downturn conditions, as part of capital and stress testing, which Module 10 covers.
Discounting. Use the same rate as in Lesson 3.1, and state it.
Cures and partial recoveries. Some defaulted loans return to performing. Decide how to treat them (as zero loss, or exclude them) and be consistent.
Collateral value drift. The LTV at default, not at origination, drives recoveries. A model that uses LTV at origination should account for price changes.
Part two: Exposure at default
The idea
The exposure at default is how much the borrower owes at the moment of default. For a term loan it is nearly the outstanding balance, and the schedule of Lesson 1.3 predicts it. For a revolving credit line, such as a credit card or an overdraft, it is harder, because the borrower can draw more as trouble approaches. A borrower who is struggling often uses up the undrawn limit before defaulting, so the exposure at default can be far above the balance a year earlier.
The standard way to model it is with a credit conversion factor, or CCF: the share of the undrawn limit that is drawn between a reference date and default.
> EAD = Drawn balance at the reference date + CCF × (Limit − Drawn balance)
The reference date is usually a fixed time before default, such as 12 months, matching the horizon of the PD. If a borrower has a limit of ₹5 lakh and has drawn ₹2 lakh, and the CCF is 0.467, then the EAD is 2 + 0.467 × 3 = ₹3.40 lakh.
The data and the pattern
The data are 3,000 revolving lines that defaulted, in four bands of utilisation at the reference date, 750 lines in each. For each line the data show the limit, the drawn balance 12 months before default and the balance at default. The average CCF by band:
Utilisation 12 months before default · Mean utilisation · Mean CCF0 to 25% · 12.2% · 0.575
25 to 50% · 37.6% · 0.467
50 to 75% · 62.4% · 0.365
75 to 100% · 87.3% · 0.229
The CCF falls as utilisation rises. This is a common finding. A borrower who has used 90 per cent of a line has little left to draw, so the amount that can be converted is small in absolute terms, and the share drawn is also smaller. Borrowers who were using little tend, when in distress, to draw heavily.
Weight by the undrawn amount
A subtle trap in estimating a portfolio CCF is the averaging. The simple average of the CCF over the 3,000 lines is 0.409. But the lines with low utilisation, where CCFs are high, also have the largest undrawn amounts, so they matter more for the rupees of exposure. The correct portfolio figure is the total amount drawn between the reference date and default divided by the total undrawn at the reference date.
Total undrawn at the reference date across the 3,000 lines: about ₹8,955 lakh.
Total additional drawing before default: about ₹4,321 lakh.
Weighted CCF: 4,321 ÷ 8,955 = 0.482.
The weighted figure of 0.482 is 18 per cent higher than the simple 0.409. If a lender used the simple average on a portfolio dominated by low-utilisation lines, it would understate its exposure at default. The principle is the same as for exposure-weighted LGD in Lesson 3.1: ratios of totals, not averages of ratios.
The simulator: from the line to expected loss
The three parameters come together in expected loss. The simulator below computes the exposure at default of a single credit line from its limit, drawn balance and CCF, and then the expected loss from a PD and LGD.
With the defaults, the exposure at default is 2 + 0.467 × 3 = ₹3.40 lakh, which is 70 per cent higher than the ₹2 lakh drawn today. Expected loss is 0.04 × 0.60 × 3.40 = ₹0.0816 lakh, about ₹8,160, or 1.6 per cent of the limit. A model that used the drawn balance of ₹2 lakh as the exposure would estimate expected loss at 0.04 × 0.60 × 2 = ₹4,800, understating it by 41 per cent.
For a borrower at 80 per cent utilisation (a drawn balance of ₹4 lakh on the same limit), the CCF is lower, say 0.229, and EAD = 4 + 0.229 × 1 = ₹4.23 lakh, only 6 per cent above the drawn balance. The more a borrower has drawn, the closer EAD is to the current balance.
Other issues in EAD modelling
The reference date. The CCF depends on how far before default it is measured. A 12-month reference matches a one-year PD. Some lenders use several reference dates, or the worst of them.
Negative or above-one CCFs. Some borrowers repay in the months before default, giving a negative CCF, or exceed their limit, giving a CCF above one. Treatment varies: cap at 0 and 1 or keep the raw values and discuss.
Limits that change. Lenders may cut limits on stressed borrowers, which reduces undrawn amounts. The CCF must be defined on the limit at the reference date.
Drivers beyond utilisation. Product type, tenure of the account, behaviour (such as recent payment patterns) and the economy all influence drawing. Regression on these, or a fractional logit as in the LGD section, can refine the CCF.
Different products. A term loan has little drawing behaviour, a credit card a lot, and an undrawn commitment to a company (a letter of credit or a guarantee) has its own pattern. Model each separately.
Interest and fees. Whether accrued interest and fees are in the exposure must match the definition used for LGD, as in Lesson 3.1.
Putting it together: a portfolio expected loss
Return to the three-part formula. Take a portfolio of 100 credit lines, each with a limit of ₹5 lakh and ₹2 lakh drawn, so ₹200 lakh drawn and ₹500 lakh of limits. Suppose the PD is 4 per cent, the LGD 60 per cent and the CCF 0.467.
EAD per line: ₹3.40 lakh, so ₹340 lakh across the portfolio.
Expected defaults: 4 per cent of 100 lines, which is 4 lines.
Expected loss: 0.04 × 0.60 × 340 = ₹8.16 lakh.
A lender that had set provisions on the drawn balance, 0.04 × 0.60 × 200 = ₹4.8 lakh, would be short by ₹3.36 lakh, or 41 per cent. This is the cost of ignoring EAD.
In general, the three parameters can be improved independently, and each contributes proportionally: a 10 per cent change in any one of them changes expected loss by 10 per cent, other things equal. That gives a practical way to prioritise effort: where is the estimate most uncertain, and where does a 10 per cent error cost most? For many unsecured lines, the CCF has the greatest effect on the exposure, and for secured loans the LGD.
Building the models in Python
The code below shows the LGD models and the CCF estimate.
python
import numpy as np
import pandas as pd
import statsmodels.api as sm
import statsmodels.formula.api as smf
lgd = pd.readcsv("defaultedloans.csv") # columns: ltvband (0-3), docsincomplete (0/1), lgd (0..1), ead
train = lgd.sample(frac=0.7, randomstate=1)
test = lgd.drop(train.index)
1) bin averages
binmeans = train.groupby("ltvband")["lgd"].mean()
test["pbin"] = test["ltvband"].map(binmeans)
2) linear regression on dummies
ols = smf.ols("lgd ~ C(ltvband) + docsincomplete", data=train).fit()
test["pols"] = ols.predict(test).clip(0, 1)
3) fractional logit (binomial family with a fractional response)
frac = smf.glm("lgd ~ C(ltvband) + docsincomplete", data=train,
family=sm.families.Binomial()).fit()
test["pfrac"] = frac.predict(test)
4) two stages: any loss, then size of loss
train["anyloss"] = (train["lgd"] > 0).astype(int)
stage1 = smf.logit("anyloss ~ C(ltvband) + docsincomplete", data=train).fit(disp=0)
stage2 = smf.ols("lgd ~ C(ltvband) + docsincomplete", data=train[train["lgd"] > 0]).fit()
test["ptwo"] = stage1.predict(test) stage2.predict(test).clip(0, 1)
for col in ["pbin", "pols", "pfrac", "ptwo"]:
err = test[col] - test["lgd"]
print(col, "MAE", round(err.abs().mean(), 3), "RMSE", round(np.sqrt((err 2).mean()), 3))
CCF: weighted by the undrawn amount
lines = pd.readcsv("defaultedlines.csv") # limit, drawnref, balanceatdefault
lines["undrawn"] = lines["limit"] - lines["drawnref"]
lines["draw"] = lines["balanceatdefault"] - lines["drawnref"]
lines["utilband"] = pd.cut(lines["drawnref"] / lines["limit"], [0, .25, .5, .75, 1.0], includelowest=True)
ccf = lines.groupby("utilband", observed=True).apply(lambda g: g["draw"].sum() / g["undrawn"].sum())
print(ccf.round(3))
print("portfolio CCF", round(lines["draw"].sum() / lines["undrawn"].sum(), 3))
Always check where the predictions sit against the bounds, compare group averages with actual averages, and keep a holdout. For the CCF, compute it as a ratio of sums, and report how many lines are in each band.
A worked example: checking an LGD model before use
A lender proposes using the fractional logit model of this lesson to set provisions on a new book of secured loans. How should an analyst test it?
1. Group-level check. Compare predicted and actual average LGD in each LTV band on the holdout. The differences above are all under 1.5 points, which is acceptable.
2. Loan-level check. R-squared of 0.32 and an MAE of 0.20 are typical. Explain to the committee that loan-level accuracy is limited and that the model is for portfolio averages.
3. Population check. Is the new book similar to the development data in LTV mix, documents and collateral type? If the LTV distribution has shifted upwards, the average LGD will be higher even if the model is right.
4. Time check. The development data come from one recovery period. Test against a later one, and against a downturn period if data exist.
5. Sensitivity. What is the average LGD if recoveries are 10 per cent lower in a downturn? Use the model's structure to see which bands are most exposed. Above 100 per cent LTV, recoveries are small to begin with, so a further fall hits hardest in rupees.
6. Document and monitor. Record the data, the method, the results and the limits. Set a monitoring plan that tracks realised LGD on newly completed workouts against the model each quarter.
The result is a model that is not especially accurate for individual loans, and is trustworthy for the use it is put to, which is what matters.
Common mistakes
Treating LGD like default. The target is a number with a spike at zero and bounds, not a yes or no.
Averaging ratios. Compute LGD and CCF as ratios of totals, weighted by exposure or undrawn amount.
Using the drawn balance as the exposure for revolving lines. The undrawn limit adds exposure when trouble comes.
Judging by loan-level R-squared alone. Check group averages, which are what the lender uses.
Including only recovered loans or only completed ones without care. Selection can bias the results. Handle open cases explicitly.
Letting a linear model predict outside 0 to 1. Clip it or use a fractional or two-stage model.
Ignoring downturn conditions. Recoveries and drawing behaviour change in a crisis.
Mixing definitions. Exposure, interest and discounting must be defined the same way in the data and in the models.
Key takeaways
Expected loss is PD times LGD times EAD, and LGD and EAD need models of their own.
LGD data have a spike at zero (25.5 per cent of loans in the example), a long tail and hard bounds, so methods for default or for bell-shaped data can mislead.
Segmentation does most of the work. Going from one average to LTV band averages cut the typical error from 0.256 to 0.204, while fractional logit and two-stage models added only a little.
Loan-level R-squared is low (about 0.32), as LGD is noisy. Judge the model on group averages, which matched actual values to within 1.5 points.
For revolving lines, EAD = drawn + CCF × undrawn. The CCF fell from 0.575 to 0.229 as utilisation rose from the lowest to the highest band.
Weight the portfolio CCF by the undrawn amount: 0.482, against a simple average of 0.409.
Ignoring EAD understated the expected loss of the example line by 41 per cent.
Check yourself
1. A line has a limit of ₹10 lakh, a drawn balance of ₹6 lakh and a CCF of 0.3. What is the EAD?
6 + 0.3 × (10 − 6) = 6 + 1.2 = ₹7.2 lakh.
2. Why is the simple average of CCFs across lines misleading for a portfolio?
Lines with a lot undrawn have the most influence on total exposure, so the CCF must be weighted by the undrawn amount, as a ratio of total additional drawing to total undrawn.
3. A model has an R-squared of 0.3 for LGD at loan level. Is it useless?
Not necessarily. LGD is noisy, so low loan-level R-squared is normal. Check whether average predicted LGD by group matches actual averages, which is how the model is used.
4. What is the advantage of a two-stage LGD model?
It handles the spike at zero by modelling the chance of any loss separately from the size of the loss, keeps predictions in bounds and shows whether risk comes from frequency or severity.
5. PD is 3 per cent, LGD 50 per cent and EAD ₹8 lakh. What is the expected loss?
0.03 × 0.50 × 8 = ₹0.12 lakh, or ₹12,000.
Try this
Build simple LGD and EAD models. Set aside fifty to sixty minutes.
1. Invent or take a dataset of at least 1,000 defaulted loans with an LTV band, a second characteristic and an LGD between 0 and 1. Make about a quarter of the loans have zero loss. Draw the histogram of LGD.
2. Split 70 per cent for development and 30 per cent for testing. Fit the single average, the band averages and a regression with both characteristics. Record MAE and R-squared for each on the test sample.
3. Fit a fractional logit or a two-stage model if you can. Compare it with the regression and note whether any prediction falls outside 0 to 1.
4. Compare the actual and predicted average LGD in each band on the test sample. Write down the largest gap.
5. Create a dataset of at least 500 defaulted credit lines with a limit, a drawn balance 12 months before default and the balance at default. Compute the CCF by utilisation band, both as a simple average and weighted by the undrawn amount.
6. Use the simulator to compute the EAD and expected loss of one line, then repeat it using the drawn balance alone as exposure. Write down the percentage understatement.
7. Write a five-sentence note for a risk committee: what the LGD model explains and does not, which approach you would use and why, the weighted CCF and how it differs from the simple one, the effect on expected loss and the main limit of the data.
A good result is a histogram that shows the spike, a table comparing the methods on error and on group averages, a weighted CCF by band, a worked expected loss that includes EAD and a note that is honest about what the model can and cannot do. With the building blocks of PD, LGD and EAD in place, Module 7 turns to measuring how well models perform, starting with the confusion matrix and the KS statistic.
Tags: Credit Risk Analytics LGD EAD Credit Conversion Factor Expected Loss