A logistic regression credit model gives a probability of default in three exact steps, and each answer on the application can be read as an odds ratio rather than a change in percentage points.
To turn a logistic regression into a probability of default, add the intercept to each coefficient times the applicant's input, which gives the log-odds of default z, then take PD = 1 / (1 + e−z). On the small-business scorecard of Machine Learning for Finance, an applicant in construction with no county court judgment has z = −2.8324, so the PD is 5.56 per cent, a score of 568.85. Change one answer, a judgment in the last twelve months, and the same arithmetic gives 21.29 per cent.
Worked in full in Machine Learning for Finance by Julian R. Sterling, with every figure reproduced in a free workbook.See the book on Amazon →
Every credit model eventually has to answer one applicant at a time: the credit committee asks why a case was declined, the validator asks for a reperformance, the regulator asks for an explanation in words. A logistic regression is the one model where that answer is an exact sum you can write on a page. The three things that go wrong are all in the last step: reading the odds as the probability, reading a coefficient as a change in PD, and forgetting which population the intercept belongs to.
The book's card has seven characteristics, each coded as a weight of evidence, WoE = ln(share of goods / share of bads), as worked in how to calculate weight of evidence and information value. The regression predicts the log-odds of default, so the coefficients on a WoE input come out close to −1: a bin with more goods than average pushes the log-odds of default down.
| Characteristic | Applicant's bin | Coefficient | WoE | Coef × WoE |
|---|---|---|---|---|
| Age of business | 24-47 months | −1.0021 | 0.1013 | −0.1015 |
| Debt service cover | 1.25-1.49 | −1.0890 | 0.1062 | −0.1157 |
| Net debt / EBITDA | 2.50-3.49 | −0.9934 | 0.0574 | −0.0570 |
| Sector | Construction | −1.0810 | −0.2878 | 0.3111 |
| Worst CCJ | None | −1.0351 | 0.2693 | −0.2788 |
| Bank conduct score | 50-64 | −1.1475 | −0.0791 | 0.0908 |
| Loan to value | 0.60-0.74 | −1.1686 | −0.0146 | 0.0171 |
| Intercept plus the seven terms: log-odds of default, z | −2.8324 | |||
The case and its 8,400 applications are fictional; the coefficients are the ones carried in the book's workbook.
1. Linear predictor: z = −2.69832 − 0.1015 − 0.1157 − 0.0570 + 0.3111 − 0.2788 + 0.0908 + 0.0171 = −2.8324
2. Odds of default: ez = e−2.8324 = 0.0589, one bad for every 16.99 goods
3. Probability: PD = odds / (1 + odds) = 1 / (1 + e2.8324) = 5.56%
4. On the points scale (20 points to double the odds, 600 at 50 to 1): score = 487.1229 − 28.8539 × z = 568.85
Excel, with coefficients in B2:B8, the applicant's WoE in C2:C8 and the intercept in B1: =1/(1+EXP(-(B1+SUMPRODUCT(B2:B8,C2:C8))))
Step 4 is the same number in another unit: the scorecard is a linear rescaling of z, which is why the factor and offset let you go from points back to a PD and forth again without loss.
Change one bin at a time and the term for that characteristic moves by its coefficient times the change in WoE. That shift multiplies the odds by eΔz, the odds ratio. It does not add a fixed number of percentage points to the PD.
| Change | Δz | Odds ratio | PD | Change, pts | Score |
|---|---|---|---|---|---|
| Base applicant | 0 | 1.000 | 5.56% | 0.00 | 568.85 |
| Worst CCJ 12-36 months ago | 0.9950 | 2.705 | 13.74% | +8.18 | 540.14 |
| Worst CCJ under 12 months | 1.5247 | 4.594 | 21.29% | +15.73 | 524.85 |
| Debt service cover under 1.00 | 0.7316 | 2.078 | 10.90% | +5.34 | 547.74 |
| Debt service cover 2.00 or more | −0.9027 | 0.405 | 2.33% | −3.23 | 594.90 |
| Sector: manufacturing | −0.7382 | 0.478 | 2.74% | −2.82 | 590.15 |
A recent judgment is the single heaviest answer on the card: it costs 43.99 points and multiplies the odds of default by 4.594. How many percentage points that is depends entirely on where the applicant starts.
| Starting PD | PD after a recent CCJ | Change, pts |
|---|---|---|
| 1% | 4.43% | +3.43 |
| 2% | 8.57% | +6.57 |
| 5% | 19.47% | +14.47 |
| 10% | 33.79% | +23.79 |
| 20% | 53.46% | +33.46 |
A reason code that says "a recent CCJ added 15 points of PD" is true for this applicant only. The stable statement is in odds or in score points: 4.594 times the odds, 43.99 points, whoever the applicant is.
The card is rebuilt from counts, and every applicant rescored row by row from the points table, in the free workbooks for this case, with the seven coefficients and the intercept in the blank set for your own card.
Probability = 1 / (1 + e to the power of minus the log-odds). A log-odds of default of -2.8324 gives odds of 0.0589, one bad for every 16.99 goods, and a probability of 0.0589 / 1.0589 = 5.56 per cent. In Excel the conversion is =1/(1+EXP(-z)); exp(z) alone is the odds, not the probability.
It is the change in the log-odds of default for a one-unit change in the input. For a weight of evidence input it sits near -1. Its effect on the odds is e to the power of coefficient times the change: moving from no CCJ to one under 12 months shifts the log-odds by 1.5247, which multiplies the odds by 4.594 whatever the applicant.
Because a weight of evidence of zero means an average bin, so an applicant with every WoE at zero is an average applicant. In the illustrative card the intercept of -2.69832 gives a PD of 6.31 per cent, against a development bad rate of 6.32 per cent, 379 bads in 6,000 loans. Score a population that defaults at 12.625 per cent and the intercept needs recalibrating.
This article is one calculation from Machine Learning for Finance. The book takes the same case from first principles to the decision, chapter by chapter, and every figure it prints is a live formula in the free companion workbooks.
Get the book on Amazon →Free companion files
Also on Amazon UK · Amazon Germany · Amazon France · Amazon Canada
Reading guide: corporate finance, valuation and markets → · All 1340 articles →
If this book helped, or didn’t, a few lines on Amazon are worth more than they look: they are what the next reader goes on. Write a review. The workbook stays free either way.