Loan Portfolio Risk & Collection Analytics
View on GitHubRisk Analytics
Loan Portfolio Risk & Collection Analytics
An observational matched-pair framework compares defaulting borrowers with five healthy peers to identify behavioral signals ahead of loan default.
PythonPandasNumPyScikit-learn
Key Highlights
- Analyzes 135,000 originations and 1,048,575 monthly performance records across 58,275 borrowers.
- Uses horizon-aware 5:1 matching; median standardized distance is 0.0899 and 83.05% of pairs match loan amounts exactly.
- Three-month credit-score velocity and revolving-utilization changes diverge at T-3 in the reported analysis.
Tech Stack
PythonPandasNumPyScikit-learn
Overview
The framework studies early warning indicators by benchmarking defaulting borrowers against five healthy peers with similar origination profiles. It compares trajectories from eleven months before default through the default month, aiming to distinguish leading behavioral changes from coincident delinquency signals.
Methodology
- Filter healthy comparison borrowers to those active through the defaulting borrower's matching month on book.
- Standardize origination credit score, debt-to-income, revolving utilization and loan amount; select five nearest healthy peers.
- Compare six monthly measures against the median trajectory of each matched peer group and run matching sensitivity diagnostics.
Results & Findings
- The README reports 6,580 defaulters, 32,900 matched-control rows, and 61,808 borrower-month trajectory records.
- At T-3, the median credit-score velocity gap is -3 points and the revolving-utilization velocity gap is +0.006 (+0.6%).
- At T-0, the reported delinquency gap reaches 90 DPD and payment-ratio gap is -1. These are observational findings, not causal estimates.
Project Structure
- data/: origination and monthly performance inputs, matched controls, trajectory tables and matching diagnostics.
- scripts/: ingestion checks, matched-control construction, validation, sensitivity analysis and trajectory reporting.
Getting Started
The README documents Python 3.10 or later. Run the scripts sequentially from the repository root after installing requirements.
git clone https://github.com/Jash275/Loan-Portfolio-Risk-Collection-Analytics.git
cd Loan-Portfolio-Risk-Collection-Analytics
python -m venv venv
.\venv\Scripts\activate
pip install -r requirements.txt
python scripts/inspect_dataset.py
python scripts/default_history_analysis.py
python scripts/build_matched_control.py
python scripts/inspect_loan_matching.py
python scripts/validate_matching.py
python scripts/validate_unmatched_features.py
python scripts/matching_sensitivity_analysis.py
python scripts/trajectory_builder.py
python scripts/trajectory_analysis.py