Small Group Tutorials

Here to help students catch up, keep up, and move ahead. Book a consultation here.

How Yield-Curve PCA Algorithms Extract Level, Slope and Curvature: Covariance Matrices, Eigenvectors, Factor Shocks, Hedging and Regime Failure

Reader question: A yield curve can contain dozens of maturities. If every point can move differently, how can a risk system reduce all those rate changes to a few understandable mathematical factors without pretending the curve only moves in parallel?

Principal-component analysis, or PCA, answers that question by examining the historical covariance of yield changes across maturities. It rotates the original tenor axes into new orthogonal directions ordered by how much historical variance they explain.

In many government-bond datasets, the leading empirical shapes are often interpreted as level, slope and curvature. But those labels are interpretations of data-driven eigenvectors, not hard-coded truths. The factors can change when the sample window, market regime, tenor grid, curve type or scaling method changes.

What this page owns — and what it does not

This page owns the statistical transformation:

historical yield-curve changes → covariance matrix → eigenvectors/eigenvalues → principal-component factors → factor exposures and shocks.

It does not replace Nelson–Siegel–Svensson curve fitting, which fits a smooth cross-sectional curve at one point in time; duration, convexity and scenario-shock analytics, which measure portfolio sensitivity; or bond-portfolio immunisation, which chooses assets to offset liability rate risk.

This article is linear-algebra and risk-model education. It does not forecast interest rates or recommend any bond position.

Step 1: choose the curve representation

Suppose each daily yield curve is sampled at:

1Y, 2Y, 5Y, 10Y, 20Y, 30Y.

Let the yield vector on day t be:

yt = [y1Y,t, …, y30Y,t]ᵀ.

PCA can be applied to yield levels, but fixed-income risk work commonly focuses on changes:

Δyt = yt − yt−1.

Using changes helps focus the model on rate movements rather than on the long-run nonstationary level of yields.

Why the exact curve type matters

PCA on par yields, zero-coupon yields, OIS rates or forward rates does not necessarily produce identical factors.

The input representation determines the covariance structure. A risk system should therefore state whether it used:

  • observed bond yields;
  • bootstrapped spot/zero rates;
  • par swap rates;
  • OIS rates;
  • forward rates.

Mixing curve types across history creates statistical factors with no coherent economic meaning.

Step 2: centre the observations

Let there be T historical observations of m maturities. Compute the sample mean change:

μ = (1/T)Σ Δyt.

Then centre each observation:

xt = Δyt − μ.

Stack the centred rows into a data matrix X.

Daily rate changes often have a mean close to zero over long samples, but explicit centring is still part of the PCA definition.

Step 3: build the covariance matrix

The sample covariance matrix is:

Σ = XᵀX/(T−1).

Each diagonal term is the variance of one tenor. Each off-diagonal term measures how two maturities move together.

If all maturities often rise and fall together, the covariance matrix contains a strong common direction. PCA extracts that direction mathematically.

Step 4: solve the eigenvalue problem

PCA solves:

Σvk = λkvk.

The eigenvectors vk are orthogonal directions in maturity space. The eigenvalues λk measure the variance explained along those directions.

Order them:

λ₁ ≥ λ₂ ≥ … ≥ λₘ ≥ 0.

The proportion of total variance explained by factor k is:

EVRk = λk / Σλj.

Why covariance must be positive semidefinite

A proper covariance matrix satisfies:

zᵀΣz ≥ 0

for every vector z. Therefore its eigenvalues should not be materially negative.

Tiny negative eigenvalues can arise from floating-point noise. Large negative eigenvalues indicate that the object being diagonalised is not a valid covariance matrix, perhaps because pairwise estimates were assembled inconsistently or data preprocessing failed.

Step 5: compute factor scores

For a centred yield change xt, the score on component k is:

fk,t = vkᵀxt.

The yield move can be reconstructed from all components:

xt = Σ fk,tvk.

If only the first K components are retained:

t = Σk=1..K fk,tvk.

The residual:

et = xt − x̂t

measures the curve move not captured by the retained factors.

