Research article

Optimizing corporate bankruptcy prediction through stacking ensemble of KNeighbors, decision tree, and random forest algorithms: Insights from Vietnamese enterprises

  • Published: 10 September 2026
  • JEL Codes: E44, F31, F37, G15

  • This study aimed to explore the prediction of corporate bankruptcy probability by applying the stacking ensemble approach that integrates KNeighbors, decision tree, and random forest algorithms, comparing the result with the application of each of the methods individually. The dataset of 6819 firms, monitored by Vietnamese commercial banks from 2014 to 2022, is based on 94 financial features extracted from the financial statements of the firms. The study provides empirical support for the stacking ensemble approach consisting of three interpretable machine learning algorithms: KNeighbors, decision tree, and random forest, outperforming the application of each of the methods individually for the prediction of the default probability of the firm. The stacked approach yielded significant improvements in the accuracy, precision, specificity, and F1 score of the prediction. The validation of the methods was based on a confusion matrix and the Wilcoxon signed-rank test. This study contributes to the literature by providing applied empirical validation within two relatively underexplored areas. First, while the majority of previous research on bankruptcy prediction has focused on the effectiveness of more complex algorithms, such as boosted ensemble methods and neural networks, the effectiveness of less complex models within ensemble methods has received little attention. The study provides evidence of the effectiveness of K-nearest neighbors, decision tree, and random forest models within a stacking ensemble method. Second, while previous research has relied on data from developed markets, the effectiveness of financial risk assessment models within emerging markets has received little attention. The paper provides evidence of the effectiveness of a stacking ensemble method within an emerging market, namely Vietnam, where financial characteristics of companies are significantly different from those found in developed markets.

    Citation: Nhat Minh Nguyen, Anh Hoang Le. Optimizing corporate bankruptcy prediction through stacking ensemble of KNeighbors, decision tree, and random forest algorithms: Insights from Vietnamese enterprises[J]. Data Science in Finance and Economics, 2026, 6(3): 508-532. doi: 10.3934/DSFE.2026018

    Related Papers:

  • This study aimed to explore the prediction of corporate bankruptcy probability by applying the stacking ensemble approach that integrates KNeighbors, decision tree, and random forest algorithms, comparing the result with the application of each of the methods individually. The dataset of 6819 firms, monitored by Vietnamese commercial banks from 2014 to 2022, is based on 94 financial features extracted from the financial statements of the firms. The study provides empirical support for the stacking ensemble approach consisting of three interpretable machine learning algorithms: KNeighbors, decision tree, and random forest, outperforming the application of each of the methods individually for the prediction of the default probability of the firm. The stacked approach yielded significant improvements in the accuracy, precision, specificity, and F1 score of the prediction. The validation of the methods was based on a confusion matrix and the Wilcoxon signed-rank test. This study contributes to the literature by providing applied empirical validation within two relatively underexplored areas. First, while the majority of previous research on bankruptcy prediction has focused on the effectiveness of more complex algorithms, such as boosted ensemble methods and neural networks, the effectiveness of less complex models within ensemble methods has received little attention. The study provides evidence of the effectiveness of K-nearest neighbors, decision tree, and random forest models within a stacking ensemble method. Second, while previous research has relied on data from developed markets, the effectiveness of financial risk assessment models within emerging markets has received little attention. The paper provides evidence of the effectiveness of a stacking ensemble method within an emerging market, namely Vietnam, where financial characteristics of companies are significantly different from those found in developed markets.



    加载中


    [1] Amirshahi B, Lahmiri S (2024) Bankruptcy Prediction Using Optimal Ensemble Models under Balanced and Imbalanced Data. Expert Syst 41 : e13599. https://doi.org/10.1111/exsy.13599. doi: 10.1111/exsy.13599
    [2] Anderson SW, Lanen WN (2002) Using Electronic Data Interchange (EDI) to Improve the Efficiency of Accounting Transactions. Account Rev 77: 703–729. https://doi.org/10.2308/accr.2002.77.4.703 doi: 10.2308/accr.2002.77.4.703
    [3] Barboza F, Kimura H, Altman E (2017) Machine Learning Models and Bankruptcy Prediction. Expert Syst Appl 83: 405–417. https://doi.org/10.1016/j.eswa.2017.04.006 doi: 10.1016/j.eswa.2017.04.006
    [4] Beaver WH, Correia M, McNichols MF (2011) Financial Statement Analysis and the Prediction of Financial Distress. Found Trends Account 5: 99–173. https://doi.org/10.1561/1400000018 doi: 10.1561/1400000018
    [5] Beyer A, Cohen DA, Lys TZ, et al. (2010) The Financial Reporting Environment: Review of the Recent Literature. J Account Econ 50: 296–343. https://doi.org/10.1016/j.jacceco.2010.10.003 doi: 10.1016/j.jacceco.2010.10.003
    [6] Biau G, Cadre B, Rouvière L (2019) Accelerated Gradient Boosting. Mach Learn 108: 971–992. https://doi.org/10.1007/s10994-019-05787-1 doi: 10.1007/s10994-019-05787-1
    [7] Birru MW (2016) The impact of capital structure on financial performance of commercial banks in Ethiopia. Glob J Manag Bus Res 16: 43–52.
    [8] Bose U, Filomeni S, Mallick S (2021) Does Bankruptcy Law Improve the Fate of Distressed Firms? The Role of Credit Channels. J Corp Financ 68: 101836. https://doi.org/10.1016/j.jcorpfin.2020.101836 doi: 10.1016/j.jcorpfin.2020.101836
    [9] Breiman L (2001) Random Forests. Mach Learn 45: 5–32.
    [10] Broelemann K, Kasneci G (2019) A Gradient-Based Split Criterion for Highly Accurate and Transparent Model Trees. Proc Twenty-Eighth Int Jt Conf Artif Intell, 2030–2037. https://doi.org/10.24963/ijcai.2019/281 doi: 10.24963/ijcai.2019/281
    [11] Carmona P, Climent F, Momparler A (2019) Predicting Failure in the U.S. Banking Sector: An Extreme Gradient Boosting Approach. Int Rev Econ Finance 61: 304–323. https://doi.org/10.1016/j.iref.2018.03.008 doi: 10.1016/j.iref.2018.03.008
    [12] Carrizosa E, Molero-Río C, Romero Morales D (2021) Mathematical Optimization in Classification and Regression Trees. TOP 29: 5–33. https://doi.org/10.1007/s11750-021-00594-1 doi: 10.1007/s11750-021-00594-1
    [13] Chahboun S, Maaroufi M (2022) Performance Comparison of K-Nearest Neighbor, Random Forest, and Multiple Linear Regression to Predict Photovoltaic Panels' Power Output, In: Saeed F, Al-Hadhrami T, Mohammed E, et al. (Eds.), Advances on Smart and Soft Computing, Singapore: Springer, 301–311. https://doi.org/10.1007/978-981-16-5559-3_25
    [14] Chen C, Zhang Q, Yu B, et al. (2020) Improving Protein-Protein Interactions Prediction Accuracy Using XGBoost Feature Selection and Stacked Ensemble Classifier. Comput Biol Med 123: 103899. https://doi.org/10.1016/j.compbiomed.2020.103899 doi: 10.1016/j.compbiomed.2020.103899
    [15] Choi H, Son H, Kim C (2018) Predicting Financial Distress of Contractors in the Construction Industry Using Ensemble Learning. Expert Syst Appl 110: 1–10. https://doi.org/10.1016/j.eswa.2018.05.026 doi: 10.1016/j.eswa.2018.05.026
    [16] Climent F, Momparler A, Carmona P (2019) Anticipating Bank Distress in the Eurozone: An Extreme Gradient Boosting Approach. J Bus Res 101: 885–896. https://doi.org/10.1016/j.jbusres.2018.11.015 doi: 10.1016/j.jbusres.2018.11.015
    [17] Dang VC, Tran XH (2021) The Impact of Financial Distress on Tax Avoidance: An Empirical Analysis of the Vietnamese Listed Companies. Cogent Bus Manag 8: 1953678. https://doi.org/10.1080/23311975.2021.1953678 doi: 10.1080/23311975.2021.1953678
    [18] Demerjian P, Lev B, McVay S (2012) Quantifying Managerial Ability: A New Measure and Validity Tests. Manage Sci 58: 1229–1248. https://doi.org/10.1287/mnsc.1110.1487 doi: 10.1287/mnsc.1110.1487
    [19] DeYoung R, Rice T (2004) Noninterest Income and Financial Performance at U.S. Commercial Banks. Financ Rev 39: 101–127. https://doi.org/10.1111/j.0732-8516.2004.00069.x doi: 10.1111/j.0732-8516.2004.00069.x
    [20] DeYoung R, Torna G (2013) Nontraditional Banking Activities and Bank Failures during the Financial Crisis. J Financ Intermed 22: 397–421. https://doi.org/10.1016/j.jfi.2013.01.001 doi: 10.1016/j.jfi.2013.01.001
    [21] Elsas R, Hackethal A, Holzhäuser M (2010) The Anatomy of Bank Diversification. J Bank Finance 34: 1274–1287. https://doi.org/10.1016/j.jbankfin.2009.11.024 doi: 10.1016/j.jbankfin.2009.11.024
    [22] Ghazalat A, AlHallaq S (2024) Predicting and Assessing Bankruptcy Risk: The Role of Accounting Conservatism and Business Strategies. J Financ Rep Account 24: 497–515. https://doi.org/10.1108/JFRA-07-2023-0388 doi: 10.1108/JFRA-07-2023-0388
    [23] Graham JR, Leary MT, Roberts MR (2015) A Century of Capital Structure: The Leveraging of Corporate America. J Financ Econ 118: 658–683. https://doi.org/10.1016/j.jfineco.2014.08.005 doi: 10.1016/j.jfineco.2014.08.005
    [24] Gul S, Cho HR (2019) Capital Structure and Default Risk: Evidence from Korean Stock Market. J Asian Finance Econ Bus 6: 15–24. https://doi.org/10.13106/jafeb.2019.vol6.no2.15 doi: 10.13106/jafeb.2019.vol6.no2.15
    [25] He Z, Suardi S, Wang K, et al. (2022) Firms' COVID-19 Pandemic Exposure and Corporate Cash Policy: Evidence from China. Econ Model 116: 105999. https://doi.org/10.1016/j.econmod.2022.105999 doi: 10.1016/j.econmod.2022.105999
    [26] Iparraguirre-Villanueva O, Cabanillas-Carbonell M (2024) Predicting Business Bankruptcy: A Comparative Analysis with Machine Learning Models. J Open Innov Technol Mark Complex 10: 100375. https://doi.org/10.1016/j.joitmc.2024.100375 doi: 10.1016/j.joitmc.2024.100375
    [27] Issa S, Bizel G, Jagannathan SK, et al. (2024) A Comprehensive Approach to Bankruptcy Risk Evaluation in the Financial Industry. J Risk Financ Manag 17: 41. https://doi.org/10.3390/jrfm17010041 doi: 10.3390/jrfm17010041
    [28] Jabeur SB, Gharib C, Mefteh-Wali S, et al. (2021) CatBoost Model and Artificial Intelligence Techniques for Corporate Failure Prediction. Technol Forecast Soc Change 166: 120658. https://doi.org/10.1016/j.techfore.2021.120658 doi: 10.1016/j.techfore.2021.120658
    [29] Jiang M, Liu J, Zhang L, et al. (2020) An Improved Stacking Framework for Stock Index Prediction by Leveraging Tree-Based Ensemble Models and Deep Learning Algorithms. Physica A 541: 122272. https://doi.org/10.1016/j.physa.2019.122272 doi: 10.1016/j.physa.2019.122272
    [30] Jin X (2021) Corporate Tax Aggressiveness and Capital Structure Decisions: Evidence from China. Int Rev Econ Financ 75: 94–111. https://doi.org/10.1016/j.iref.2021.04.008 doi: 10.1016/j.iref.2021.04.008
    [31] Krauss C, Stübinger J (2017) Non-Linear Dependence Modelling with Bivariate Copulas: Statistical Arbitrage Pairs Trading on the S & P 100. Appl Econ 49: 5352–5369. https://doi.org/10.1080/00036846.2017.1305097 doi: 10.1080/00036846.2017.1305097
    [32] Kuyoro AO, Ogunyolu OA, Ayanwola TG, et al. (2022) Dynamic Effectiveness of Random Forest Algorithm in Financial Credit Risk Management for Improving Output Accuracy and Loan Classification Prediction. Ingén Syst Inf 27. https://doi.org/10.18280/isi.270515 doi: 10.18280/isi.270515
    [33] La Rocca M, La Rocca T, Cariola A (2011) Capital Structure Decisions During a Firm’s Life Cycle. Small Bus Econ 37: 107–130. https://doi.org/10.1007/s11187-009-9229-z doi: 10.1007/s11187-009-9229-z
    [34] Lee S, Nguyen NH, Karamanli A, et al. (2023) Super Learner Machine-Learning Algorithms for Compressive Strength Prediction of High Performance Concrete. Struct Concr 24: 2208–2228. https://doi.org/10.1002/suco.202200424 doi: 10.1002/suco.202200424
    [35] Li Y, Xie Y, Yu C, et al. (2021) Feature importance recap and stacking models for forex price prediction. arXiv preprint. https://doi.org/10.48550/arXiv.2107.14092
    [36] Muslim MA, Dasril Y, Javed H, et al. (2024) An Ensemble Stacking Algorithm to Improve Model Accuracy in Bankruptcy Prediction. J Data Sci Intell Syst 2: 79–86. https://doi.org/10.47852/bonviewJDSIS3202655 doi: 10.47852/bonviewJDSIS3202655
    [37] Nagavelli U, Samanta D, Chakraborty P (2022) Machine Learning Technology-Based Heart Disease Detection Models. J Healthc Eng 2022: 7351061. https://doi.org/10.1155/2022/7351061 doi: 10.1155/2022/7351061
    [38] Noh SH (2023) Comparing the Performance of Corporate Bankruptcy Prediction Models Based on Imbalanced Financial Data. Sustainability 15: 4794. https://doi.org/10.3390/su15064794 doi: 10.3390/su15064794
    [39] Nwogugu M (2006) Decision-Making, Risk and Corporate Governance: New Dynamic Models/Algorithms and Optimization for Bankruptcy Decisions. Appl Math Comput 179: 386–401. https://doi.org/10.1016/j.amc.2005.11.140 doi: 10.1016/j.amc.2005.11.140
    [40] Ohlson JA (1980) Financial Ratios and the Probabilistic Prediction of Bankruptcy. J Account Res 18: 109–131.
    [41] Probst P, Wright MN, Boulesteix AL (2019) Hyperparameters and Tuning Strategies for Random Forest. WIREs Data Min Knowl Discov 9: e1301. https://doi.org/10.1002/widm.1301 doi: 10.1002/widm.1301
    [42] Ramlall I (2018) A Framework for Financial Stability Risk Assessment in Banks, In: The Banking Sector Under Financial Stability, Bingley: Emerald Publishing Limited, 29–117. https://doi.org/10.1108/978-1-78769-681-520181003
    [43] Ricca LT, Jucá MN, Hadad Junior E (2021) Tax Benefit and Bankruptcy Cost of Debt. Q Rev Econ Finance 81: 82–92. https://doi.org/10.1016/j.qref.2021.05.003 doi: 10.1016/j.qref.2021.05.003
    [44] Richardson G, Taylor G, Lanis R (2015) The Impact of Financial Distress on Corporate Tax Avoidance Spanning the Global Financial Crisis: Evidence from Australia. Econ Model 44: 44–53. https://doi.org/10.1016/j.econmod.2014.09.015 doi: 10.1016/j.econmod.2014.09.015
    [45] Richardson SA, Sloan RG, Soliman MT, et al. (2005) Accrual Reliability, Earnings Persistence and Stock Prices. J Account Econ 39: 437–485. https://doi.org/10.1016/j.jacceco.2005.04.005 doi: 10.1016/j.jacceco.2005.04.005
    [46] Rokach L (2016) Decision Forest: Twenty Years of Research. Inf Fusion 27: 111–125. https://doi.org/10.1016/j.inffus.2015.06.005 doi: 10.1016/j.inffus.2015.06.005
    [47] Sandin AR, Porporato M (2007) Corporate Bankruptcy Prediction Models Applied to Emerging Economies. Int J Commer Manag 17: 295–311. https://doi.org/10.1108/10569210710844372 doi: 10.1108/10569210710844372
    [48] Shaukat K, Luo S, Chen S, et al. (2020) Cyber Threat Detection Using Machine Learning Techniques: A Performance Evaluation Perspective. 2020 International Conference on Cyber Warfare and Security (ICCWS). https://doi.org/10.1109/ICCWS48432.2020.9292388
    [49] Siswoyo B, Abas ZA, Che Pee AN, et al. (2022) Ensemble Machine Learning Algorithm Optimization of Bankruptcy Prediction of Bank. IAES Int J Artif Intell 11: 679–686. https://doi.org/10.11591/ijai.v11.i2.pp679-686 doi: 10.11591/ijai.v11.i2.pp679-686
    [50] Uddin N, Ahamed MKU, Uddin MA, et al. (2023) An Ensemble Machine Learning Based Bank Loan Approval Predictions System with a Smart Application. Int J Cogn Comput Eng 4: 327–339. https://doi.org/10.1016/j.ijcce.2023.09.001 doi: 10.1016/j.ijcce.2023.09.001
    [51] Wang S, Chi G (2024) Cost-Sensitive Stacking Ensemble Learning for Company Financial Distress Prediction. Expert Syst Appl 255: 124525. https://doi.org/10.1016/j.eswa.2024.124525 doi: 10.1016/j.eswa.2024.124525
    [52] Wang Z, Wang X, Liu X, et al. (2024) A Novel Stacked Generalization Ensemble-Based Hybrid SGM-BRR Model for ESG Score Prediction. Sustainability 16: 6979. https://doi.org/10.3390/su16166979 doi: 10.3390/su16166979
    [53] Wolpert DH (1992) Stacked Generalization. Neural Netw 5: 241–259. https://doi.org/10.1016/S0893-6080(05)80023-1 doi: 10.1016/S0893-6080(05)80023-1
    [54] Zhang S, Li J, Li Y (2023) Reachable Distance Function for KNN Classification. IEEE Trans Knowl Data Eng 35: 7382–7396. https://doi.org/10.1109/TKDE.2022.3185149 doi: 10.1109/TKDE.2022.3185149
    [55] Zhao Z, Xu S, Kang BH, et al. (2015) Investigation and Improvement of Multi-Layer Perceptron Neural Networks for Credit Scoring. Expert Syst Appl 42: 3508–3516.
  • Reader Comments
  • © 2026 the Author(s), licensee AIMS Press. This is an open access article distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/4.0)

Metrics

Article views(473) PDF downloads(51) Cited by(0)

Article outline

Figures and Tables

Figures(3)  /  Tables(6)

Other Articles By Authors

/

DownLoad:  Full-Size Img  PowerPoint
Return
Return

Catalog