Chapter 19

Markov Chains & Steady States

00 · Symbol Glossary

$P$P — transition matrix

A stochastic matrix whose rows sum to 1: each row gives the probability distribution of the next state given the current state. Entry pijp_{ij} is the probability of moving from state ii to state jj in one step. Powers PnP^n give nn-step transition probabilities.

$\boldsymbol{\pi}$pi — stationary distribution

A row vector π\boldsymbol{\pi} satisfying πP=π\boldsymbol{\pi} P = \boldsymbol{\pi} and iπi=1\sum_i \pi_i = 1. Read aloud as "pi." The chain is in steady state when the state distribution equals π\boldsymbol{\pi} — the distribution does not change from one step to the next.

$X_t$X sub t — state at time t

The random state of the Markov chain at time tt. The Markov property: P(Xt+1Xt,Xt1,)=P(Xt+1Xt)P(X_{t+1} \mid X_t, X_{t-1}, \ldots) = P(X_{t+1} \mid X_t) — only the current state matters for predicting the future.

$P^n$P to the n — n-step transitions

The nn-th power of the transition matrix. Entry (Pn)ij(P^n)_{ij} is the probability of being in state jj after nn steps, starting from state ii. Computed via matrix multiplication — the same machinery from Chapter 2.


01 · Stochastic Matrices

A credit rating, a trading regime, or a customer's account status tomorrow depends only on today's state — not the full history. Markov chains encode this memoryless structure as matrix algebra.

Definition — Stochastic Matrix

A square matrix PRn×nP \in \mathbb{R}^{n \times n} is stochastic (or a transition matrix) if:

pij0 for all i,jj=1npij=1 for all ip_{ij} \geq 0 \text{ for all } i,j \qquad \sum_{j=1}^{n} p_{ij} = 1 \text{ for all } i

pijp_{ij} — probability of transitioning from state ii to state jj in one step.

Each row is a probability distribution over the nn states. Entries are nonnegative; rows sum to exactly 1.

✓ Example — Credit Rating Transition Matrix

A simplified 3-state credit model: states {\{AAA, BBB, Default}\}.

P=(0.920.070.010.020.900.08001)P = \begin{pmatrix}0.92 & 0.07 & 0.01 \\ 0.02 & 0.90 & 0.08 \\ 0 & 0 & 1\end{pmatrix}

Row 1 (AAA): 92%92\% stay AAA, 7%7\% downgrade to BBB, 1%1\% default. Row 3 (Default): 100%100\% remain in default — an absorbing state. Each row sums to 0.92+0.07+0.01=10.92+0.07+0.01=1 ✓.

❌ Failure — Rows Not Summing to 1

P=(0.50.30.40.4)P = \begin{pmatrix}0.5&0.3\\0.4&0.4\end{pmatrix}. Row 1 sums to 0.80.8; row 2 sums to 0.80.8.

Why it breaks: pijp_{ij} are supposed to be probabilities. If row ii sums to 0.80.8, there is a 20%20\% probability of transitioning to no state — undefined. Stochastic matrices require jpij=1\sum_j p_{ij} = 1 for every row.

Consequence: PnP^n no longer represents valid nn-step probabilities. Normalise each row before any Markov analysis.


02 · Markov Chains and the Markov Property

Definition — Homogeneous Markov Chain

A sequence of random variables X0,X1,X2,X_0, X_1, X_2, \ldots taking values in {1,,n}\{1, \ldots, n\} is a Markov chain with transition matrix PP if:

P(Xt+1=jXt=i,Xt1,,X0)=pijP(X_{t+1} = j \mid X_t = i, X_{t-1}, \ldots, X_0) = p_{ij}

The future depends on the past only through the present state — the Markov property.

If the initial distribution is μ(0)\boldsymbol{\mu}^{(0)} (row vector), the distribution after tt steps is:

