We have discussed how the volatility index, VIX, and the yield curve can be used to predict recessions. On a similar topic, a recent paper  argued that machine learning models are outperforming logistic regression when it comes to predicting financial crises. It explored the reasons behind this and showed how machine learning can be used to predict future financial crises.
This paper shows that machine learning models outperform logistic regression in predicting financial crises on a macroeconomic dataset covering 17 countries between 1870 and 2016 in both out-of-sample cross-validation and recursive forecasting. The most accurate models are decision tree based ensembles, such as extremely randomised trees and random forests. These accurately predict the majority of financial crises ahead of time—including the global crisis in 2007–08. The gains in predictive accuracy justify the use of initially more opaque machine learning models. To understand their predictions, we apply a novel Shapley value framework which allows us to examine the contributions of individual predictors economically and statistically.
However, unlike the previous paper, these authors pointed out that the most determinant factors for predicting financial crises are the credit growth and the yield curve,
All models consistently identify the same predictors for financial crises. These key early warning signs include: (i) prolonged high growth in domestic credit relative to GDP; (ii) a flat or inverted yield curve especially when nominal yields are low, and (iii) a shared global narrative in both of these dimensions as indicated by the importance of global variables. While the crucial role of credit is an established result in the literature, the predictive power of the yield curve has obtained far less attention as an early warning indicator and we find that the slope of the domestic yield curve has important predictive power even after controlling for recessions.
In summary, researchers showed how credit growth and the yield curve could be used to predict economic downturns. The yield curve and credit data combined with machine-learning techniques can identify market movements that would otherwise not be detectable by human analysis alone.
 Bluwstein, Kristina and Buckmann, Marcus and Joseph, Andreas and Kapadia, Sujit and Kapadia, Sujit and Simsek, Özgür, Credit Growth, the Yield Curve and Financial Crisis Prediction: Evidence from a Machine Learning Approach (2021). ECB Working Paper No. 2021/2614, https://ssrn.com/abstract=3969562