Context
I wanted to explore how machine learning could support real-world banking decisions beyond prediction alone. Mortgage pricing requires balancing customer behavior, competitive pressures and financial objectives, making it a useful problem for connecting predictive modeling with business decision making.
How can a lender balance customer retention with profitability when setting renewal offers?
Mortgage renewals represent a critical retention and profitability opportunity for retail banks. Traditional pricing strategies often rely on broad customer segments, which can result in unnecessary margin loss or increased customer churn. The challenge is to estimate how individual customers may respond to different renewal offers and use those predictions to identify pricing decisions that balance retention with profitability.
Approach
This project combined supervised machine learning with profit-aware pricing optimization. Customer acceptance probabilities were modeled from financial, mortgage and behavioral characteristics, then used to evaluate alternative renewal rates at the individual customer level. The framework connected predictive outputs to pricing decisions rather than treating model prediction as the final objective.
Data Sources
Synthetic Mortgage Renewal Portfolio
Created a synthetic banking portfolio of 20,000 mortgage customers observed monthly over a 36-month period, producing 720,000 customer-month records. The dataset captures mortgage characteristics, financial attributes, and behavioral features to support modeling of customer renewal decisions in a controlled environment.
Synthetic data generation was controlled using SEED = 42 to ensure reproducibility.
Solution
Modeled customer acceptance behavior using financial attributes, mortgage characteristics and behavioral features
Compared Logistic Regression, Random Forest and XGBoost models for acceptance probability prediction
Selected XGBoost as the predictive model used within the optimization framework based on its ability to capture nonlinear customer-level behavioral patterns
Built a rate optimization framework that evaluated renewal offers from 10 basis points below to 40 basis points above baseline rates
Incorporated expected profit, churn costs, loyalty adjustments and segment-level risk into customer-level pricing decisions
Architecture
The pipeline moves from synthetic portfolio generation through feature preparation and acceptance modeling into customer-level pricing optimization. Model predictions provide the behavioral inputs to the optimization layer, which evaluates alternative renewal rates against expected profit and business constraints.
- 01Synthetic Mortgage Portfolio Generation
- 02Data Preparation & Feature Engineering
- 03Acceptance Probability Modeling
- 04Customer-level Mortgage Rate Optimization
- 05Personalized Renewal Offers
- 06Portfolio Rate Stability, Customer Retention and Profit Optimization

Outcome
The personalized pricing framework demonstrated how machine learning can evolve from prediction into decision support by connecting customer behavior modeling with profit-aware optimization. Across the portfolio, optimized offers produced an average rate adjustment of +23.0 basis points and an average expected profit increase of +11.5 basis points compared with a flat-rate pricing strategy. These results demonstrate how customer-level pricing can balance expected profitability with retention considerations while maintaining relatively stable renewal rates.
Lessons Learned
Connecting predictive models to an explicit business decision creates a more meaningful evaluation framework than prediction accuracy alone.
Feature engineering and behavioral assumptions strongly influence model effectiveness.
Optimization frameworks require balancing financial objectives with customer experience considerations.
Synthetic data can provide a controlled environment for testing complex business strategies.
Domain knowledge is essential when translating machine learning outputs into operational decisions.
Future Improvements
Validate the framework using real mortgage renewal data.
Incorporate competitive market pricing and regulatory constraints.
Add customer lifetime value and cross-sell considerations.
Explore advanced choice models such as nested logit approaches.
Deploy the optimization framework as an interactive pricing decision tool.