μ(t)=μ(0)Pt\boldsymbol{\mu}^{(t)} = \boldsymbol{\mu}^{(0)} P^t
Step-by-step — Two-step transitions for $P = \begin{pmatrix}0.5&0.5\\0.2&0.8\end{pmatrix}$, starting from state 1
1

One-step from state 1: μ(1)=(10)P=(0.50.5)\boldsymbol{\mu}^{(1)} = \begin{pmatrix}1&0\end{pmatrix} P = \begin{pmatrix}0.5&0.5\end{pmatrix}.

The 0.50.5 in position 1 comes from 1p11=0.51 \cdot p_{11} = 0.5; the 0.50.5 in position 2 from 1p12=0.51 \cdot p_{12} = 0.5.

2

Compute P2P^2: P2=PPP^2 = PP.

(P2)11=0.5(0.5)+0.5(0.2)=0.25+0.10=0.35(P^2)_{11} = 0.5(0.5)+0.5(0.2) = 0.25+0.10 = 0.35.

(P2)12=0.5(0.5)+0.5(0.8)=0.25+0.40=0.65(P^2)_{12} = 0.5(0.5)+0.5(0.8) = 0.25+0.40 = 0.65.

(P2)21=0.2(0.5)+0.8(0.2)=0.10+0.16=0.26(P^2)_{21} = 0.2(0.5)+0.8(0.2) = 0.10+0.16 = 0.26.

(P2)22=0.2(0.5)+0.8(0.8)=0.10+0.64=0.74(P^2)_{22} = 0.2(0.5)+0.8(0.8) = 0.10+0.64 = 0.74.

3

Two-step from state 1: μ(2)=(10)P2=(0.350.65)\boldsymbol{\mu}^{(2)} = \begin{pmatrix}1&0\end{pmatrix} P^2 = \begin{pmatrix}0.35&0.65\end{pmatrix}.

Alternatively: μ(2)=μ(1)P=(0.50.5)(0.50.50.20.8)=(0.350.65)\boldsymbol{\mu}^{(2)} = \boldsymbol{\mu}^{(1)} P = \begin{pmatrix}0.5&0.5\end{pmatrix}\begin{pmatrix}0.5&0.5\\0.2&0.8\end{pmatrix} = \begin{pmatrix}0.35&0.65\end{pmatrix} ✓.


03 · Stationary Distribution

Definition — Stationary Distribution

A probability row vector π=(π1,,πn)\boldsymbol{\pi} = (\pi_1, \ldots, \pi_n) is a stationary distribution of PP if:

πP=πi=1nπi=1,πi0\boldsymbol{\pi} P = \boldsymbol{\pi} \qquad \sum_{i=1}^{n} \pi_i = 1, \quad \pi_i \geq 0

π\boldsymbol{\pi} — fixed point of PP under left-multiplication. If μ(0)=π\boldsymbol{\mu}^{(0)} = \boldsymbol{\pi}, then μ(t)=π\boldsymbol{\mu}^{(t)} = \boldsymbol{\pi} for all tt.

Equivalently, πT\boldsymbol{\pi}^T is an eigenvector of PTP^T (or PP if PP is symmetric) with eigenvalue λ=1\lambda = 1.

Step-by-step — Finding $\boldsymbol{\pi}$ for $P = \begin{pmatrix}0.5&0.5\\0.2&0.8\end{pmatrix}$
1

Set up πP=π\boldsymbol{\pi} P = \boldsymbol{\pi}: let π=(π1,π2)\boldsymbol{\pi} = (\pi_1, \pi_2).

π1=0.5π1+0.2π2=π1\pi_1' = 0.5\pi_1 + 0.2\pi_2 = \pi_1.

π2=0.5π1+0.8π2=π2\pi_2' = 0.5\pi_1 + 0.8\pi_2 = \pi_2.

Both equations must hold.

2

Solve the first equation: 0.5π1+0.2π2=π10.2π2=0.5π1π2=2.5π10.5\pi_1 + 0.2\pi_2 = \pi_1 \Rightarrow 0.2\pi_2 = 0.5\pi_1 \Rightarrow \pi_2 = 2.5\pi_1.