Level: the first common shape

In many sovereign-yield datasets, the first eigenvector has similar signs across maturities. A positive factor shock moves much of the curve in the same direction.

This is interpreted as level or a near-parallel shift.

The classic Litterman–Scheinkman work showed that a small number of common factors explain a large portion of U.S. bond-return variation. Later yield-curve PCA work often gives the first component the level interpretation.

Slope: a twist rather than a shift

The second component often gives short maturities one sign and longer maturities the opposite sign.

A shock therefore twists the curve: one end rises relative to the other.

This is interpreted as slope.

The Bank of England has used principal components to decompose the UK yield curve into level, slope and higher-order effects, illustrating the long-standing public-policy use of this statistical decomposition.

Curvature: the belly versus the wings

The third component often makes intermediate maturities move differently from short and long maturities.

This produces a bowed or humped change and is commonly interpreted as curvature.

The economic names are useful, but the model should store the actual eigenvector. “Curvature” is not a universal formula; it is a shape learned from the chosen historical covariance matrix.

Eigenvector signs are arbitrary

If v is an eigenvector, then −v is also an eigenvector for the same eigenvalue.

Therefore a PCA implementation can flip the sign of a component between software packages or recalibrations without changing the statistical model.

To make factors comparable over time, systems often apply a sign convention, for example requiring the average loading of the level factor to be positive.

A sign flip is not economic regime change. It can be pure linear-algebra convention.

Why scaling matters

PCA can be performed on the covariance matrix or on standardized variables equivalent to using a correlation matrix.

For yield-curve risk, maturities are already measured in the same units, typically basis points. Using covariance preserves the fact that some tenors are historically more volatile than others.

Standardizing every tenor to unit variance changes the question: it gives a low-volatility tenor the same statistical scale as a high-volatility tenor.

Neither is universally wrong, but the choice must match the use case.

How many components should be retained?

Common diagnostics include:

  • cumulative variance explained;
  • scree plot of eigenvalues;
  • out-of-sample reconstruction error;
  • stability of factor shapes;
  • portfolio P&L explained by retained components.

Keeping three factors because textbooks say “level, slope, curvature” is not enough. A market segment with unusual dynamics may need more. A very smooth dataset may need fewer.

Explained variance is not the same as risk relevance

A factor explaining only a small share of total yield variance can still matter greatly for a portfolio concentrated at maturities where that factor loads strongly.

Conversely, a dominant level factor may have little net P&L effect on a portfolio whose long and short exposures offset that direction.

Variance explained belongs to the curve dataset; portfolio loss depends on portfolio exposure to each factor.

Map a portfolio into PCA factor exposure

Suppose the portfolio has a vector of first-order yield sensitivities d across the same maturity grid. A small yield shock produces approximate P&L:

ΔV ≈ dᵀΔy.

If:

Δy ≈ Vf

where columns of V are retained eigenvectors and f is the factor-shock vector, then:

ΔV ≈ dᵀVf.

The row vector:

dᵀV

contains the portfolio’s linear exposure to the retained PCA factors.

PCA hedging

If several liquid hedging instruments have known factor exposures, a hedge can solve linear equations or an optimisation problem to reduce:

  • level exposure;
  • slope exposure;
  • curvature exposure.

This can be more compact than neutralising dozens of individual maturity buckets.

But a three-factor hedge only protects the portion of curve risk represented by those factors and by the first-order sensitivity approximation.

PCA versus key-rate duration

Key-rate duration shocks selected maturity points with prespecified local curve moves.

PCA learns orthogonal shock shapes from historical covariance.

Key-rate duration is structurally interpretable and does not require a historical sample. PCA is statistically efficient when a few common modes dominate but can change across regimes.

They are complementary views, not substitutes that must agree exactly.

PCA versus Nelson–Siegel–Svensson

The Nelson–Siegel–Svensson model is a parametric curve-fitting algorithm. It uses a small set of parameters to describe the shape of a yield curve at a given date.

PCA is a statistical time-series decomposition of how observed curve points have moved through history.

Both can produce concepts called level, slope and curvature, but their mathematics and ownership are different.

Generating historical PCA scenarios

A simple scenario engine can:

  1. estimate eigenvectors from a training window;
  2. compute historical factor scores;
  3. sample or shock factor scores;
  4. reconstruct yield changes using retained eigenvectors;
  5. revalue the portfolio.

This gives scenarios concentrated in historically important curve-movement directions.

Stress shocks should not be limited to historical standard deviations

If a level factor historically has standard deviation 6 basis points per day, a stress system can apply ±3σ or larger shocks. But “3σ” is not automatically severe in a crisis, because yield changes are not perfectly Gaussian and volatility regimes change.

PCA identifies directions. Stress severity remains a separate modelling choice.

Why large shocks need nonlinearity

The factor-exposure formula:

ΔV ≈ dᵀVf

is first-order.

For large rate shocks, bond convexity, optionality and changing cash flows matter. An MBS, callable bond or option book can change duration as rates move.

A serious stress engine therefore reconstructs the shocked curve and fully reprices nonlinear instruments rather than multiplying a large factor shock by one frozen delta vector.

Rolling-window instability

PCA assumes the historical covariance matrix is informative about the future. But rate regimes change.

A rolling calibration can reveal whether:

  • explained-variance shares are shifting;
  • factor shapes are rotating;
  • a new fourth factor is becoming important;
  • short-end volatility is dominating after policy changes.

Large structural changes are evidence that one fixed historical PCA is stale.

Regime dependence

Periods of near-zero policy rates, rapid tightening, quantitative easing or unusual long-end supply can alter which maturities co-move.

The ECB’s 2026 analysis of yield-curve slopes explicitly used principal-component methods to measure common variation across major advanced-economy curves, illustrating how PCA output depends on the period and variables chosen.

A PCA factor is therefore an empirical summary of a dataset, not a law of interest rates.

Missing tenors and interpolation risk

Historical curves often lack exactly the same maturity points every day. A preprocessing engine may interpolate to a fixed tenor grid.

If interpolation changes, the covariance matrix changes. A spline artefact can even create an artificial smooth factor that PCA interprets as real market structure.

The curve-construction method must therefore be versioned with the PCA model.

Input alignment

Every row of X should describe the same set of tenors at the same observation time under the same day convention.

Mixing a 4pm 10-year yield with a noon 2-year yield can create false cross-maturity covariance.

This is a data-engine problem masquerading as a statistical result.

Evidence polarity: what supports confidence?

Evidence for a PCA model includes high but not blindly assumed variance capture, stable factor shapes across neighbouring calibration windows, low out-of-sample reconstruction error, portfolio P&L largely explained by retained factors, clean and synchronized tenor data, and sensible agreement with known level/slope/curvature episodes.

Evidence against confidence includes sharp factor rotation when one date enters the sample, unexplained negative covariance eigenvalues, large residual P&L concentrated in omitted components, unstable signs without normalization, factor shapes dominated by interpolation artefacts, or materially different results from small harmless changes to the tenor grid.

Counterexample: the first component is not guaranteed to be “level”

If the dataset focuses only on short maturities during a policy-transition period, the largest covariance direction may look more like a slope or front-end kink.

The algorithm orders factors by variance explained, not by economic labels.

The model should inspect loadings before naming components.

Counterexample: 99% variance explained does not mean 99% of portfolio risk is captured

A portfolio may be concentrated in an instrument sensitive to a small residual curve mode, such as a butterfly around particular maturities.

A factor explaining only 1% of total curve variance can dominate that portfolio’s risk.

Counterexample: orthogonal factors are not economically independent

PCA scores are uncorrelated in the sample by construction.

Uncorrelated does not mean causally independent. A central-bank event can simultaneously generate movements that project onto several orthogonal factors.

The mathematical rotation removes covariance, not economic causation.

Counterexample: a stable in-sample factor can fail after a regime break

A PCA estimated during a decade of low inflation and stable policy can be a poor description of a sudden tightening regime.

The model can remain perfectly reproducible while becoming economically stale.

