LendingClub Loan Default Prediction
This project builds an end-to-end credit risk modeling pipeline using historical LendingClub loan data.
The objective is not only to predict loan default risk, but to translate model outputs into actionable credit policies using cost-sensitive decisioning and Expected Loss (EL) analysis.
Unlike typical classification-focused projects, this work emphasizes:
- Leakage-aware modeling
- Business-aligned decision thresholds
- Probability calibration
- Expected Loss–driven approval policies
Given borrower and loan characteristics available at loan origination, predict whether a loan will default and design a decision framework that balances:
- Loan approval volume
- Credit losses from defaulted loans
- Source: LendingClub (Kaggle: https://www.kaggle.com/datasets/gabrieloliveirasan/lending-club-credit-risk)
- Observations: ~160k+ loans after cleaning
- Target Variable:
loan_status0→ Non-default (Fully Paid)1→ Default (Charged Off / Default)
Note: Only features known before loan issuance were retained.
Loan status categories were mapped into a binary credit risk label to reflect real-world default outcomes.
All post-origination variables were removed, including:
- Payment dates
- Recoveries
- Collections activity
This ensures:
- Honest model evaluation
- Realistic deployability
- Median imputation (numerical features)
- Most-frequent imputation (categorical features)
- One-Hot Encoding for categorical variables
- Feature standardization for numerical variables
- Memory-safe sparse preprocessing
| Model | Purpose |
|---|---|
| Logistic Regression | Interpretable baseline |
| XGBoost | Non-linear high-performance model |
- Train/Test split
- Cross-validation using ROC-AUC
- Final test ROC-AUC (XGBoost): ~0.78
Decision thresholds were optimized using a cost-based framework:
- False Negatives assigned higher cost than False Positives
- Threshold chosen to minimize expected misclassification cost
This aligns model behavior with real-world credit risk priorities.
XGBoost probabilities were calibrated using Isotonic Regression to produce reliable Probability of Default (PD) estimates.
Benefits:
- Interpretable PD values
- Meaningful downstream financial calculations
Expected Loss is computed as:
Expected Loss = PD × LGD × EAD
Assumptions:
- LGD approximated for unsecured personal loans
- EAD proxied by loan amount
This enables policy-level decision-making rather than pure classification.
Approval policies were evaluated using Expected Loss to study trade-offs between:
- Approval rate
- Bad loan approval rate
A policy frontier enables selection of conservative or aggressive credit strategies.
- Cost-optimized approval rate: ~72%
- Significant reduction in high-cost default approvals
- Stable policy behavior across thresholds
- No evidence of leakage-driven performance inflation
- Credit risk modeling is not just about AUC
- Business costs must drive decision thresholds
- Probability calibration is critical
- Expected Loss bridges ML and real credit policy
- Simplified LGD assumptions
- No macroeconomic stress testing
- No time-based (vintage) validation
Potential extensions:
- Explicit LGD modeling
- Stress testing under adverse scenarios
- Time-aware validation
- Python
- Pandas, NumPy
- Scikit-learn
- XGBoost
- Matplotlib
This project emphasizes realistic, deployable credit risk modeling with strong business alignment rather than leaderboard optimization.