Submitted:
08 July 2025
Posted:
09 July 2025
You are already at the latest version
Abstract
Keywords:
1. Introduction
2. Literature Review
3. Materials and Methods
3.1. Data Construction
3.2. Regulatory Reference Model
3.2.1. Regulatory Model in the Solidarity Sector: Non-Debit Consumer Credit Portfolio
3.2.2. Regulatory Model in the Solidarity Sector: Debit Consumer Credit Portfolio
3.3. Proposed Models
3.3.1. Ridge
3.3.2. Decision Trees
3.3.3. Random Forest
3.3.4. XGBoost
3.3.5. LightGBM
3.3.6. SHAP
4. Results
4.1. Exploratory Analysis
4.2. Data Preparation for Model Implementation
4.3. Models for Debit Consumer Credit
4.3.1. Linear Regression Model
4.3.2. Tree-Based Models

4.3.3. SHAP Global Analysis of the LightGBM Model
4.3.4. SHAP Local Analysis of LightGBM Model
4.4. Models for Non-Debit Consumer Credit
4.4.1. Linear Regression Model
4.4.2. Tree-Based Models
4.4.3. Global SHAP Analysis of LightGBM Model
4.4.4. SHAP Local Analysis of LightGBM Model
5. Discussion
6. Conclusions
Author Contributions
Funding
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
Appendix A. Definition of Variables
| Variable | Regulatory Model Definition | Proposed Model |
|---|---|---|
| EA |
Corresponds to the member’s status in the evaluation month; it takes the value 1 if the member is “active”, otherwise it takes the value zero. | Corresponds to the member’s status in the evaluation month; it takes the value 1 if the member is “active”, otherwise it takes the value zero. |
| AP |
The debtor has contributions in the solidarity organization; it takes the value 1 if the amount of contributions is greater than zero, otherwise it takes the value zero. | Total contribution balance in the evaluation month |
| REEST |
It takes the value 1 if the loan is restructured, otherwise the value is zero. | Takes the value 2 or 4. |
| CUENAHO |
If the debtor has a “Savings Account” product with a balance >1 and active status in the solidarity organization, it takes the value 1, otherwise it takes the value zero. | Savings Account balance in the evaluation month |
| CDAT | If the debtor has an active “CDAT” product in the solidarity organization, it takes the value 1, otherwise it takes the value zero. | CDT balance in the evaluation month |
| COOCDAT |
If the organization type is “Savings and Credit Cooperative” and the member has an active CDAT with the Cooperative, it takes the value 1, otherwise the value is zero. | CDT balance in the evaluation month |
| PER |
If the debtor has “Permanent Savings” in the solidarity organization, it takes the value 1, otherwise it takes the value zero. | Permanent Savings balance in the evaluation month |
| SALPRES |
If the balance/loan ratio is less than 20% it takes the value 1, otherwise the value is zero. | Total balance/loan |
| TC |
Type of loan installment; it takes the value 1 if the installment is not fixed, otherwise it takes the value zero. | Not considered in the model since it is a constant |
| Variable | Regulatory Model Definition | Proposed Model |
|---|---|---|
| ANTIPRE1 | Corresponds to the length of time the member has been affiliated with the organization at the date the loan was requested; if it is less than or equal to one month, it takes the value 1, otherwise it takes the value zero. | Corresponds to the length of time the member has been affiliated with the organization. |
| ANTIPRE2 | Corresponds to the length of time the member has been affiliated with the organization at the date the loan was requested; if it is more than 36 months, it takes the value 1, otherwise it takes the value zero. | Corresponds to the length of time the member has been affiliated with the organization. |
| VIN2 | Corresponds to the length of time the member has been affiliated with the solidarity organization; if it is more than 120 months, it takes the value 1, otherwise it takes the value zero. | Corresponds to the length of time the member has been affiliated with the organization. |
| Variable | Regulatory Model Definition | Proposed Model |
|---|---|---|
| MORA1230 | If the maximum arrears in the last 12 months are between 31 and 60 days, it takes the value 1; otherwise, the value is zero. | Corresponds to the maximum arrears in the last 12 months. |
| MORA1260 | If the maximum arrears in the last 12 months are greater than 60 days, it takes the value 1; otherwise, the value is zero. | Corresponds to the maximum arrears in the last 12 months. |
| MORA15 | If the maximum arrears in the last 12 months are between 16 and 30 days, it takes the value 1; otherwise, it takes the value zero. | Corresponds to the maximum arrears in the last 12 months. |
| MORA2430 | If the maximum arrears in the last 24 months are between 31 and 60 days, it takes the value 1; otherwise, the value is zero. | Corresponds to the maximum arrears in the last 24 months. |
| MORA2460 | If the maximum arrears in the last 24 months are greater than 60 days, it takes the value 1; otherwise, the value is zero. | Corresponds to the maximum arrears in the last 24 months. |
| MORA2430N | If the maximum arrears in the last 24 months are between 31 and 60 days and MORA1230 is equal to 0, it takes the value 1; otherwise, the value is zero. | Corresponds to the maximum arrears in the last 24 months. |
| MORA3615 | If the maximum arrears in the last 36 months are between 1 and 15 days, it takes the value 1; otherwise, the value is zero. | Corresponds to the maximum arrears in the last 36 months. |
| MORA3660 | If the maximum arrears in the last 36 months are between 31 and 60 days, it takes the value 1; otherwise, the value is zero. | Corresponds to the maximum arrears in the last 36 months. |
| SINMORA | If the debtor did not present any arrears in the last 36 months, it takes the value 1; otherwise, the value is zero. | Takes the value 1 if the variable Max-arrears-36 is equal to zero; otherwise, it takes the value zero. |
| MORA315 | If the maximum arrears in the last 3 months are between 16 and 30 days, it takes the value 1; otherwise, the value is zero. | Corresponds to the maximum arrears in the last 3 months. |
| MORTRIM | Takes the value 1 if the debtor presented one or more delinquencies of between 31 and 60 days in the last 3 months; otherwise, it takes the value zero. | Corresponds to the maximum arrears in the last 3 months. |
References
- Aguilar-Valenzuela, G. R.; Vilca, E. M. Algoritmos para Machine Learning utilizados en la Gestión de Riesgo Crediticio en Perú: Machine Learning Algorithms used in Credit Risk Management in Peru. Micaela Revista de Investigación-UNAMBA 2024, 5(1), 30–35. [Google Scholar] [CrossRef]
- Bischl, B.; Binder, M.; Lang, M.; Pielok, T.; Richter, J.; Coors, S.; Boulesteix, A.-L. Hyperparameter Optimization: Foundations, Algorithms, Best Practices and Open Challenges. Reseñas interdisciplinarias de Wiley 2021. [Google Scholar] [CrossRef]
- Bussmann, N.; Giudici, P.; Marinelli, D.; Papenbrock, J. Explainable Machine Learning in Credit Risk Management. Computational Economics 2021, 57(1), 203–216. [Google Scholar] [CrossRef]
- Castro, J. Aplicación de machine learning en la gestión de riesgo de crédito financiero: Una revisión sistemática. Interfases 2022, 160–178. [Google Scholar] [CrossRef]
- Chen, T.; Guestrin, C. XGBoost: A Scalable Tree Boosting System. In Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining; 2016; pp. 785–794. [Google Scholar]
- Comité de Supervisión Bancaria de Basilea. Basilea III: Marco regulatorio global para reforzar los bancos y los sistemas bancarios (versión revisada). Obtenido de Banco de Pagos Internacionales. 2011. Available online: https://www.bis.org.
- Donovan, J.; Jennings, J.; Koharki, K.; Lee, J. Measuring credit risk using qualitative disclosure. Review of Accounting Studies 2021, 815–863. [Google Scholar] [CrossRef]
- Freire, Z. G. Clasificación de riesgo crediticio mediante técnicas de Machine Learning para una institución financiera. ESPOL. FCNM. 2024. [Google Scholar]
- Friedman, J. H.; Robert, T.; Trevor, H. Elements of Statistical Learning; Universidad de Pennsylvania: Pennsylvania, 2009. [Google Scholar]
- Gambacorta, L.; Huang, Y.; Qiu, H.; Wang, J. How do machine learning and non-traditional data affect credit scoring? New evidence from a Chinese fintech firm. Journal of Financial Stability 2024, 73–101. [Google Scholar] [CrossRef]
- Gatla, T. R. Machine learning in credit risk assessment: analyzing how machine learning models are transforming the assessment of credit risk for loans and credit cards. Journal of Emerging Technologies and Innovative Research 2023, 10, k746–k750. [Google Scholar]
- Geurts, P.; D., E.; Wehenkel, L. Extremely randomized trees. Machine Learning 2006, 3–42. [Google Scholar] [CrossRef]
- Gonzalez, P. M.; Coveñas de León, M. Algoritmos para Machine Learning utilizados en la Gestión de Riesgo Crediticio en Perú: Machine Learning Algorithms used in Credit Risk Management in Peru. Micaela Revista de Investigación-UNAMBA s.f., 30–35. [Google Scholar]
- Grau, Á. J. Machine Learning y riesgo de crédito. Universidad pontificia comilla 2020. [Google Scholar]
- Jackson, P. Regulatory implications of credit risk modelling. Journal of Banking & Finance 24 2020, 1–14. [Google Scholar] [CrossRef]
- Jorion, P. Valor En Riesgo: El nuevo paradigma para el control de riesgos con derivados. Limusa. Obtenido de. 2000. Available online: https://books.google.com.co/books?id=bcnaPQAACAAJ.
- Libda, R. The Impact of Fintech on Credit Risk Management: An Applied Study on the Egyptian Banking Sector. Journal of Alexandria University for Administrative Sciences 2024, 61(5), 391–422. [Google Scholar] [CrossRef]
- Lundberg, S. M.; Lee, S. I. A unified approach to interpreting model predictions. Advances in neural information processing systems 2017, 1–11. [Google Scholar]
- Machado, M.; Karray, S. Assessing credit risk of commercial customers using hybrid machine learning algorithms. Expert Systems with Applications 2022. [Google Scholar] [CrossRef]
- McDonald, G. Ridge regression. In Wiley Interdisciplinary Reviews: Com-putational Statistics; 2009; pp. 93–100. [Google Scholar]
- Meng, K.; Finley, T.; Wang, T.; Chen, W.; Ma, W.; Liu, T. Y. Lightgbm: A highly efficient gradient boosting decision tree. Advances in neural information pro-cessing systems 2017, 30. [Google Scholar]
- Superintendencia de la Economia Solidaria. Sistema de Administración del Riesgo de Crédito, SARC. Sistema de Administración del Riesgo de Crédito, SARC, 2024. [Google Scholar]
- Valenzuela, A.; R, V. Algoritmos para Machine Learning utilizados en la Gestión de Riesgo Crediticio en Perú: Machine Learning Algorithms used in Credit Risk Management in Peru. Micaela Revista de Investigación-UNAMBA 2024, 5–30. [Google Scholar]
- Vasquez, C. D. Análisis comparativo de algoritmos de machine learning para predecir morosidad en clientes afiliados a la entidad financiera San Francisco de Mocupe. Universidad señor de Sipan 2025, 1–13. [Google Scholar]
- Yeo, I. K.; Johnson, R. A.; Deng, X. An empirical characteristic function approach to selecting a transformation to normality. Communications for Statistical Applications and Methods 2014, 213–224. [Google Scholar] [CrossRef]
- Yeo, I.; Johnson, R. A new family of power transformations to improve normality or symmetry. Biometrik 2000, 954–959. [Google Scholar] [CrossRef]
- Yusheng, L. A Hybrid Credit Risk Evaluation Model Based on Three-Way Decisions and Stacking Ensemble Approach. Computational Economics 2024, 1–24. [Google Scholar] [CrossRef]
- Zaragoza, J. Riesgo financiero en el sector minero informal: una visión práctica. Mineria y Finanzas 2018, 11–32. [Google Scholar]









| Metric | Ridge | Decision Tree | Random Forest | XGBoost | LightGBM |
|---|---|---|---|---|---|
| Validation RMSE | 0.338 | 0.260 | 0.237 | 0.216 | 0.216 |
| Test RMSE | 0.344 | 0.248 | 0.240 | 0.226 | 0.221 |
| Test R² | 0.642 | 0.814 | 0.825 | 0.845 | 0.850 |
| Metric | Ridge | Decision Tree | Random Forest | XGBoost | LightGBM |
|---|---|---|---|---|---|
| Validation RMSE | 1.300 | 0.486 | 0.296 | 0.332 | 0.288 |
| Test RMSE | 1.340 | 0.476 | 0.280 | 0.294 | 0.276 |
| Test R² | 0.768 | 0.971 | 0.990 | 0.989 | 0.990 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).