F. HEKİMOĞLU
← cd ~/work/quant
// QUANT · CREDIT RISK

A calibrated default model that ranks risk, not people

A leakage-free, calibrated XGBoost classifier for LendingClub default probability at origination, on a temporal vintage split. It is scored on ranking (ROC-AUC, PR-AUC, Brier), never on accuracy or profit.

00Overview

Credit default is a ranking problem, not a prediction-of-individuals problem, and most loan-default notebooks get this wrong by reporting accuracy on a leaky random split. This model is leakage-controlled, calibrated to real probabilities, and validated the way a lender actually deploys: train on old vintages, test on newer ones.

Results, held-out vintage

ROC-AUC0.708
PR-AUC0.274
Brier0.126lower is better
KS statistic0.331

01Method

  • An XGBoost booster, calibrated with isotonic / Platt mapping into real probabilities on [0, 1].
  • Temporal split: train on vintages at or before the cutoff, test on later ones, no K-fold.
  • A frozen allowlist removes 20+ post-funding leakage columns (recoveries, payment history, settlement flags), property-tested for survival.
  • Out-of-fold target encoding for high-cardinality categoricals; all imputers and scalers fit on the train fold only.

02The honest framing

It ranks risk; it does not predict which individuals default. Against a ~16% base rate the model scores ROC-AUC 0.708, essentially tied with a plain logistic regression at 0.714 (DeLong p = 0.84). It is judged on calibration and ranking, never on accuracy or profit, and no profit is claimed.

Base rate~16%
vs logisticp = 0.84no sig. difference

03Stack & links

pythonxgboostscikit-learncalibrationcredit-risk
SEC 00 · INDEXENDARK--:--:--⌘K / ? help