Smart Loan Recovery
Leak-free PD × LGD × EAD expected-loss pipeline, evaluated out of time
Leak-free credit-risk pipeline on a month-by-month simulated loan book: calibrated PD (logistic regression vs LightGBM vs XGBoost), LGD and EAD models, Expected Loss = PD × LGD × EAD backtested out of time, recovery-priority tiers and SHAP driver summaries. Replaces an earlier version whose label was K-Means cluster membership.
The problem
Collection teams need to know which performing loans are likely to default and how much each would cost, without a model that leaks the answer into its features.
The approach
Month-by-month loan-book simulation with timing-tagged columns and an out-of-time split; calibrated PD, LGD and EAD models combined into Expected Loss and recovery tiers, with SHAP explanations.
Architecture
- 01
Loan-book simulation
52,000 applicants across personal, auto, home-equity and revolving products are underwritten and simulated month by month: missed instalments, cures, roll to 90+ DPD, prepayment, utilisation draw-down and collateral workouts.
- 02
Leak-free snapshots
A column registry tags every field as origination, snapshot, outcome or generator; features use history up to the snapshot only and the label is 90+ DPD in the next 12 months. Development snapshot 2022-06, out-of-time test 2023-06.
- 03
PD
Logistic regression, LightGBM and XGBoost with isotonic calibration, compared by stratified 5-fold CV; the lowest CV Brier score was the pre-declared selection rule.
- 04
LGD and EAD
LightGBM models on development defaults (cross-entropy objective for LGD in [0, 1], EAD as a factor of limit or balance), each compared with a product-mean baseline.
- 05
Expected Loss and tiers
EL = PD × LGD × EAD per loan, backtested against realised OOT losses; loans are ranked by EL into four recovery tiers with actions.
- 06
Explainability
SHAP (linear and tree explainers) per model, with one-hot columns summed back to their source feature.
Key decisions
- Tests leakage directly: re-simulating every month after the snapshot leaves all features identical while labels change.
- Reports the generator's oracle PD as a ceiling so model AUC is read against what is learnable.
- Removes features that are exact functions of others after they split the logistic model's SHAP attributions.
- Leaves the 30% EL over-prediction uncorrected and traces it to PD drift between periods instead of using OOT data to fix it.
Results
- PD OOT ROC-AUC 0.7645 (bootstrap 95% CI 0.749 to 0.780) against an oracle ceiling of 0.8343; the three PD models are statistically tied.
- LGD R² 0.8354 and EAD-factor R² 0.6415 on OOT defaults; the top 5% of loans by EL hold 45.4% of realised OOT loss.
| Metric | Value | Source |
|---|---|---|
| PD out-of-time ROC-AUC (oracle ceiling 0.8343) | 0.7645 · Brier 0.04106 | benchmarks/metrics.json |
| Realised OOT loss in the top 5% of loans by EL | 45.4% vs 36.3% by PD alone | benchmarks/metrics.json |
| Shuffled-label leakage control, mean OOT ROC-AUC | 0.5055 over 5 draws | benchmarks/metrics.json |
How it is tested
- 16 pytest tests including the future-resampling leakage test, SHAP additivity and EL identities; CI runs them and the full pipeline on Python 3.12 and 3.13.
- Five shuffled-label refits as a leakage control, plus a 500-resample bootstrap for the selected model's OOT metrics.
Limits, stated plainly
- Synthetic data: the models recover the generator's assumptions, so the numbers do not describe a real portfolio.
- No macro feature: EL over-predicts realised OOT loss by 30% because the training year had a higher default rate.