Can we tell in advance whose credit rating will be cut?
The research compared six machine learning models using data on thousands of companies rated by S&P. Those made of many decision trees anticipated, almost without error, who would be downgraded or default, and an explanation method showed what mattered in each risk band. Explained in 12 screens.
A credit rating is a committee's opinion
Agencies such as S&P give companies a grade, the rating, that says how likely they are to pay their debts. The scale has 23 rungs, from AAA (the safest) to D (default). When the rating falls, debt becomes more expensive and contract clauses can be triggered.
Touch a rung. Each article in the thesis grouped the rungs in its own way.
Tables 2.5 and 3.2 and section 3.2.3 of the thesis. Table 3.2 places rung CC in band B; we kept it as it is.
Six ways to pick out the companies that will fall
They all receive the same figures for each company and learn, from past examples, to draw a border between those that fell and those that did not. What changes is the shape of the border they can draw.
Our illustration with 60 made-up companies and only two figures per company. The thesis models use dozens of variables at once.
Almost 28,000 ratings, six in ten from the United States
The first article gathered, from the S&P Capital IQ Pro database, 3,453 rated companies from 20 countries, from 2018 to 2024, and 51 variables for each: 43 financial figures (debt, cash, margins, coverage) and 8 business assessments (industry risk, country risk, governance).
Because the mix of ratings varies a lot from country to country, the author trained one model per country. Touch a country.
With more companies, the models pull apart
Each model tried to get right the class (A, B, C or D) of companies it had not seen. In most countries, almost all topped 90%. In the United States, with more companies and a broader mix, the neural network and the trees pulled away from the traditional models. Touch a country.
Average accuracy over 5 repetitions of 10-fold cross-validation (Table 2.6). A single decision tree did worse; the thesis does not publish its figures.
Now the question changes: will this company fall in the next 12 months?
The second article used 31,151 company observations (2017 to 2022) and 46 variables. Instead of guessing the rating, each model answers yes or no: will the company be downgraded or default in the following year? And there is one model for each of the six risk bands.
To mimic real use, the models learned from 2017 to 2021 and were tested on 2022, a year they had never seen.
Height = share of downgrade or default cases in each band (Table 3.1).
Catching who falls without crying wolf
When few companies fall, “being right a lot” is misleading: whoever says nobody will fall is almost always right and is of no use. That is why the thesis measures two things at once: of those that fell, how many the alarm caught and of the alarms, how many were real. The F1 combines both into a score from 0 to 1.
Adjust how sensitive the alarm is.
Illustration with 100 made-up companies, 20 of them heading for a downgrade. The thesis also uses the AUC (from 0.5, a coin toss, to 1, perfect separation) and the MCC (from −1 to 1).
XGBoost and Random Forest made almost no mistakes in any band
The two tree models came close to the maximum (1) in all six bands; XGBoost reached 1.000 at both ends of the scale. Logistic regression and SVM did reasonably in the good bands and stumbled in band BB and in the riskiest ones.
Table 3.4 (5-fold cross-validation) and Table 3.7 (learns from 2017–2021, tests on 2022). Height proportional to the value, starting from zero.
Faced with 2022, SVM lost the most
A model can do well on the data it learned from and fail the following year. Compare, band by band, the cross-validation result (●) with the 2022 test result (◆). XGBoost barely moved; SVM plunged in bands BB and CCC.
Management and governance weigh most in every band; liquidity gains weight with risk
To explain the predictions, the thesis used SHAP, a method that measures how much each variable pushed the model's answer. On average, the assessment of management and governance came first in all six bands. Right below it, in the safer bands comes the industry; from band BB down, liquidity, the cash at hand to pay the bills.
Approximate values, read from the charts in Figure 3.3 (mean absolute SHAP value, the seven most influential variables in each band).
Without the previous rating, accuracy drops, above all in the riskiest band
Results so close to perfection raise suspicion. The author redid the analysis in two ways: without the size variables (revenue, debt in absolute values) and without the rating history (the previous rating and the agency's last rating action).
Without size, nothing changed. Without the history, the F1 fell, slightly for XGBoost and sharply for Random Forest. In the riskiest band, Random Forest went from 0.93 to 0.25. Touch a band.
An alarm that explains why it went off
Banks and investors
XGBoost suits cases where missing a company that will fall is costly; Random Forest, when computing cost matters. Logistic regression stays as a benchmark for low-risk portfolios.
Risk monitoring
What signals danger changes with the band: in the risky bands, watch liquidity and charge coverage; in the safe ones, the industry and scale.
Regulators
Rules such as those of the European Banking Authority and the Fed require models to be explained and validated. SHAP shows what weighed in each prediction.
Researchers
Suggested next steps: news, reports and market data (CDS), real-time analysis and models that are explainable by design.
What this research does not say
- One source, one test year. Data from a single database (S&P) and a test on 2022 only; other economic cycles may change the picture. · according to the author
- Structured figures only. News, analyst reports and market signals were left out. · according to the author
- Explanation after the fact. SHAP explains the finished model; the author suggests models that are explainable by design. · according to the author
- Almost perfect, helped by history. Part of the accuracy comes from knowing the previous rating (Appendix D), information that does not appear in the list of variables in Table 3.3. · our note
- No comparison with a single model. The thesis argues for one model per band, but does not show the result of one model for all bands together. · our note
Credits
OLIVEIRA, Nazário Augusto de. Explaining corporate credit rating transitions and defaults through machine learning: a data-driven approach to risk assessment. Doctoral thesis (Business Administration) — Mackenzie Presbyterian University, São Paulo, 2026. Advisor: Prof. Dr. Leonardo Fernando Cruz Basso.
A thesis in two articles, the first published in the journal Risks. Full tuition waiver from Instituto Presbiteriano Mackenzie. The author declares having used ChatGPT for text revision, organizing the work and programming support. This version simplifies the thesis for a general audience.