The 2.52.5 comes from 0.5/0.2=2.50.5/0.2 = 2.5.

3

Normalise: π1+π2=1\pi_1 + \pi_2 = 1. Substitute π2=2.5π1\pi_2 = 2.5\pi_1: π1+2.5π1=3.5π1=1\pi_1 + 2.5\pi_1 = 3.5\pi_1 = 1.

π1=1/3.5=2/70.286\pi_1 = 1/3.5 = 2/7 \approx 0.286. π2=2.5/3.5=5/70.714\pi_2 = 2.5/3.5 = 5/7 \approx 0.714.

4

Verify:

π=(2757)\boldsymbol{\pi} = \begin{pmatrix}\frac{2}{7} & \frac{5}{7}\end{pmatrix}

πP=(27(0.5)+57(0.2)27(0.5)+57(0.8))=(17+1717+47)=(2757)=π\boldsymbol{\pi} P = \begin{pmatrix}\frac{2}{7}(0.5)+\frac{5}{7}(0.2) & \frac{2}{7}(0.5)+\frac{5}{7}(0.8)\end{pmatrix} = \begin{pmatrix}\frac{1}{7}+\frac{1}{7} & \frac{1}{7}+\frac{4}{7}\end{pmatrix} = \begin{pmatrix}\frac{2}{7} & \frac{5}{7}\end{pmatrix} = \boldsymbol{\pi} ✓.

❌ Failure — Confusing Stationary with Initial

For P=(0110)P = \begin{pmatrix}0&1\\1&0\end{pmatrix} (deterministic alternation), π=(0.5,0.5)\boldsymbol{\pi} = (0.5, 0.5) is stationary: πP=(0.5,0.5)\boldsymbol{\pi} P = (0.5, 0.5) ✓.

But starting from μ(0)=(1,0)\boldsymbol{\mu}^{(0)} = (1, 0): μ(1)=(0,1)\boldsymbol{\mu}^{(1)} = (0,1), μ(2)=(1,0)\boldsymbol{\mu}^{(2)} = (1,0) — the chain oscillates, never converging to (0.5,0.5)(0.5, 0.5).

Consequence: πP=π\boldsymbol{\pi} P = \boldsymbol{\pi} is necessary but not sufficient for convergence. A regular chain (some power PkP^k has all positive entries) guarantees μ(t)π\boldsymbol{\mu}^{(t)} \to \boldsymbol{\pi} from any start.


04 · Eigenvector Characterisation and PnP^n

Definition — Stationary Distribution as Eigenvector

πP=π\boldsymbol{\pi} P = \boldsymbol{\pi} is equivalent to:

PTπT=πTP^T \boldsymbol{\pi}^T = \boldsymbol{\pi}^T

πT\boldsymbol{\pi}^T is an eigenvector of PTP^T with eigenvalue 1. Finding π\boldsymbol{\pi} reduces to solving (PTI)πT=0(P^T - I)\boldsymbol{\pi}^T = \mathbf{0} with the normalisation πi=1\sum \pi_i = 1 — a linear algebra problem from Chapters 3 and 6.

Definition — Convergence to Steady State

If PP is regular (PkP^k entrywise positive for some kk), then:

limnPn=1π\lim_{n \to \infty} P^n = \mathbf{1}\,\boldsymbol{\pi}

1\mathbf{1} — column vector of ones. Every row of PnP^n converges to π\boldsymbol{\pi}. The initial state is forgotten in the long run.

✓ Example — Regime-Switching Market Model

A 2-state market: Bull (B) and Bear (b). P=(0.90.10.30.7)P = \begin{pmatrix}0.9&0.1\\0.3&0.7\end{pmatrix}.

π\boldsymbol{\pi}: solve 0.9π1+0.3π2=π10.9\pi_1+0.3\pi_2=\pi_1 and π1+π2=1\pi_1+\pi_2=1. Get π1=0.75\pi_1 = 0.75, π2=0.25\pi_2 = 0.25.

