Skip to content

[SC-19104] Notebook: CECL lifetime loss model for residential mortgages - #574

Draft
juanmleng wants to merge 3 commits into
mainfrom
juan/sc-19104/notebook-cecl-lifetime-loss-model-for-residential-mortgages
Draft

juanmleng wants to merge 3 commits into
mainfrom
juan/sc-19104/notebook-cecl-lifetime-loss-model-for-residential-mortgages

Conversation

@juanmleng

Copy link
Copy Markdown
Contributor

Pull Request Description

What and why?

Work in progress. Adds a notebook that documents a CECL lifetime loss model for a synthetic residential mortgage portfolio, using FRED macro history and the Fed 2025 supervisory scenarios, plus ten custom validation tests for it.

How to test

What needs special review?

Dependencies, breaking changes, and deployment notes

Release notes

Checklist

  • What and why
  • Screenshots or videos (Frontend)
  • How to test
  • What needs special review
  • Dependencies, breaking changes, and deployment notes
  • Labels applied
  • PR linked to Shortcut
  • Unit tests added (Backend)
  • Tested locally
  • Documentation updated (if required)
  • Environment variable additions/changes documented (if required)

🤖 Generated with Claude Code

juanmleng and others added 3 commits October 23, 2026 12:10
Work in progress: a CECL allowance model for a synthetic residential
mortgage portfolio, driven by FRED macro history and the Fed 2025
supervisory scenarios, with ten custom validation tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Split pre-2020 performance into train and test samples by loan, keeping
2020 onwards out of time. Add a logistic challenger for the default,
prepayment and LGD models, compared with the champion on AUC, the
allowance and the CECL tests. Models are fitted in cecl_train.py and
saved with joblib, so other notebooks can load the same models; the
saved file is refitted when missing, stale or from another scikit-learn
version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- WOEInformationValue: Weight of Evidence by bin and Information Value per
  driver, implemented directly with no binning library
- MacroShockSensitivity: allowance under single-driver unemployment, house
  price and mortgage rate shocks, plus a combined shock, with direction checks
- HistoricalReplay: replays the early-1990s recession, 2008 crisis and pandemic
  on today's portfolio and checks severely adverse is at least as severe
- ReverseStress: finds the combined shock severity that multiplies the
  baseline allowance by a given factor
- cecl_model: split scenario path building into reusable helpers (scenario,
  historical and shocked changes) so the stress tests share the same engine;
  scenario paths are unchanged

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant