Return to Home
Quantitative Finance Tutorial

The Geometry of Rates

Mastering Principal Component Analysis (PCA) to decode the complex movements of the Fixed Income yield curve.

PCA Fixed Income Markets Infographic
Click to view full screen

1. The Dimensionality Challenge

Fixed income markets suffer from the "curse of dimensionality." A portfolio manager isn't just exposed to one price, but to a continuous curve of rates spanning from overnight to 30+ years.

The Problem: High Correlation

Modeling risk using every single tenor (2Y, 3Y, 5Y, etc.) leads to unstable models due to Multicollinearity.

Input: 30+ correlated yields
Issue: Corr(2Y, 3Y) ≈ 0.98
⚠ Result: Unstable Betas & Overfitting

The Solution: Factor Reduction

PCA re-maps these correlated rates into orthogonal (independent) factors.

Input: Covariance Matrix
Output: 3 Independent Factors
✓ Result: Clean, Additive Risk Drivers

Litterman and Scheinkman (1991) empirically proved that 98% of yield curve variance can be explained by just three movements. This transforms a chaotic system of 30 variables into a manageable set of 3 "bets."

2. The Mathematical Engine

Decomposing the Covariance Matrix

The input is a matrix X of historical yield changes. PCA relies on the Spectral Theorem to decompose the covariance matrix S. The Eigenvalues (λ) tell us how much "energy" (variance) each factor explains.

// Eigendecomposition
S = V Λ VT
SCovariance Matrix (Risk magnitude)VEigenvectors (The "Shape" of the curve move)ΛEigenvalues (The "Power" of the move)

Variance Explained (The Scree Plot)

90%
PC1: Level
8%
PC2: Slope
2%
PC3: Curvature

Relative magnitude of eigenvalues typically observed in UST markets.

3. The Big Three Factors

Regardless of the market (US, EU, JP), the first three principal components always take these distinct geometric shapes. They correlate strongly with specific macroeconomic drivers.

Level

PC1~90% Var

Parallel Shift

Drivers: Inflation Expectations & Fed Targets

Slope

PC2~8% Var

Steepening / Flattening

Drivers: Business Cycle (Recession = Inverted)

Curvature

PC3~2% Var

Convexity / Butterfly

Drivers: Volatility & Supply/Demand Segmentation

Key Insight: While PC1 is called "Parallel," it isn't perfectly flat. Short rates often move more than long rates (higher volatility), which is why Covariance PCA is preferred over Correlation PCA for hedging—it captures the magnitude of the move, not just the shape.

4. Vector Hedging vs. Duration

Why Duration Fails

Traditional Duration (DV01) assumes parallel shifts. If you are Long 30Y and Short 2Y to be "duration neutral," you are actually massively exposed to Slope Risk.

If the curve steepens, you lose on the Long 30Y (yields up, price down) and lose on the Short 2Y (yields down, price up). A "hedged" book can bleed capital.

The Immunization Equation

[SensH,1 ... ] [w1]    [-SensP,1]
[SensH,2 ... ] [w2] = [-SensP,2]
[SensH,3 ... ] [w3]    [-SensP,3]

Solving this linear system gives the exact weights (w) to neutralize Level, Slope, and Curvature simultaneously.

StrategyHedge InstrumentRisk Exposure
DV01 NeutralAny bond (e.g., 10Y)Slope Risk & Curvature Risk
PCA Level + SlopeTwo bonds (e.g., 2Y and 10Y)Curvature Risk only
Full Vector HedgeThree bonds (e.g., 2Y, 5Y, 30Y)Idiosyncratic Risk only

5. Alpha Strategy: The PCA Butterfly

Trading the Residuals

A "Butterfly" trade involves buying the "Body" (e.g., 5Y) and selling the "Wings" (2Y and 10Y). Using PCA weights ensures the trade is immune to broad market moves (Level) and tilts (Slope), isolating pure Relative Value.

The Algorithm:

  1. Regress bond yield on PC1, PC2, PC3 scores.
  2. Calculate Model Yield: ymodel = β₁P₁ + β₂P₂ + β₃P₃
  3. Compute Residual: ε = ymarket - ymodel
  4. Signal: If ε > 1.75σ, the bond is Cheap. Buy.
Buy (Cheap)Yield too high vs modelSell (Rich)Yield too low vs model

6. Regime Change & Risks

PCA is a statistical description of history, not a physical law. The 2022 Inflation Shock broke many PCA models.

Correlation Break

Historically, Stocks and Bonds were negatively correlated ("Flight to Quality"). In 2022, they fell together due to inflation. Models relying on Bonds to hedge Stocks failed catastrophically.

Slope Inversion

Normally, recessions cause steepening (Fed cuts rates). In 2022, recession fears coincided with Fed hiking, causing deep inversion. The classic "Steepener" bet lost money.

7. Implementation Recipe

Step-by-Step Implementation

1
Data Preparation

Fetch daily yield data (e.g., FRED or Bloomberg) for key tenors: 1Y, 2Y, 3Y, 5Y, 7Y, 10Y, 20Y, 30Y.

2
Differencing

Compute daily changes (absolute or log changes). Yield_Diff = Yield(t) - Yield(t-1). Do NOT run PCA on raw yield levels (they are non-stationary).

3
Covariance Matrix

Calculate the covariance matrix of the differenced data. Use a rolling window (e.g., 1-year lookback) to capture changing regimes.

4
Eigendecomposition

Compute Eigenvectors (Loadings) and Eigenvalues. The first 3 eigenvectors form your factor basis.

Continue Learning