Inputs and outputs

A robust yield-curve PCA engine can require:

  • curve type and source;
  • fixed maturity grid;
  • observation timestamps;
  • yield levels and chosen change horizon;
  • missing-data/interpolation policy;
  • calibration window;
  • covariance versus standardized scaling choice;
  • number of components retained;
  • sign-normalization rule;
  • portfolio tenor sensitivities if risk mapping is required.

Outputs can include eigenvalues, eigenvectors/loadings, explained-variance ratios, factor scores, reconstructed curve changes, residuals, portfolio factor exposures, stress curves and stability statistics.

Weak links in implementation

Using yield levels instead of changes unintentionally. The first factor can mostly capture long-run drift.

Tenor mismatch. Columns change meaning over time.

Stale interpolation. Missing tenors create artificial covariance.

Sign instability. Reports mistake arbitrary eigenvector flips for changing risk.

Scaling drift. One recalibration uses covariance and another correlation.

Look-ahead bias. Future curve observations enter the factor calibration used for past risk estimates.

Too few factors. Residual curve risk is dismissed because total variance explained looks high.

Too many factors. Noise eigenvectors are treated as stable hedge targets.

Linear P&L overreach. Large PCA shocks are applied to nonlinear books without repricing.

Diagnostics: how to test the engine

  • covariance PSD test: eigenvalues should be nonnegative within numerical tolerance.
  • orthogonality test: VᵀV = I within tolerance.
  • reconstruction test: all components should reproduce centred observations to numerical precision.
  • variance-recovery test: sum of eigenvalues should equal covariance trace.
  • rolling-window test: track factor-shape and explained-variance stability.
  • sign-normalization test: factor labels remain consistent after recalibration.
  • out-of-sample reconstruction test: measure residual errors on later curves.
  • tenor-grid test: perturb interpolation/grid choices and inspect factor robustness.
  • portfolio-P&L test: compare factor-explained P&L with full historical repricing.
  • large-shock test: compare linear factor approximation with full nonlinear repricing.
  • regime-split test: estimate PCA separately across calm, tightening and stress periods.

What would falsify confidence?

Confidence should be withdrawn if the covariance matrix is invalid; factor shapes are unstable across tiny sample changes; retained components fail to explain the portfolio’s actual historical P&L; residual curve movements become large in a new regime; the model cannot reproduce its eigenvectors from a frozen dataset; or the economic labels level/slope/curvature are applied to loading shapes that no longer support those interpretations.

Alternatives

Key-rate duration uses predefined maturity shocks rather than learned factors. Nelson–Siegel and dynamic Nelson–Siegel use parametric shape factors. Affine term-structure models impose no-arbitrage dynamics. Historical scenario sets avoid linear factor compression. Machine-learning latent-factor models can capture nonlinear structure but are harder to interpret and govern.

PCA remains powerful because it exposes the linear algebra of yield-curve co-movement with minimal modelling assumptions. Its limit is that it describes historical covariance, not the economic mechanism generating rates.

How this connects to the surrounding knowledge estate

The input curve can be produced by yield-curve bootstrapping. The Nelson–Siegel–Svensson article owns parametric cross-sectional fitting rather than historical covariance decomposition. PCA factor exposures can complement duration, convexity and scenario shocks and can become constraints inside bond immunisation. If factor behaviour changes materially, that becomes evidence for model drift.

Verification and update triggers

Preserve the curve source, tenor grid, interpolation method, observation timestamp, return/change horizon, calibration window, scaling convention, retained-factor count and sign-normalization rule. Revalidate after major monetary-policy regime shifts, curve-construction changes, new tenors, data-vendor migrations, sustained residual-risk increases, factor-shape rotation or repeated failure of PCA scenarios to explain realised portfolio P&L.

Primary and high-quality references

Educational boundary: This article explains statistical interest-rate factor extraction. It does not forecast rates or recommend any fixed-income position and is not personalized financial advice.

Discover more from Bukit Timah Tutor

Subscribe now to keep reading and get access to the full archive.

Continue reading