Rating Transition Matrix

Retrieves the rating transition matrix of a credit rating agency: for every rating at the start of a period, the share of ratings that ended the period in each rating category, in default or withdrawn, which shows how likely a rating is to be upgraded, downgraded or to default.

It is the input of rating migration and default models, such as the Jarrow-Lando-Turnbull model, and of credit portfolio models.

The data comes from CEREP, the central repository where every credit rating agency registered in the European Union reports its ratings to ESMA, published twice a year with periods from 1989. It covers the global ratings of agencies such as S&P, Moody’s, Fitch, DBRS and Scope, for corporates (non-financial, financial and insurance), sovereigns, structured finance and covered bonds, in each agency’s own rating scale.

By default the matrix is withdrawal-adjusted, the convention of the agencies’ own default studies: ratings withdrawn during the period are left out, so each row sums to 1. The matrix compares the rating at the start of the period with the rating at its end, so a default that was followed by a new rating within the period (as after a distressed exchange) shows as that new rating; get_default_rates counts every default within the period and is the measure to calibrate default rates on. The withdrawals can be kept as a separate “Withdrawals” column, and the counts can be returned instead of the probabilities.

The formula of the probabilities is as follows:

\[\text{Transition Probability} \;(\text{from},\; \text{to}) = \frac{\text{Count} \;(\text{from},\; \text{to})}{\sum(\text{Count} \;(\text{from},\; \text{every end category}))},\;\; \text{with the end categories the ratings and default, plus "Withdrawals" only when they are kept}\]

A single year’s matrix rests on few observations in the top and bottom rows: an AAA row with few issuers is often 100% stable one year and shows a downgrade the next. Credit models therefore use the average over many years, or a longer horizon, and check how far the latest year deviates from it, which also shows where in the credit cycle the year stands.

See definition: ESMA

Also known as: rating migration matrix, credit migration matrix, transition probabilities.

Example

Install the Finance Toolkit with pip install financetoolkit -U, then call get_rating_transition_matrix:

from financetoolkit import FixedIncome

fixedincome = FixedIncome(end_date="2025-12-31")

transition_matrix = fixedincome.get_rating_transition_matrix(agency='S&P', year=2025)

transition_matrix.loc['AAA':'CCC', ['AAA', 'AA', 'A', 'BBB', 'BB', 'B', 'CCC', 'D']]

Or, with the Finance Toolkit MCP set up, ask an AI assistant such as Claude or ChatGPT:

How likely were S&P-rated corporates from AAA to CCC to keep, raise or lose their rating, or to default, during 2025?

Which returns:

Parameters

get_rating_transition_matrix accepts the following parameters.

ParameterTypeDescriptionExample
agencystrThe rating agency, e.g. “S&P”, “Moody’s”, “Fitch”, “DBRS”, “Scope” or “Kroll”, or the CEREP code of any registered agency. Defaults to “S&P”."Moody's"
rating_typestrThe rated instruments. Options are: “corporate” (companies), “sovereign” (governments), “structured_finance” (structured finance products), “covered_bonds” (covered bonds). Defaults to “corporate”."sovereign"
yearint | NoneThe first year of the period. Defaults to None, which takes the latest year published.2020
horizonintThe length of the period in years, from 1 January of year. Defaults to 1.5
probabilitiesboolWhether to return the share of ratings per row instead of the number. Defaults to True.False
include_withdrawalsboolWhether to keep the ratings withdrawn during the period as a “Withdrawals” column. Defaults to False.True
regionstr | NoneThe area of the rated entities. Options are: “Africa”, “America”, “Asia”, “Europe”, “EU members”, “International”, “Oceania”, None (all of them). Defaults to None."Europe"
roundingint | NoneThe number of decimals to round the results to. Defaults to None.2
show_columnsstr | list[str] | NoneThe columns to keep, a name or a list of names, matched on every column level, or the rows when no column has those names (such as the line items of a financial statement). Names that do not exist are logged, and when none exist the result is returned in full. Defaults to None, which keeps every column.None, which keeps every column
Share