Long-run: 75%75\% of time in Bull, 25%25\% in Bear — regardless of today's regime. Option pricing models (Hamilton regime-switching) use this structure to blend bull and bear volatility parameters.


05 · Absorbing States and Credit Risk

Definition — Absorbing State

State ii is absorbing if pii=1p_{ii} = 1 (equivalently, pij=0p_{ij} = 0 for all jij \neq i). Once entered, the chain never leaves.

For the credit matrix above, Default is absorbing: p33=1p_{33} = 1. The probability of eventual default from state ii is the ii-to-3 entry of the fundamental matrix (IQ)1(I - Q)^{-1} applied to the default column, where QQ is the submatrix of transient states.

✓ Example — Default Probability from AAA

With P=(0.920.070.010.020.900.08001)P = \begin{pmatrix}0.92&0.07&0.01\\0.02&0.90&0.08\\0&0&1\end{pmatrix}, transient states are {\{AAA, BBB}\}, Q=(0.920.070.020.90)Q = \begin{pmatrix}0.92&0.07\\0.02&0.90\end{pmatrix}, default column r=(0.010.08)\mathbf{r} = \begin{pmatrix}0.01\\0.08\end{pmatrix}.

(IQ)=(0.080.070.020.10)(I-Q) = \begin{pmatrix}0.08&-0.07\\-0.02&0.10\end{pmatrix}. (IQ)1r(I-Q)^{-1}\mathbf{r} gives default probabilities from AAA and BBB — standard in credit portfolio risk (CreditMetrics, Basel IRB).


06 · Practice Exercises

EXERCISE 19.1

Check each row sums to 1 and all entries 0\geq 0. If both hold, PP is stochastic.

P=(0.30.70.60.4)P = \begin{pmatrix}0.3&0.7\\0.6&0.4\end{pmatrix}.

Row 1: 0.3+0.7=10.3+0.7=1 ✓. Row 2: 0.6+0.4=10.6+0.4=1 ✓. All entries 0\geq 0 ✓.

PP is stochastic.

Verify that P=(0.30.70.60.4)P = \begin{pmatrix}0.3&0.7\\0.6&0.4\end{pmatrix} is a stochastic matrix. Check both row sums and nonnegativity.

EXERCISE 19.2

Compute P2P^2 by matrix multiplication. Entry (P2)ij(P^2)_{ij} is the two-step transition probability from ii to jj.

P=(0.50.50.20.8)P = \begin{pmatrix}0.5&0.5\\0.2&0.8\end{pmatrix}.

(P2)11=0.5(0.5)+0.5(0.2)=0.35(P^2)_{11} = 0.5(0.5)+0.5(0.2) = 0.35. (P2)12=0.5(0.5)+0.5(0.8)=0.65(P^2)_{12} = 0.5(0.5)+0.5(0.8) = 0.65.

(P2)21=0.2(0.5)+0.8(0.2)=0.26(P^2)_{21} = 0.2(0.5)+0.8(0.2) = 0.26. (P2)22=0.2(0.5)+0.8(0.8)=0.74(P^2)_{22} = 0.2(0.5)+0.8(0.8) = 0.74.

P2=(0.350.650.260.74)P^2 = \begin{pmatrix}0.35&0.65\\0.26&0.74\end{pmatrix}

Starting from state 1: μ(2)=(10)P2=(0.350.65)\boldsymbol{\mu}^{(2)} = \begin{pmatrix}1&0\end{pmatrix}P^2 = \begin{pmatrix}0.35&0.65\end{pmatrix}.

For P=(0.50.50.20.8)P = \begin{pmatrix}0.5&0.5\\0.2&0.8\end{pmatrix}, compute P2P^2 and the state distribution after 2 steps starting from state 1 with certainty.

EXERCISE 19.3

