Reader question: A one-year rating-transition matrix tells us what happened over twelve months. How can an algorithm turn that coarse picture into transition probabilities for three months, eighteen months or any other horizon?
Continuous-time credit-migration models replace fixed-period transition probabilities with transition intensities. Those intensities form a generator matrix Q. Once Q is available, the transition matrix over horizon t is:
P(t) = exp(Qt).
This article owns the continuous-time rating-migration representation problem: timestamped rating histories or a discrete transition matrix → a valid generator matrix, horizon-specific transition probabilities, default probabilities and diagnostics about whether the Markov and embeddability assumptions hold.
It does not own one-year cohort transition matrices, point-in-time probability-of-default calibration, IFRS 9 staging or survival models for individual loan default. Those are separate problems. The purpose here is to show how matrix exponentials connect transition intensities to arbitrary time horizons.
This is public mathematical and computational education. It is not a credit opinion, investment recommendation or prediction about any named borrower.
1. A discrete transition matrix is a snapshot
Let rating states be AAA, AA, A, BBB and D, where D denotes default. A one-year transition matrix P has entries:
Pij = P(Rating after one year = j | Rating today = i).
Every row sums to 1. If default is absorbing:
PDD = 1
and the rest of the default row is zero.
For integer horizons, a time-homogeneous discrete Markov model can use powers such as P² or P⁵. But it does not directly provide a clean three-month matrix without additional assumptions.
2. Continuous time replaces probabilities with intensities
A continuous-time Markov chain uses a generator matrix Q. For i ≠ j:
qij ≥ 0
is the instantaneous transition intensity from state i to state j.
The diagonal is:
qii = −Σj≠i qij.
Therefore every row of Q sums to zero.
The diagonal magnitude −qii is the total exit intensity from state i.
3. What an intensity means
Over a very short interval Δt:
P(Rt+Δt=j | Rt=i) ≈ qijΔt
for i ≠ j.
The probability of remaining in i is approximately:
1 + qiiΔt.
An intensity is not itself a probability. It can exceed 1 per year because it is a rate, not a bounded probability.
4. The matrix exponential generates finite-horizon probabilities
For a time-homogeneous continuous-time Markov chain:
P(t) = eQt = I + Qt + (Qt)²/2! + (Qt)³/3! + …
This solves the Kolmogorov forward and backward equations.
The matrix exponential automatically accounts for paths involving multiple transitions within the horizon. A BBB borrower can move to A, then AA, then back to A before the measurement date; P(t) integrates over all such paths allowed by Q.
5. Why exp(Qt) is not the same as I + Qt
The first-order approximation:
P(t) ≈ I + Qt
works only for sufficiently small t.
For longer horizons, higher powers of Q represent sequences of transitions. Ignoring them can produce inaccurate probabilities or even negative entries.
The full matrix exponential is the proper finite-horizon object.
6. Default as an absorbing state
If default is absorbing, its generator row is zero:
qD,j = 0 for all j.
Then the default row of P(t) remains:
(0,…,0,1).
For any starting rating i, the default column PiD(t) gives the model-implied cumulative default probability by horizon t.
7. Estimating Q from continuous rating histories
If exact rating-change times are observed, continuous-time estimation can use the amount of time issuers spend in each state and the count of transitions between states.
Let:
- Nij = number of observed i→j transitions;
- Ti = total exposure time spent in state i.
Under a homogeneous Markov model, a natural maximum-likelihood estimate is:
q̂ij = Nij/Ti, i≠j.
Then:
q̂ii = −Σj≠iq̂ij.
This is often called a duration or intensity approach because it uses the actual time at risk rather than only beginning-and-end cohort states.
8. Why duration data contain more information than annual cohorts
Suppose one issuer moves A→BBB→A during a year. A simple annual cohort snapshot can record A at both endpoints and miss both migrations.
Continuous observation records the two transitions and the time spent in each state.
That can materially change estimated migration dynamics, especially when multiple moves within a period are common.
9. A simple generator example
Consider states A, B and D. Suppose:
Q = [[−0.08, 0.07, 0.01], [0.02, −0.12, 0.10], [0,0,0]].
From state A, the total exit intensity is 8% per year, split between 7% toward B and 1% toward default. From B, the total exit intensity is 12%, split between an upgrade to A and default.
The one-year transition matrix is not I+Q. It is:
P(1) = exp(Q).
The exponential includes paths such as A→B→D within the year.
10. The waiting-time interpretation
In a homogeneous continuous-time Markov chain, the time spent in state i before the next move is exponentially distributed with rate:
λi = −qii.
The mean waiting time is:
1/λi.
Conditional on leaving state i, the probability that the next destination is j is:
qij/λi.
This decomposition gives a useful simulation algorithm: draw a waiting time, then draw the destination state.
11. The embeddability problem
Suppose only an empirical one-year transition matrix P is available. A tempting step is:
Q = log(P)
using the matrix logarithm.
But not every stochastic matrix P can be written as exp(Q) for a valid generator Q.
A valid generator must have nonnegative off-diagonal entries and zero row sums. The matrix logarithm can produce negative off-diagonal entries or complex values.
This is the embedding problem: does the observed discrete transition matrix correspond exactly to some continuous-time Markov chain?
12. Why empirical matrices may be non-embeddable
Sampling noise alone can make a theoretically embeddable process produce a non-embeddable empirical matrix. Other causes include:
- time-varying transition intensities;
- rating momentum;
- duration dependence;
- hidden states;
- cohort censoring;
- rating withdrawals;
- agency policies that smooth or delay rating changes.
A failed logarithm is therefore not merely a numerical inconvenience. It may be evidence that the homogeneous continuous-time Markov representation is too simple.
13. Approximate generator fitting
When no exact valid generator exists, one can solve a constrained optimisation problem such as:
minQ∈G ||exp(QΔ) − P̂||
where G is the set of valid generator matrices and Δ is the observation horizon.
The norm can be weighted to reflect sampling uncertainty or importance of particular transitions.
An approximate generator should be labelled as such. The residual between exp(QΔ) and the empirical matrix is part of the model evidence.
14. Sparse transitions create unstable intensities
High-grade ratings may have very few observed defaults. A raw estimate NiD/Ti can be zero even though true default intensity is not literally zero.
Possible responses include pooling, Bayesian shrinkage, constrained smoothing or external priors.
Every smoothing choice introduces assumptions. Zero counts are data; replacing them with positive intensities is a modelling decision that must be documented.
15. Rating withdrawals require a policy
Real rating histories contain withdrawals, missing observations and entities leaving the dataset.
Treating withdrawal as if it were default is wrong. Treating it as independent censoring may also be wrong if distressed issuers are more likely to disappear.
A model must specify whether withdrawal is:
- a separate state;
- a censoring event;
- mapped using subsequent information;
- excluded under a documented rule.
The choice can materially change estimated intensities.
16. Time homogeneity is a strong assumption
A constant Q assumes that transition intensities do not change with calendar time.
Credit conditions clearly vary across expansions, recessions and crisis periods. A single long-run generator averages those regimes.
A time-inhomogeneous model uses Q(t), with transition matrices determined by a time-ordered exponential rather than a simple exp(Qt) when generators do not commute.
This is more realistic but more difficult to estimate and validate.
17. Markov memorylessness can fail
The Markov assumption says that the current rating contains all relevant rating-history information for future transition intensities.
Empirical research has found rating momentum: after a downgrade, another downgrade can be more likely than for an otherwise identical issuer whose current rating was reached long ago.
Research also finds duration dependence: the transition intensity can depend on how long the issuer has remained in its current rating.
Those effects violate a simple homogeneous first-order Markov model.
18. Testing rating momentum
Augment the model with an indicator describing the direction of the previous transition.
If downgrade intensities differ materially between firms that recently arrived from a better rating and firms that arrived from a worse rating, the current state alone is insufficient.
Falsifier: estimate transition intensities conditional on previous rating direction and test whether the differences are statistically and practically significant.
19. Testing duration dependence
Partition exposure time by duration since entry into the current rating or fit a semi-parametric hazard model.
If exit intensity changes systematically with time spent in state, the exponential waiting-time assumption fails.
Falsifier: compare the empirical waiting-time hazard with a constant hazard. Persistent shape implies a semi-Markov or duration-dependent extension may be needed.
20. Multi-year projections under a generator
Once Q is fitted, arbitrary horizons follow naturally:
P(0.25)=exp(0.25Q)
P(1)=exp(Q)
P(5)=exp(5Q).
The semigroup property holds under time homogeneity:
P(s+t)=P(s)P(t).
This property is convenient and testable. If empirical transition matrices at different horizons strongly violate the semigroup relation beyond sampling error, a single homogeneous generator is questionable.
21. Stressing the generator
A stress model can alter selected intensities rather than directly editing a transition matrix.
For example, downgrade and default intensities can be multiplied by scenario factors while upgrade intensities are reduced.
After modifying Q, the diagonal must be reset so each row sums to zero, and the resulting generator must remain valid.
Stress design should preserve mathematical validity but does not become empirically justified merely because the stressed matrix is valid.
22. Inputs and outputs
Inputs can include:
- rating-state definitions;
- timestamped rating histories;
- entity/issue weighting rule;
- withdrawal and censoring policy;
- observation window;
- default-state definition;
- time-homogeneity assumption;
- smoothing or prior rules;
- numerical matrix-exponential method;
- generator-fitting objective if starting from P.
Outputs can include:
- generator matrix Q;
- state exit intensities;
- destination probabilities conditional on exit;
- P(t) at requested horizons;
- cumulative default probabilities;
- expected state durations;
- embeddability diagnostics;
- fit residuals;
- bootstrap confidence intervals;
- Markov and stationarity tests.
23. Evidence polarity
Evidence for confidence includes valid nonnegative off-diagonal generator entries, row sums near zero, stable intensities under reasonable sample changes, close reproduction of observed transition matrices, consistent projections across multiple horizons, acceptable waiting-time diagnostics and no strong residual rating-history effects.
Evidence against confidence includes non-embeddability, large approximation residuals, unstable rare-transition intensities, strong downgrade momentum, duration dependence, major differences across calendar regimes, or projected transition matrices that contradict observed horizon-specific behaviour.
24. Counterexample: taking the matrix logarithm blindly
An empirical annual matrix can have a mathematically defined principal logarithm whose off-diagonal elements include negative numbers.
Such a matrix is not a valid generator.
Falsifier: after any logarithm, verify every off-diagonal qij ≥ 0 and every row sum equals zero within tolerance. If not, the result cannot be interpreted as transition intensities.
25. Counterexample: zero observed defaults
Suppose no AAA issuer defaults in the sample. The raw MLE gives qAAA,D=0.
That does not prove default is impossible. It proves only that the sample contains no direct AAA→D transitions.
Falsifier: quantify uncertainty from exposure time and compare with external long-horizon evidence. A precise zero default intensity is unsupported by sparse data.
26. Counterexample: cohort matrix hides intermediate moves
If many issuers migrate more than once within a year, annual start/end cohorts underestimate transition activity.
Falsifier: compare a cohort estimator with a continuous-observation duration estimator on the same history. Material differences show that annual snapshots are discarding relevant path information.
27. Counterexample: one Q across calm and crisis years
A homogeneous generator may reproduce the long-run average matrix while badly understating crisis downgrade intensity and overstating calm-period transitions.
Falsifier: estimate Q separately across regimes or rolling windows. If intensities move systematically beyond sampling uncertainty, a single constant generator is not adequate for state-conditional use.
28. Counterexample: rating momentum
Two BBB issuers can have the same current rating but different recent histories: one was downgraded from A last month, the other has been BBB for four years.
A first-order Markov chain treats them identically.
Falsifier: if subsequent downgrade rates differ materially after conditioning on current rating, the Markov state is incomplete.
29. Diagnostic ladder
- State audit: verify rating definitions and default absorption.
- History reconciliation: check timestamps, overlapping issues and withdrawals.
- Exposure-time audit: reconcile Ti totals.
- Transition-count audit: reconcile Nij.
- Generator validity: nonnegative off-diagonals and zero row sums.
- Matrix-exponential reconstruction: compare exp(QΔ) with observed P̂.
- Embeddability test: distinguish exact from approximate generators.
- Bootstrap stability: assess rare-transition uncertainty.
- Waiting-time test: inspect exponential-holding-time fit.
- Momentum test: condition on previous transition direction.
- Duration test: condition on time in current rating.
- Regime test: compare generators across calendar periods.
- Horizon test: compare model P(t) with independently estimated horizon matrices.
30. Alternatives
Discrete-time transition matrices are simpler and sufficient when only fixed-period movements matter.
Survival models model time to default directly rather than the full rating state path.
Semi-Markov models allow transition hazards to depend on time spent in the current rating.
Higher-order Markov models include recent rating history explicitly.
Macroeconomic transition models let intensities or probabilities vary with economic conditions.
Latent-factor credit models focus on default dependence across obligors rather than rating migration of one obligor through time.
31. Connections to the surrounding Bukit Timah Tutor knowledge estate
The discrete-time baseline is credit-rating transition-matrix algorithms. This page extends the same state-space idea into continuous time through generator matrices.
Rating-grade default calibration is a separate layer covered in probability-of-default calibration algorithms.
Time-to-default modelling is developed in survival-analysis algorithms.
Expected-loss applications connect to IFRS 9 expected-credit-loss algorithms.
The full lane is indexed at Finance & Banking Algorithms | Applied Mathematics in Real Financial Systems.
32. What would falsify confidence?
Confidence should be withdrawn if no valid or acceptably close generator exists, transition intensities are unstable, sparse cells dominate conclusions, withdrawals are handled inconsistently, empirical horizon matrices violate the homogeneous semigroup relation materially, waiting times are clearly non-exponential, or previous rating direction and duration contain substantial predictive information after current rating is known.
33. Verification and update triggers
Preserve rating histories, exposure times, transition counts, withdrawal policy, weighting rule, fitted Q, matrix-exponential implementation, residuals and uncertainty intervals. Unit-test the matrix exponential against known small generators and verify P(t) remains row-stochastic and nonnegative across requested horizons.
Trigger review when rating definitions change, agency methodology changes, a new crisis regime appears, transition counts accumulate materially, rating-withdrawal behaviour shifts, embeddability deteriorates, duration or momentum effects strengthen, or the model is asked to project beyond horizons covered by validation.
34. Primary and high-quality references
- Robert B. Israel, Jeffrey S. Rosenthal and Jason Z. Wei, Finding Generators for Markov Chains via Empirical Transition Matrices, with Applications to Credit Ratings, Mathematical Finance, 2001.
- David Lando and Torben M. Skødeberg, Analyzing Rating Transitions and Rating Drift with Continuous Observations, Journal of Banking & Finance, 2002.
- David Lando, Rating Transition Matrices, Encyclopedia of Quantitative Finance, for the connection between Markov chains and transition-matrix analysis.
- Peter Fledelius, David Lando and Jens Perch Nielsen, Non-Parametric Analysis of Rating Transition and Default Data, for intensity and duration diagnostics.
Educational boundary: A generator matrix is a compact representation of a chosen stochastic model. The matrix exponential is exact conditional on that model; the model itself can still fail because ratings have memory, regimes change, data are sparse or the empirical transition matrix is not embeddable.
