NYU Stern MSBAI Capstone

DriftBreaker

Credit Risk Model Drift Detection Using Survival Analysis

2.26M
Loans Analyzed
$34B
Total Exposure
12.6%
Default Rate
$4.4B
Total Defaults

Framework Architecture

BI Analytics

Portfolio metrics, originations, defaults, book composition, cumulative PD curves

Model Engine

Discrete-time survival, PSI monitoring, early default sentinel, macro/micro attribution

Strategy

Margin analysis, variance attribution, required rate calculation, action matrix

Project Objectives

  • Detect Model Drift: Build a framework to identify when credit risk models deviate from expected performance using survival analysis techniques.
  • Attribution Analysis: Decompose drift into macro (economic) and micro (underwriting) components to inform remediation strategies.
  • P&L Impact: Translate model drift into financial terms — margin compression, variance attribution, and required rate calculations.
  • Actionable Decisions: Provide clear EXIT / REPRICE / MONITOR recommendations by segment based on quantitative analysis.
Data Source: Lending Club 2007-2018 | Highest Default: 2015 (18.25%) | Highest Risk Segment: High Risk (30.38%)

Lending Club

Pioneer in Peer-to-Peer Lending

Lending Club was founded in 2006 and became the world's largest peer-to-peer lending platform, facilitating over $50 billion in loans before transitioning to a neobank model in 2020. The platform connected borrowers seeking personal loans with investors looking for yield, disrupting traditional banking by removing the intermediary.

Company Timeline

2006 Founded in San Francisco
2007 Launched P2P lending platform
2014 IPO on NYSE ($LCG)
2016 CEO resignation amid scandal
2020 Acquired Radius Bank, became neobank
2021 Ceased P2P operations entirely

Platform Statistics

Total Loans Issued $50B+
Borrowers Served 3M+
Average Loan Size $15,000
Interest Rate Range 6% - 36%
Loan Terms 36 or 60 months

Grading System

Lending Club assigned grades A through G to borrowers based on creditworthiness, with subgrades 1-5 within each letter grade. This risk stratification determined interest rates and was central to investor decision-making.

A
Lowest Risk
B
Low Risk
C
Medium
D
Medium-High
E
High Risk
F
Higher Risk
G
Highest Risk
Why This Dataset: Lending Club's publicly available loan data (2007-2018) provides a rich, real-world dataset with known outcomes — ideal for studying credit risk model performance, drift detection, and the consequences of underwriting changes over time.

Portfolio Summary

Lending Club data (2007-2018)

2.26M
Total Loans
$33.99B
Total Exposure
$4.43B
Default Volume
12.56%
DR (Count)
13.05%
DR ($)

By Segment

Segment Loans Exposure Default Rate (Count) Default Rate ($)
High Risk 188,630 $3.41B 30.38% 31.53%
Medium Risk 973,157 $14.86B 15.96% 16.07%
Low Risk 1,096,132 $15.72B 6.47% 6.19%

By Term

TermLoansExposureDefault Rate
36 months 1,607,316 $20.50B 10.70%
60 months 650,603 $13.50B 17.15%

Timing Metrics

5.13%
PD12
9.78%
PD24
Q5-Q6
Peak Hazard
14.0
Median Months to Default

Originations vs Defaults

Annual and cumulative volume analysis

Annual Metrics

VintageLoansVolumeDefaultsDefault Rate
2007251$2.2M4517.93%
20081,562$14.4M24715.81%
20094,716$46.4M59412.60%
201011,536$122.1M1,48712.89%
201121,721$261.7M3,29715.18%
201253,367$718.4M8,64416.20%
2013134,814$1.98B21,03015.60%
2014235,629$3.50B41,40817.57%
2015421,095$6.42B76,85118.25%
2016434,407$6.40B71,66616.50%
2017443,579$6.59B44,85410.11%
2018495,242$7.94B13,4602.72%

Early Default Analysis

First 12-month performance indicators