Solve πP=π\boldsymbol{\pi}P=\boldsymbol{\pi} with π1+π2=1\pi_1+\pi_2=1. Use one equation from πP=π\boldsymbol{\pi}P=\boldsymbol{\pi} plus the normalisation.

0.3π1+0.6π2=π10.6π2=0.7π1π2=76π10.3\pi_1+0.6\pi_2=\pi_1 \Rightarrow 0.6\pi_2=0.7\pi_1 \Rightarrow \pi_2=\frac{7}{6}\pi_1.

π1+76π1=1136π1=1π1=613\pi_1+\frac{7}{6}\pi_1=1 \Rightarrow \frac{13}{6}\pi_1=1 \Rightarrow \pi_1=\frac{6}{13}.

π2=713\pi_2=\frac{7}{13}.

π=(6/137/13)\boldsymbol{\pi}=\begin{pmatrix}6/13&7/13\end{pmatrix}. Verify: 0.3613+0.6713=1.8+4.213=6130.3\cdot\frac{6}{13}+0.6\cdot\frac{7}{13}=\frac{1.8+4.2}{13}=\frac{6}{13} ✓.

Find the stationary distribution π\boldsymbol{\pi} for P=(0.30.70.60.4)P = \begin{pmatrix}0.3&0.7\\0.6&0.4\end{pmatrix}. Show the normalisation step and verify πP=π\boldsymbol{\pi}P=\boldsymbol{\pi}.

EXERCISE 19.4

Stationary π\boldsymbol{\pi} satisfies PTπT=πTP^T\boldsymbol{\pi}^T=\boldsymbol{\pi}^T — eigenvalue 1. Solve (PTI)x=0(P^T-I)\mathbf{x}=\mathbf{0} and normalise.

PT=(0.90.30.10.7)P^T = \begin{pmatrix}0.9&0.3\\0.1&0.7\end{pmatrix}. (PTI)=(0.10.30.10.3)(P^T-I) = \begin{pmatrix}-0.1&0.3\\0.1&-0.3\end{pmatrix}.

Row 1: 0.1x1+0.3x2=0x1=3x2-0.1x_1+0.3x_2=0 \Rightarrow x_1=3x_2.

Normalise: 3π2+π2=1π2=0.253\pi_2+\pi_2=1 \Rightarrow \pi_2=0.25, π1=0.75\pi_1=0.75.

π=(0.75,0.25)\boldsymbol{\pi}=(0.75, 0.25). Eigenvalue check: PT(0.750.25)=(0.675+0.0750.075+0.175)=(0.750.25)P^T\begin{pmatrix}0.75\\0.25\end{pmatrix}=\begin{pmatrix}0.675+0.075\\0.075+0.175\end{pmatrix}=\begin{pmatrix}0.75\\0.25\end{pmatrix} ✓.

For P=(0.90.10.30.7)P = \begin{pmatrix}0.9&0.1\\0.3&0.7\end{pmatrix}, find π\boldsymbol{\pi} by solving the eigenvector equation PTπT=πTP^T\boldsymbol{\pi}^T=\boldsymbol{\pi}^T. Interpret π1\pi_1 as the long-run fraction of time in state 1.

EXERCISE 19.5

State 3 is absorbing (p33=1p_{33}=1). No stationary distribution exists over all three states with positive mass on the absorbing state — mass flows into default and stays.

P=(0.920.070.010.020.900.08001)P = \begin{pmatrix}0.92&0.07&0.01\\0.02&0.90&0.08\\0&0&1\end{pmatrix}.

For πP=π\boldsymbol{\pi}P=\boldsymbol{\pi}: π3=π1(0)+π2(0)+π3(1)=π3\pi_3 = \pi_1(0)+\pi_2(0)+\pi_3(1) = \pi_3 — always satisfied.

But π1,π2\pi_1,\pi_2 must also satisfy 0.92π1+0.02π2=π10.92\pi_1+0.02\pi_2=\pi_1 and 0.07π1+0.90π2=π20.07\pi_1+0.90\pi_2=\pi_2.

