Machine learning models for predicting mortgage payment difficulties in Peru

Authors

  • Luis Alberto Geraldo-Campos Universidad Tecnológica del
  • Oscar David Carreño-Flores Universidad Tecnológica del
  • Juan Jesús Soria-Quijaite Universidad Tecnológica del

DOI:

https://doi.org/10.18687/LEIRD2025.1.1.105

Keywords:

machine learning, mortgage credit, credit risk, longitudinal study

Abstract

The objective of this study was to analyze which machine learning models best predict mortgage payment difficulties in Peru. A quantitative method was used with longitudinal data from 2018 to 2022 from the National Household Survey (ENAHO), where a total of 5,716 households with mortgage loans were examined. The input variables considered were geographical area, type of housing, use of credit, and source of financing, with difficulty in meeting the payment schedule as the output variable. The analyses were performed in Google Colab, reporting frequency statistics and exploratory and class balancing analyses to evaluate machine learning models such as Logistic Regression, Random Forest (RF), and Support Vector Machine (SVM) with SMOTE. In the training phase of the classification models, the Scikit-learn, XGBoost, and Keras models were trained and compared. The results showed that, of all the models evaluated, Random Forest without adjustments showed the best performance (F1-score = 0.67; recall = 0.71), although combined Stacking (RF + XGBoost) showed a better balance between classes, but its overall performance was lower. In addition, models such as SVM without adjustments show problems in situations of unbalanced classes, highlighting the need to use techniques such as SMOTE. It is concluded that the Random Forest model is more effective in detecting payment difficulties in mortgage loans.

Downloads

Published

2025-12-09

Issue

Section

Articles

How to Cite

Geraldo-Campos, L. A., Carreño-Flores, O. D., & Soria-Quijaite, J. J. (2025). Machine learning models for predicting mortgage payment difficulties in Peru. LACCEI, 2(13). https://doi.org/10.18687/LEIRD2025.1.1.105

Most read articles by the same author(s)