Companion files
A Practitioner’s Guide to Building, Validating and Defending a Credit Model That Decides
These are the companion files of Machine Learning for Finance by Julian R. Sterling.The book on Amazon →
Also as an ebook on Apple Books · Google Play.
The four Excel workbooks that go with the book, corrected where they were wrong. Every figure the book prints is reproduced in them by a live formula rather than a typed constant, the score is rebuilt row by row from the points table, and each workbook ends with a Checks sheet setting the printed figure beside the computed one: 156 controls in all, every one green. Around them: the same four models with the inputs emptied, thirteen working documents to print, forty questions that mark themselves, and three cases the book names and never takes to a number. Nothing is locked, protected or watermarked.
Free to download. No sign-up, no email address, nothing to fill in.
Eleven workbooks, the question book, the printable documents and the read-me. Each group below can also be downloaded on its own. Last revised 24 September 2026.
Reading the paperback or the Kindle edition? The same book is also sold as a DRM-free PDF: searchable, printable, yours on any device. $19.99, instant download.Buy the PDF edition → Free sample
Finished the book? Two or more PDF editions bought together are 15% off. Browse the PDF editions →
The working models behind the books, built out for live deals: the Pro models →
Optional. When a workbook on this page is corrected or a new worked case goes up, readers on the list get one email, plus a short note when a new book comes out. The downloads do not need it.
Join the reader listRun by MailerLite, off this site. How your address is used.
These carry the book’s own figures and its 8,400 applications, so that every number it prints can be traced to a live formula, and each closes on its checks sheet. Download these four1,196 KB
Chapters 1 to 6
Eight thousand four hundred applications as a filterable table, and the whole scorecard built on top of them from nothing but counts. Bin tables for all seven characteristics, the weight of evidence as the logarithm of the ratio of good share to bad share, the contribution of every bin to the information value, and the information value as a column total.
The eighth characteristic is there too, the one that cannot be used: days past due at month three, with an information value of 2.8606 against 0.2471 for the best usable field on the extract. Put it into the model and the area under the curve goes from 0.7353 to 0.9125. It is measured three months after the money is lent. The points table then derives its own factor and offset from twenty points to double the odds and six hundred points at fifty to one — 28.8539 and 487.1229 — rather than taking them as given. Revised: the read-me placed the boosted-tree score in column K of workbook 4’s Data sheet; it is column I. Three identity checks added.
Download the workbook289 KBChapters 7 to 10
The score is rebuilt row by row from the points table by lookup, not carried, and reconciled against the reference model to seven decimals. On top of it: the ten development bands, the area under the curve by ranks — 0.735329 — Gini at 0.470659, and KS at 0.341154 with its exact location on the scale.
Then the distinction the book is built on. Out of time the ranking barely moves, to 0.718513. The level moves a great deal: the card under-predicts the bad rate in nine bands out of ten, by 9.612 percentage points in the worst. The sheet solves the single-parameter fix on the page — an intercept shift of 0.573620 in log-odds, which is 16.55 points — and shows what it does and does not repair. Revised: this page described that sheet before it existed; the Calibration sheet now solves the shift by Newton’s method in live formulas. It takes the largest under-prediction from 9.612 points to 1.470, leaves six bands under-predicted and widens the top band’s gap from 0.416 to 1.322.
Download the workbook447 KBChapters 11 and 12
The out-of-time distribution laid on the fixed development boundaries, which is the only way to see a population move: recompute the deciles on the new population and you erase exactly what you were trying to measure. Every population stability index term appears as its own row — share difference times the logarithm of the share ratio — summing to 0.090517, with the top band alone contributing 0.029335 as it falls from 10.00 per cent of the book to 5.33.
Then the sample nobody quotes. Through the door the applications run at 8.1190 per cent bad; the accepted book runs at 5.2224 per cent and the declined at 12.7554 per cent. The sheet carries the split the four hand-written policy rules produced, as the previous policy recorded it, and reconciles it to 682 bad cases, so you can watch a model's measured accuracy change with nothing but the population it is measured on. Revised: the page said the split was rebuilt from the rules; it cannot be, because three of the four cut inside a bin. Where a rule can be tested it holds, with no accepted case under a 12-month judgment or below 1.00 of cover.
Download the workbook430 KBChapters 13 to 15
The unit economics derived on the sheet rather than asserted: 185,000 of exposure at 4.12 per cent of margin less 640 of cost gives 6,982 for a loan that performs; 41.7 per cent of loss plus the same 640 gives minus 77,785 for one that does not; the swing is 84,767 and the break-even bad rate is 8.2367 per cent.
Both profit grids run live from 480 to 640 points. On the development book the peak is at 550 points, approving 83.50 per cent and earning 17,348,284; at 600, the score a nervous committee reaches for, the same book earns 5,596,817. Switch the grid to 2020 and 2021 and the peak has moved thirty points, to 580: a policy left at 550 turns 2,563,882 into a loss of 149,416. The last sheet sets the card against a hundred and eighty boosted trees at equal approval rates, in both years. Revised: the move from 550 to 600 leaves 4,002 loans unwritten, 3,811 of them good, so each of the 191 defaults avoided costs 19.95 good loans against the 11.1408 one default is worth, not “nineteen and a half” against 12.1408.
Download the workbook463 KBThe four workbooks with the 15 inputs of their shared Inputs sheet emptied. The checks sheets count what is still missing and test what holds for any inputs.
All chapters
The card, discrimination and calibration, stability and the door, and the cut-off, with the same formulas and every assumption emptied: the points scale, the unit economics of one loan, and the seven fitted coefficients with the intercept. The 8,400 applications stay on the Data sheet, because they are the evidence the card is built from, not an assumption; a book of your own goes there in the same layout. The cut-off grid and the approval rates stay too, because they are the axes of their tables, not data.
The book’s 15 inputs are listed in a text file inside the archive. Type them back in and the book’s figures come back with them: an area under the curve of 0.735329, a stability index of 0.090517, 17,348,284 at a cut-off of 550.
Download the blank set812 KBThirteen pages to print and use. A4, with margins wide enough for US Letter.
Chapters 1 to 15
The model brief, with the definition of bad fixed before anything else. The characteristic review, availability first. The bin table, built from counts, with debt service cover beside blank rows. The points table and its scale. The leakage test, five questions for a field that looks too good. The discrimination report with its population stated. The calibration table on fixed bands. The recalibration memo. The stability report on the development boundaries. The through-the-door reconciliation. The unit economics and the break-even. The cut-off paper, both years on one page. The card against the trees, and the sign-off.
Download the PDF36 KBA workbook that marks itself. Answer in the yellow cells; the marking fills in as you go.
All parts of the book
Seven on the card, seven on ranking and level, six on drift and the door, seven on the cut-off, six on trees, leaks and which area under the curve to quote, and seven on the three cases below. Numbers are marked to a tolerance, multiple choice to the letter, and the score sheet counts your errors part by part: that is your revision list.
Nothing is hidden. The marking sheet holds every answer, every tolerance, and the reason for each answer.
Download the question book17 KBNew material, not a restatement. Three situations the chapters name and never take to a number. Each case is one workbook: the note is the first sheet, the model is the rest, and a checks sheet closes it. Type your own figures in and every finding recomputes.
Chapters 11 to 15 · Case one
The book names the reject inference problem “in two numbers” and stops. Drawn on the accepted book, the only outcomes a real lender holds, the profit grid peaks at 560 in development, which earns 531,238 less at the door than 550; out of time it peaks at 570, not 580. Worse, the accepted book says the inherited 550 still earns 1,205,065 in 2020-2021, where at the door it loses 149,416. The slab from 550 to 559 decides it: 9.20 per cent bad among the accepted, 7.17 per cent at the door.
Chapters 13 to 15 · Case two
Every cut-off is the best over a band of break-even rates, and the band comes from the grid alone. In development 550 is best for any margin from 3.59 to 5.21 per cent. To want 580, as 2020-2021 did, the margin would have to fall to 2.65 per cent, or the loss given default rise to 68.4; to keep 550 right out of time the margin would have to be 7.81 per cent. Re-pricing cannot rescue the old cut-off.
Chapters 1 to 12 · Case three
Days past due at month three cannot decide a loan; it can watch a book. At 100 applications a month and 99 per cent confidence (ADDED), arrears at month three flag 2020-2021 in month 5.7; the outcome itself, which the definition of bad delays eighteen months, in month 19.8; the stability index never. Spread evenly (ADDED), the earlier alarm saves 1,595,523 of the 2,713,298 the old cut-off cost.
Download the three cases46 KB| Blue text | a hardcoded input — you may edit these |
| Yellow fill | an input cell; everything else on the sheet is a formula |
| Black text | a formula — do not overtype these |
| Checks sheet | the printed figure beside the computed one, with a PASS or a FAIL; in the blank set and the cases, each control states its own verdict and the file ends ALL OK |
| ADDED | a figure the book does not give, used in the cases and marked wherever it appears |
A workbook that agrees with a book proves nothing on its own — the author wrote both. What the Checks sheets do is different: they force the model to reproduce, from a formula, a number that was printed before the model existed.
Two quantities are carried as data rather than recomputed, and both are flagged as inputs on the page itself. The eight fitted regression coefficients, because a logistic regression cannot be fitted in a spreadsheet. And the boosted-tree score on every row, because an ensemble of a hundred and eighty trees cannot be rebuilt in one either. Everything downstream of them — their area under the curve, their bands, their profit at every approval rate — is computed by the same live formulas as the card's, so the comparison is like for like.
Where two correct computations disagree, both are printed. The rank-sliced deciles put exactly 600 cases in every band; the fixed-boundary bands, which calibration and the stability index require, put 600, 599, 601, 600, 600, 598, 602, 600, 600 and 600, because scores repeat and ties have to fall on one side. Three non-bad cases move, one at the second boundary and two at the sixth (revised: the page said two). Neither table is wrong and the gap is not smoothed away.
Machine Learning for Finance develops the complete framework behind these models, with the assumptions, trade-offs and worked examples tied together.
View the book on Amazon Read the related analysisThe workbooks open in Microsoft Excel, LibreOffice Calc, Google Sheets and Numbers; the PDF prints on A4 or US Letter. They use no macros and no add-ins, so nothing needs to be enabled or trusted. If your spreadsheet asks to update links on opening, decline — there are none.
| 24 Sep 2026 | The four workbooks corrected, 156 checks. The intercept shift of 0.573620, 16.55 points, is now solved on the Calibration sheet rather than only described; the fixed boundaries move three tied cases, not two; from 550 to 600 each default avoided costs 19.95 good loans against a break-even of 11.1408, not “nineteen and a half” against 12.1408; the accepted and declined split is the recorded decision, not rebuilt from the rules; the five areas under the curve span 0.2047, not 0.2141. Added: a blank set, thirteen working documents, forty questions that mark themselves, and three cases. |
More in corporate finance, with free companion files. The full list of titles is on the author page.
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.
Also available as a standalone free template: credit scorecard model.