From first: 0.02π2=0.08π10.02\pi_2=0.08\pi_1, so π2=4π1\pi_2=4\pi_1. Second: 0.07π1+0.90(4π1)=π2=4π10.07\pi_1+0.90(4\pi_1)=\pi_2=4\pi_1 gives 3.67π1=4π13.67\pi_1=4\pi_1 — contradiction unless π1=π2=0\pi_1=\pi_2=0.

The only stationary distribution with support on transient states is π=(0,0,1)\boldsymbol{\pi}=(0,0,1) — all mass in default. The chain eventually absorbs: limnPn\lim_{n\to\infty} P^n has third column (1,1,1)T(1,1,1)^T.

For the 3-state credit matrix P=(0.920.070.010.020.900.08001)P = \begin{pmatrix}0.92&0.07&0.01\\0.02&0.90&0.08\\0&0&1\end{pmatrix}: identify the absorbing state. Explain why no stationary distribution with π1,π2>0\pi_1,\pi_2 > 0 exists, and describe limnPn\lim_{n\to\infty} P^n.

EXERCISE 19.6

One-step default from AAA: p13=0.01p_{13}=0.01. Two-step: sum paths AAA\toj\toDefault for j{1,2,3}j\in\{1,2,3\}. Compare to one-step default from BBB (p23=0.08p_{23}=0.08).

P=(0.920.070.010.020.900.08001)P = \begin{pmatrix}0.92&0.07&0.01\\0.02&0.90&0.08\\0&0&1\end{pmatrix}.

One-step default from AAA: p13=0.01=1%p_{13} = 0.01 = 1\%.

Two-step default from AAA: (P2)13=p11p13+p12p23+p13p33(P^2)_{13} = p_{11}p_{13}+p_{12}p_{23}+p_{13}p_{33}.

=0.92(0.01)+0.07(0.08)+0.01(1)=0.0092+0.0056+0.01=0.0248=2.48%= 0.92(0.01)+0.07(0.08)+0.01(1) = 0.0092+0.0056+0.01 = 0.0248 = 2.48\%.

The 0.00920.0092 is AAA\toAAA\toDefault; 0.00560.0056 is AAA\toBBB\toDefault; 0.010.01 is AAA\toDefault\toDefault.

One-step default from BBB: p23=0.08=8%p_{23} = 0.08 = 8\% — eight times higher than AAA's one-step rate.

BBB is riskier at every horizon in this matrix — consistent with credit rating ordering.

Using P=(0.920.070.010.020.900.08001)P = \begin{pmatrix}0.92&0.07&0.01\\0.02&0.90&0.08\\0&0&1\end{pmatrix}, compute the probability of default within 1 step and within 2 steps starting from AAA. Compare to the one-step default probability from BBB.


07 · Summary

TermDefinition
Stochastic matrixpij0p_{ij} \geq 0; each row sums to 1
Markov propertyP(Xt+1Xt,)=P(Xt+1Xt)P(X_{t+1}\mid X_t,\ldots) = P(X_{t+1}\mid X_t)
nn-step distributionμ(n)=μ(0)Pn\boldsymbol{\mu}^{(n)} = \boldsymbol{\mu}^{(0)} P^n
Stationary π\boldsymbol{\pi}πP=π\boldsymbol{\pi}P=\boldsymbol{\pi}, πi=1\sum\pi_i=1
Eigenvector formPTπT=πTP^T\boldsymbol{\pi}^T = \boldsymbol{\pi}^T — eigenvalue 1
Regular chainPk>0P^k > 0 entrywise; μ(t)π\boldsymbol{\mu}^{(t)} \to \boldsymbol{\pi}
Absorbing statepii=1p_{ii}=1; never left once entered
Credit applicationTransition matrices for rating migration and default

Next: Numerical Stability & Conditioning — why LU, QR, and SVD behave differently in floating-point arithmetic, and how condition numbers quantify sensitivity in portfolio and risk computations.