Predictive Financial Health Evaluation of Companies Using Random Forest and Logistic Regression Techniques
Abstract
Nearly 50,000 corporate insolvencies were recorded across European markets in 2023, yet most deployed prediction models for corporate insolvency were calibrated on financial data that preceded the significant changes in supply chains and interest rates that followed the end of the pandemic. Identifying deteriorating financial health before default is framed here as a supervised binary classification task over 64 liquidity, leverage, and profitability ratio features drawn from the Polish Companies Bankruptcy Dataset: 10,503 firm-year observations from the third annual reporting period with a 20:1 class imbalance. SMOTE-based oversampling restores minority representation before training, and SHAP-guided feature ranking subsequently retains 22 high-impact ratios while reducing inter-feature collinearity without discarding predictive signal. This feature count is sufficient because the 22 ratios together account for 85% of the model’s total attribution mass in the preliminary Random Forest model. A soft-voting ensemble of Random Forest and Logistic Regression achieves 91.2% accuracy and AUC 0.943, outperforming standalone Random Forest (AUC 0.927), XGBoost (AUC 0.916), and Logistic Regression alone (AUC 0.891) across five stratified cross-validation folds with score stability within ±0.8%. Ensemble tree methods capture nonlinear ratio interactions that linear discriminant approaches structurally cannot represent, particularly across leverage and interest-coverage features where distress signals emerge two reporting periods before formal default.