Predicting mortgage payoff behavior using borrower, loan, and macroeconomic data
This project analyzes large-scale U.S. residential mortgage data to understand and predict when loans are likely to be paid off.
Using a combination of supervised machine learning and unsupervised segmentation, the analysis helps lenders anticipate cash inflows, manage liquidity, and design proactive refinancing or retention strategies.
The project is structured to mirror how real financial analytics teams approach mortgage portfolio modeling — from raw data validation to feature engineering, modeling strategy, and business interpretation.
Mortgage lenders and investors face uncertainty around prepayment timing.
Early payoffs affect:
- Liquidity forecasting
- Interest income projections
- Refinancing and retention campaigns
- Portfolio risk management
Manual rules fail because repayment behavior depends on borrower characteristics, loan structure, and macroeconomic conditions — all of which evolve over time.
- Anticipate which mortgages are likely to be paid off soon
- Improve liquidity and portfolio planning
- Understand how economic conditions influence repayment
- Identify borrower segments with similar repayment behavior
- Predict monthly mortgage payoff events (
payoff_time = 1/0) - Rank loans by payoff probability
- Segment borrowers into behaviorally similar groups
- Maintain interpretability alongside predictive power
- ~622,000 loan-month observations
- ~50,000 U.S. residential borrowers
- 60 monthly time periods
- Curated by International Financial Research (IFR)
- Loan Dynamics: balance, LTV, interest rate, tenure
- Borrower Quality: FICO score, origination terms
- Property Type: single-family, condo, planned development
- Macroeconomics: house price index (HPI), GDP growth, unemployment
- Outcomes: active, paid off, defaulted
The panel structure captures how mortgages evolve over their lifecycle.
- Removed duplicate loan-month records
- Treated implausible zeros as missing values
- Median imputation preserving time structure
- Outliers retained to reflect real market heterogeneity
- Engineered loan age, time to maturity, and on-book age
- Log-transformed highly skewed balance variables
- Consolidated property-type indicators
- Standardized features for distance-based models
- Lifecycle patterns in payoff timing
- Equity, LTV, and macroeconomic effects
- Investor vs owner-occupied behavior
- Strong mid-life payoff concentration (months ~10–25)
Models explored:
- Logistic Regression (baseline, interpretable)
- Regularized Logistic Regression
- Decision Tree
- Random Forest
- K-Nearest Neighbors
Evaluation focused on:
- ROC-AUC
- Class balance preservation
- Probability ranking (not raw accuracy)
- PCA to address correlated predictors
- K-Means clustering on standardized components
- Behavioral borrower group discovery
- Supports differentiated portfolio strategies
- Lower loan-to-value (LTV) strongly increases payoff likelihood
- Rising house prices accelerate payoffs
- Higher unemployment suppresses repayment activity
- Owner-occupied and single-family loans pay off faster
- Mortgage payoffs peak in the mid-life of loans, not near maturity
These patterns align with real-world mortgage economics.
- 📄 Detailed analytical report (DOCX / PDF)
- 📊 Visualizations and lifecycle plots
- 🧮 R scripts for preprocessing, EDA, and modeling
- 📁 Modeling-ready datasets (conceptual)
This repository reflects the analytical structure and workflow used in real financial analytics environments.
- R
- Logistic Regression
- Random Forest
- Decision Trees
- K-Means Clustering
- PCA
- ROC / AUC analysis
- Feature engineering & data validation
- Course: CSDA 6010 – Data Analytics Practicum
- Institution: Webster University
- Term: Fall 2025
This project demonstrates:
- Ability to work with large, time-indexed financial data
- Strong understanding of business-driven modeling
- Balance between interpretability and predictive power
- End-to-end analytics thinking — not just algorithms
Sai Pratyusha Gorapalli
Graduate Student – Data Analytics
(Webster University)
⭐ This project emphasizes analytical rigor, economic reasoning, and real-world applicability over model gimmicks.