Key Finding: 2016 vintage shows highest early default rate (6.68% at 12 months) despite not having the highest ultimate default rate. This suggests underwriting deterioration that models failed to capture.

Early Default Rates by Vintage

VintagePD6PD12Ultimate PDEarly/Ultimate Ratio
20141.56%5.20%17.57%29.6%
20151.72%5.43%18.25%29.8%
20162.16%6.68%16.50%40.5%
20172.15%6.27%10.11%62.0%

Book Composition

Risk segment distribution over time

Trend: Portfolio shifted toward lower risk segments post-2016, with High Risk declining from ~14% to ~5% of originations by 2018.

Default Curves

Cumulative PD development by vintage

Hazard Distribution

Survival Analysis

Discrete-time hazard modeling framework

Model Specification

h(t|X) = 1 / (1 + exp(-(αt + β'X)))

Where:
  h(t|X) = hazard at time t given covariates X
  αt = baseline hazard (time-varying intercept)
  β = coefficient vector for predictors

Key Covariates

  • Grade (A-G risk classification)
  • DTI ratio
  • Annual income
  • Employment length
  • Home ownership status
  • Loan purpose

Model Performance

C-Statistic (AUC) 0.97
KS Statistic 0.08
PSI Score 0.001

Drift Detection

Population Stability Index and performance monitoring

0.10
PSI Score
⚠ MODERATE DRIFT
1.15x
Actual/Expected PD
⚠ SIGNIFICANT
2016
Peak Drift Vintage
Alert: PSI exceeds 0.10 threshold indicating material population shift. Model recalibration recommended.
MetricThresholdCurrentStatus
PSI (Overall)< 0.100.100MODERATE
A/E Ratio0.8 - 1.21.15xSIGNIFICANT
KS Statistic (Avg)< 0.050.074SIGNIFICANT

Drift Detection Techniques Explained

The DriftSentinel system uses multiple statistical tests ("Dirty Dozen") to comprehensively detect distribution shifts between training and test data:

1. Population Stability Index (PSI)

Measures the difference between expected (training) and actual (test) score distributions. PSI < 0.10 indicates stable population, while PSI > 0.25 signals significant shift requiring model recalibration.

2. Actual/Expected (A/E) Ratio

Compares actual default rate to model-predicted default rate. A/E = 1.0 indicates perfect calibration. Values outside 0.8-1.2 range suggest model miscalibration or population shift.

3. Kolmogorov-Smirnov (KS) Statistic

Tests the maximum difference between cumulative distribution functions (CDFs) of baseline and current score distributions. KS < 0.05 indicates similar distributions, while higher values detect significant shifts.

4. Jensen-Shannon Divergence (JSD)

Symmetric measure of distribution distance based on Kullback-Leibler divergence. JSD ranges from 0 (identical) to 1 (completely different). Values > 0.12 indicate critical drift.

5. Wasserstein Distance

Measures the minimum "cost" to transform one distribution into another. Captures both location and shape differences. Higher values indicate larger magnitude of distribution shift.

6. Variance Ratio

Compares variance of current distribution to baseline. Ratio > 2.0 indicates increased volatility in model scores, suggesting unstable population characteristics.

7. Levene's Test

Tests homogeneity of variance between baseline and current distributions. P-value < 0.05 flags significant variance differences, indicating distribution instability.

8. Tail Shift (95th Percentile Ratio)

Compares extreme values (95th percentile) between distributions. Detects shifts in high-risk tail behavior, critical for credit risk models where tail events drive losses.

9. Adversarial AUC

Trains a Random Forest classifier to distinguish baseline vs current score distributions. AUC > 0.5 means distributions are distinguishable. AUC > 0.55 indicates meaningful drift, while AUC > 0.62 signals critical drift requiring immediate action.

Status Classification: The system aggregates these metrics to classify drift as STABLE (no action needed), WARNING (monitor closely), or CRITICAL (immediate recalibration required). Drift is measured against model scores on training data as the baseline.

Macro/Micro Attribution

Decomposing drift sources into economic vs underwriting factors

Attribution Methodology

When model drift is detected, the system decomposes the total drift into two components using log-space decomposition:

total_drift = drifted_hazard / base_hazard
macro_multiplier = avg_macro_scalar
micro_multiplier = total_drift / macro_multiplier

log(total) = log(macro) + log(micro)
macro_attribution_pct = (log(macro) / log(total)) × 100
micro_attribution_pct = (log(micro) / log(total)) × 100

Total Drift: Ratio of drifted hazard rate (current period) to base hazard rate (baseline). Captures overall change in default probability.

Macro Attribution: Percentage of drift explained by economic conditions (unemployment, spreads, sentiment, etc.). Reflects external economic stress affecting all borrowers.

Micro Attribution: Percentage of drift explained by underwriting/population shifts. Reflects changes in borrower quality, underwriting standards, or product mix.

Example Interpretation: If macro attribution = 30% and micro attribution = 70%, this means economic stress accounts for 30% of increased defaults, while 70% is due to borrower quality changes or underwriting deterioration. This helps prioritize remediation: macro-driven drift may require portfolio-level adjustments, while micro-driven drift suggests underwriting policy review.

Macro Factors

Economic conditions affecting all borrowers uniformly

  • • Unemployment rate changes
  • • Interest rate environment
  • • GDP growth fluctuations
  • • Housing market conditions
  • • Consumer sentiment shifts
  • • High-yield spread movements

Micro Factors

Underwriting and population characteristics

  • • Underwriting standard changes
  • • Applicant population shift
  • • Product mix changes
  • • Geographic expansion
  • • Credit policy modifications
  • • Target market adjustments

Model Methodology

Forensic Portfolio Engine - Architecture & Key Assumptions

Three-Component Framework

Final Probability of Default = Micro Score × Vintage Multiplier × Macro Scalar

1. Micro Scorecard

  • • Logistic Regression (L2, C=0.1)
  • • 18 borrower features
  • • StandardScaler preprocessing
  • • Output: 0-1 probability

2. Vintage Curve

  • • Empirical default rate by quarter
  • • Forensic date calculation
  • • Normalized to mean = 1.0
  • • Range: 0.4-1.5x multiplier

3. Macro Overlay

  • • 5 economic indicators
  • • Log-linear model (z-scores)
  • • 1-quarter lag effect
  • • Range: 0.7-1.8 scalar

Key Assumptions

1. Multiplicative Independence

Assumes independence between micro, vintage, and macro components. No interaction terms modeled.

2. Quarterly Discretization

Continuous time converted to discrete quarters. Months on book (MOB) mapped to quarters (q = floor(MOB/3)).

3. Fixed 1-Quarter Lag

Economic conditions affect loans issued in the next quarter. Q1 conditions impact Q2 originations.

4. Forensic Date Accuracy

Assumes `last_pymnt_d` accurately reflects true loan duration. Captures early payoffs and extended terms (1-60 months).

5. Default Assignment at Final Month

Defaults assigned only at the final month of loan duration, not throughout the loan lifecycle.

Key Facts

Feature Set (18 Features)

  • Core Financial (4): dti, annual_inc, loan_amnt, avg_cur_bal
  • Credit History (4): tot_cur_bal, tot_hi_cred_lim, bc_open_to_buy, credit_utilization_ratio
  • Account Behavior (3): acc_open_past_24mths, num_tl_30dpd, mths_since_recent_bc
  • Derogatory Marks (3): delinq_2yrs, pub_rec, collections_12_mths_ex_med
  • Engineered (4): has_collections, has_delinq_history, has_public_record, income_to_loan_ratio

Macro Indicators (5)

  • Unemployment: β = +0.15 (Higher → More defaults)
  • HY Spread: β = +0.10 (Wider → More defaults)
  • Yield Curve: β = -0.05 (Inverted → More defaults)
  • Consumer Sentiment: β = -0.08 (Lower → More defaults)
  • Real Income: β = -0.05 (Lower → More defaults)

Model Training Details

Hyperparameters

  • • C = 0.1 (L2 regularization)
  • • Solver = 'lbfgs'
  • • max_iter = 1000
  • • random_state = 42

Data Processing

  • • StandardScaler (zero mean, unit variance)
  • • Missing values filled with 0
  • • Binary classification target
  • • No class weights (maintains calibration)

Economics & P&L Calculation

net_margin = avg_coupon - cost_of_funds - opex - actual_loss_rate
4%
Cost of Funds
2%
Operating Expenses
Actual
Loss Rate (Realized)

Note: P&L uses actual default rates (realized performance), not predicted PD, to reflect true portfolio economics.

Drift Detection (DriftSentinel)

The system computes 7+ statistical metrics ("Dirty Dozen") to detect distribution shift:

Shape & Stability

  • • Jensen-Shannon Divergence (JSD)
  • • Wasserstein Distance
  • • Kolmogorov-Smirnov Statistic

Volatility & Adversarial

  • • Variance Ratio
  • • Levene's Test (homogeneity)
  • • Tail Shift (95th percentile)
  • • Adversarial AUC (Random Forest)

Status Classification: CRITICAL (AUC > 0.62 or JSD > 0.12) | WARNING (AUC > 0.55 or JSD > 0.08) | STABLE (otherwise)

P&L Analysis

Margin impact and variance attribution

16.0%
Avg Coupon Rate
4.0%
Cost of Funds
2.0%
OpEx
-$639M
Variance vs Budget

Margin Waterfall (High Risk Segment)

Coupon
14.0%
- Cost of Funds
-4.0%
- OpEx
-2.0%
- Expected Loss
-22.3%
Net Margin
-14.3%

Hazard & Margin Analysis by Segment

SegmentQ Hazard (Base)Q Hazard (Drifted)Annual PDCouponMarginRequired
High Risk8.86%10.63%36.20%23.7%-18.49%47.20%
Medium Risk4.63%5.55%20.42%15.2%-11.23%31.42%
Low Risk1.99%2.39%9.23%9.1%-6.14%20.23%

Decision Matrix

Strategic recommendations by segment

High Risk

EXIT
  • 30.38% default rate
  • -18.49% margin
  • Required: 47.20%
Action: STOP LENDING - Required rate exceeds usury cap

Medium Risk

EXIT
  • 15.96% default rate
  • -5.96% margin
  • Required: 26.96%
Action: STOP LENDING - Required rate exceeds usury cap

Low Risk

REPRICE
  • 6.47% default rate
  • -2.47% margin
  • Required: 17.47%
Action: RAISE RATE TO 17.5% - Current margin negative

DB

AI-powered credit risk assistant powered by Google Gemini

What is DB?

DB (DriftBreaker) is an intelligent AI assistant that helps you understand and analyze your credit risk portfolio. Powered by Google's Gemini 2.5 Flash model, DB has access to comprehensive portfolio context and can answer questions about:

Portfolio Analysis

  • • Portfolio summary metrics
  • • Default rates by segment
  • • Vintage performance trends
  • • Book composition changes

Drift Detection

  • • Explain drift metrics (PSI, KS, JSD)
  • • Interpret drift status
  • • Identify drift root causes
  • • Recommend remediation steps

Attribution Analysis

  • • Macro vs micro attribution
  • • Economic impact assessment
  • • Underwriting quality analysis
  • • Factor decomposition

Strategic Recommendations

  • • Pricing adjustments
  • • Underwriting policy changes
  • • Portfolio rebalancing
  • • Risk mitigation strategies

How it works: DB has access to your complete portfolio context including model architecture, drift metrics, attribution analysis, P&L data, and decision matrix recommendations. Simply ask questions in natural language, and DB will provide detailed explanations, insights, and actionable recommendations based on your portfolio's current state.

DB (Powered by Gemini)
Hello! I'm DB, the DriftBreaker assistant. I can help you analyze the portfolio, explain drift patterns, and provide strategic recommendations. Ask me anything!