Hundreds of financial series can share a few major sources of variation. Principal component analysis (PCA) finds directions that summarize that variation. In rates, those directions often resemble level, slope, and curvature changes; in equities, they may resemble broad market and regional movements.
The essential distinction is between explaining historical variance, hedging a portfolio, and predicting profitable trades. PCA directly addresses the first. The other two require additional instrument mappings, assumptions, and validation.
Learning goals
- Calculate PCA scores, reconstructions, and explained variance.
- Choose between covariance and correlation PCA without confusing their coordinates.
- Interpret yield-curve factors while allowing their shapes to change.
- Convert factor neutrality into instrument positions using signed sensitivities.
- Distinguish an uncorrelated residual from a mean-reverting trading signal.
- Evaluate rolling PCA and equity hedges without look-ahead bias.
1. PCA is an unsupervised change of coordinates
Let xₜ be an n-dimensional vector of observations at date t. Its entries might be daily yield changes at 2Y, 3Y, 5Y, 7Y, 10Y, and 30Y, or synchronized total returns of equity indices. With mean μ and covariance Σ, write:
Σ=ΓΛΓᵀ, where ΓᵀΓ=I and Λ=diag(λ₁,…,λₙ) with λ₁≥…≥λₙ≥0.
Each column γₖ of Γ is a unit-length principal direction. The score at date t is the projection:
zₖ,ₜ=γₖᵀ(xₜ−μ), or zₜ=Γᵀ(xₜ−μ).
For this covariance model, E[z]=0 and Cov(z)=Λ. The scores are uncorrelated, but generally not independent. The directions are orthogonal vectors; the scores are random variables. These are related but distinct statements.
PCA is unsupervised because it chooses directions from X alone, without optimizing a future-return target. It does not know which variation is an economic signal, noise, a pricing error, or a compensated risk. High variance is not synonymous with useful information.
Why the first component has the most variance
For any unit vector a, the projected variance is Var(aᵀx)=aᵀΣa. Maximizing this quadratic form subject to aᵀa=1 selects the leading eigenvector and gives variance λ₁. The next component maximizes remaining variance subject to orthogonality to the first, and so on.
Keeping K components gives the reconstruction:
x̂ₜ=μ+Γ_Kz_K,ₜ, with residual eₜ=xₜ−x̂ₜ.
This minimizes average squared reconstruction error among K-dimensional orthogonal linear projections under the fitted covariance criterion. The fraction of total variance retained is Σₖ≤Kλₖ/Σⱼλⱼ, provided the denominator is positive. The discarded expected squared Euclidean reconstruction error is Σₖ>Kλₖ.
2. Preprocessing defines what PCA means
Center the data, then choose the right object
Given T observations in rows and n variables in columns, let X be the data matrix. Subtract each column’s training-sample mean to form Z. Sample covariance is Σ̂=ZᵀZ/(T−1). If Z=UDVᵀ is an SVD, V contains principal directions, the scores are ZV=UD, and eigenvalues are dₖ²/(T−1).
Without centering, XᵀX measures second moments around the origin, so the mean vector can dominate the first direction. Uncentered decomposition can be intentional for another objective, but it is not the usual covariance PCA.
Centering raw stock prices does not automatically make them a sound return-risk input. Price levels depend on share units and splits and are often nonstationary. Equity risk PCA usually uses appropriately adjusted returns. Yield-level PCA studies curve levels; yield-change PCA studies movements and can produce different factors. State the choice before interpreting the components.
Covariance versus correlation PCA
| Choice | Coordinates | Interpretation |
|---|---|---|
| Covariance PCA | Centered original variables | Preserves observed relative volatilities in those units |
| Correlation PCA | Each centered variable divided by its standard deviation | Gives each variable unit variance before finding directions |
Yield changes measured in basis points across tenors have comparable units, making covariance PCA a useful starting point for rate-movement risk. It still gives more influence to high-volatility maturities. Correlation PCA asks a different question by equalizing those variances; neither choice is universally correct.
Let S=diag(s₁,…,sₙ) contain positive training standard deviations. Correlation PCA works on u=S⁻¹(x−μ). A direction v in standardized space corresponds to score vᵀS⁻¹(x−μ) in original coordinates, not vᵀ(x−μ). Reconstructions map back as x̂=μ+SV_Kz_K. A standardization step must be carried through to risk and portfolio mappings.
Fit means, scales, missing-value rules, and components on the training window only. Pairwise covariance calculations with different observation sets can even produce a matrix that is not positive semidefinite; use a consistent estimation procedure. Penn State’s PCA lesson explains the covariance–correlation distinction.
3. Yield-curve PCA: level, slope, and curvature
For a curve-movement model, use xₜ=[Δy₂Y,ₜ,…,Δy₃₀Y,ₜ]ᵀ in basis points. Keep the yield definition consistent: par yields, zero rates, and forwards are not interchangeable coordinates. The selected maturities, sampling frequency, history, and weighting all affect Σ̂.
| Common interpretation | Typical direction shape | Economic reading |
|---|---|---|
| PC1: level | Broadly same-sign coefficients | Most yields move in the same direction |
| PC2: slope | Opposite signs at short and long ends | Steepening or flattening |
| PC3: curvature | Belly contrasted with both wings | Butterfly-type movement |
These are empirical patterns, not defining constraints of PCA. PC1 need not be perfectly parallel, and PC3 need not be a literal parabola. Multiplying any eigenvector and its scores by −1 leaves the model unchanged, so “positive slope factor” needs an explicit sign convention. The Federal Reserve’s discussion of sovereign-market factors describes the level and slope interpretations; their exact estimated shapes remain sample-dependent.
How to read the lecture’s percentages
The supplied notes describe approximately 85–90% for level, 5–8% for slope, 1–2% for curvature, and about 99% for the first three together. These are approximate, sample-specific descriptions, not universal constants; endpoints from separate ranges need not sum to the stated combined figure.
A self-consistent illustrative six-tenor spectrum is [88,8,3,0.5,0.3,0.2] in squared-basis-point units. Total variance is 100, so the first three retain 99%. Their score standard deviations are √88, √8, and √3 basis points. These values are a teaching construction, not a Treasury estimate.
Explaining 99% of data variance does not mean explaining 99% of every portfolio’s PnL variance. A portfolio can concentrate its exposure in the discarded 1%.
4. A transparent three-tenor worked example
For the three coordinates [2Y,10Y,30Y], choose the orthonormal directions:
Level: γ₁ = [ 1, 1, 1]ᵀ / √3
Slope: γ₂ = [−1, 0, 1]ᵀ / √2
Curvature: γ₃ = [ 1, −2, 1]ᵀ / √6
Each vector has length one; every pair has zero dot product. A covariance matrix constructed as Σ=Γ diag(90,8,2) Γᵀ has these exact PCs, with 90%, 8%, and 2% of variance. This separate toy model has only three dimensions, so retaining all three explains 100%.
Suppose a centered daily curve move is x−μ=[3,−1,2]ᵀ bp. Its scores are:
- Level: z₁=4/√3≈2.3094 bp.
- Slope: z₂=−1/√2≈−0.7071 bp.
- Curvature: z₃=7/√6≈2.8577 bp.
The level reconstruction is [4/3,4/3,4/3]ᵀ bp. The slope reconstruction is [0.5,0,−0.5]ᵀ bp. Adding them gives [11/6,4/3,5/6]ᵀ bp. The remaining curvature residual is [7/6,−7/3,7/6]ᵀ bp. All three together recover the observation exactly.
The largest-variance factor need not dominate every realized day. This particular move has a large curvature score even though curvature has the smallest variance in the toy covariance model.
5. From principal directions to tradable rates positions
Eigenvector coefficients are weights on the modeled variables. A yield tenor is not itself a security. To trade a yield-change factor, map the direction into bonds, swaps, or futures through their sensitivities, financing terms, and trading constraints.
Let b be the portfolio’s signed value sensitivity to a +1 bp move in each yield coordinate, measured in currency per bp. First-order PnL is:
ΔV≈bᵀΔy.
For centered curve shocks Δy−μ=Γz, random PnL is bᵀΓz. The exposure to PC k is aₖ=bᵀγₖ, and modeled variance is:
Var(ΔV)≈bᵀΣb=Σₖλₖ(bᵀγₖ)².
This is first-order risk. Carry, roll-down, convexity, basis, credit, and execution effects need additional treatment. The mean curve move bᵀμ also remains separate from the centered shock.
Two-tenor level-neutral curve trade
For two chosen tenors with nonzero level coefficients γ₁,a and γ₁,b, PC1 neutrality requires b_aγ₁,a+b_bγ₁,b=0. Set:
b_b=−b_aγ₁,a/γ₁,b.
If both level coefficients are equal, equal-and-opposite signed sensitivities are level-neutral. Equal-and-opposite bond notionals generally are not, because the instruments can have different durations. If PC1 is not exactly parallel, parallel-DV01 neutrality and PC1 neutrality are different constraints.
This hedge removes exposure to one estimated direction; it does not isolate only slope when the full model contains curvature and higher factors. Neutrality is relative to the estimated window and the selected yield coordinates.
Three-tenor level-and-slope-neutral butterfly
In the toy example, choose b=[1,000,−2,000,1,000]ᵀ currency/bp. Then:
bᵀγ₁=0; bᵀγ₂=0; bᵀγ₃=1,000√6≈2,449.49 currency/bp.
It is pure curvature exposure within this three-dimensional linear model. With a real six-tenor covariance matrix, three instruments used to neutralize PC1 and PC2 can still carry PC3, PC4, PC5, and PC6 exposures, as well as non-yield risks. “Neutral to the first two” is not synonymous with “pure PC3.”
For an illustrative mapping, suppose three instruments each affect only its matching tenor, with sensitivities per 1,000,000 notional of [−40,−80,−160] currency/bp. The desired b corresponds to notionals [−25,+25,−6.25] million. Short wings and a long belly produce those signed sensitivities under this convention. Actual instrument sensitivities are usually spread across curve buckets rather than perfectly diagonal.
General hedge system
Let K be the n×m matrix whose columns are each hedge instrument’s bucket sensitivities per unit position, and h its m-vector of positions. The combined exposure is b+Kh. Neutralizing the first r components requires:
Γ_rᵀKh=−Γ_rᵀb.
Rank determines feasibility and uniqueness. An underdetermined system can incorporate cost or notional constraints; an inconsistent system may need an approximate hedge. Near-singular solutions can demand large offsetting positions and become unstable after small changes in estimated loadings.
6. A low-variance residual can still be the entire portfolio risk
In the three-factor toy model, λ₃=2 and the butterfly has a₃=1,000√6. Therefore its variance is 2×6,000,000=12,000,000 currency², with standard deviation approximately 3,464.10 currency units for the covariance model’s sampling horizon.
A risk model retaining only the first two PCs would assign this butterfly zero modeled variance because both retained exposures are zero. It would omit all the butterfly’s actual variance in this toy setup, even though those two factors explain 98% of the underlying curve data’s variance.
For a held-out covariance Σ_test, evaluate the actual hedge with (b+Kh)ᵀΣ_test(b+Kh) or realized PnL, rather than judging it only by training explained variance. A small data reconstruction error is not a universal risk guarantee.
7. Rolling PCA and model stability
A two-year lookback is a possible hyperparameter, not an intrinsically correct calibration window. A long window can smooth estimation noise while mixing regimes; a short window adapts faster but estimates directions less precisely. Equal versus exponential weights and the observation frequency change the effective information available.
At each decision date, fit only earlier observations and apply the frozen transform to later data. Center new observations using the training mean, not a future full-sample mean. Standardized PCA also needs the training scales. Refitting after every observation without separating estimation and evaluation obscures whether the previous hedge worked.
What can rotate, and what cannot be identified uniquely?
Out-of-sample scores need not remain uncorrelated because the new covariance need not be diagonal in the old basis. Policy changes and liquidity stress can alter the covariance, but estimation noise also changes loadings. The lecture cites 2008, the 2013 Taper Tantrum, and 2020 as regime examples; measuring their effects on a particular PCA requires the actual data and specification.
Eigenvector signs are arbitrary. Align signs before comparing windows, for example by making each direction’s dot product with its previous estimate positive. If eigenvalues are close, individual components can exchange order or rotate substantially while their joint subspace remains similar. Repeated eigenvalues make the individual directions within that eigenspace nonunique.
Compare both loadings and subspaces. Principal angles or distances between projection matrices P_K=Γ_KΓ_Kᵀ can reveal whether the retained span actually changed, rather than reacting to a harmless sign reversal. New York Fed research on yield-curve factor estimation explicitly examines uncertainty about factor structure.
8. Relative value: PCA does not prove mean reversion
PCA orders contemporaneous variance, not predictability or speed of reversion. A low-variance component can trend, jump, change mean, or represent measurement noise. Uncorrelated scores are not automatically independent, stationary, or profitable trading signals.
In particular, a residual from PCA on daily yield changes is a change series. Its cumulative level is not guaranteed to revert. A mean-reversion strategy usually needs a defined spread level, an economic or statistical equilibrium argument, and evidence about time dynamics. PCA on yield levels addresses a different covariance problem and does not bypass unit-root or regime concerns.
One possible additional model for a spread sₜ is sₜ−c=φ(sₜ₋₁−c)+ηₜ. If 0<φ<1 in a suitable stationary AR(1) model, its shock half-life is log(0.5)/log(φ) periods. With φ=0.9, this is approximately 6.58 periods. Neither φ nor stationarity is supplied by PCA; both require estimation and validation. A fitted half-life can become meaningless after a structural break.
Leverage and frictions
Low estimated volatility can encourage large positions for a target risk budget. That amplifies estimation error, financing costs, bid–ask spreads, margin demands, and losses from a factor rotation. Repo availability, futures basis, delivery options, borrow costs, and collateral can differ across hedge legs.
Evaluate carry, roll-down, turnover, slippage, and stress scenarios alongside residual statistics. Model-implied neutrality does not remove cash-flow needs during a drawdown, and a high historical win rate does not bound the loss on rare paths.
9. Equity PCA and market-factor hedging
Equity index returns often share broad market movements. Other components can separate sectors, countries, or currencies, but assigning an economic label requires inspecting loadings and data definitions. PCA cannot establish a North–South geographic interpretation by itself.
The supplied outline reports an approximately 89% first-component share for a European-index dataset and regional clustering in PC2. Without its sample, currencies, index universe, and preprocessing, this is a lecture-specific reported result rather than a current European-market constant.
Align trading times and currencies before estimating the covariance. Common currency exposure can appear as a factor; nonsynchronous closing times can distort same-day correlations. Using price indices instead of total-return indices also changes the observed returns.
When the projection hedge formula is valid
For an equity value-weight vector w, return vector r, and a unit covariance-PCA direction γ₁ in those same coordinates, the mathematical projection:
w′=w−(wᵀγ₁)γ₁
gives w′ᵀγ₁=0. This removes the estimated first-PC exposure if the entire adjustment basket is tradable without constraints. It generally changes the sum of risky-asset weights; restoring a fully funded portfolio may require a cash position. It is not a direct formula for share quantities, and it should not be applied to a vector of portfolio market values without specifying units and normalization.
For example, γ₁=[1,1]ᵀ/√2 and w=[0.8,0.2]ᵀ give w′=[0.3,−0.3]ᵀ. The risky weights sum to zero. Starting with one unit of wealth, retaining one unit in cash completes this self-financed adjustment in an idealized frictionless setup; financing and shorting costs still matter in practice.
If the actual hedge is a market ETF with exposure vector h, choose a hedge amount a=(wᵀγ₁)/(hᵀγ₁) when the denominator is nonzero. Then (w−ah)ᵀγ₁=0, but exposures to other PCs generally change too. A futures hedge also requires its contract multiplier and financing treatment.
For correlation PCA with standard-deviation matrix S, the equity portfolio’s score exposure is wᵀSv₁, not wᵀv₁. Neutrality and projection must use that mapped direction. Finally, a PC1-neutral portfolio is not necessarily CAPM-beta-neutral, and broad equity risk is not inherently uncompensated. Removing it can remove an expected risk premium; any remaining stock-selection alpha must be demonstrated separately.
10. A practical evaluation workflow
- Define the variables, units, horizon, currency, calendars, and whether the inputs are levels or changes.
- Select a training window and preprocessing method; estimate covariance or correlation using past data only.
- Inspect eigenvalues and loadings, including sampling uncertainty and stability across plausible windows.
- Map factor exposures into instrument sensitivities and solve a feasible hedge with financing and position constraints.
- Freeze the estimated model for a genuine held-out interval. Measure residual covariance, hedge PnL, turnover, and costs.
- Stress loading rotations, omitted PCs, liquidity, and convexity. Compare with simpler duration, curve, or market hedges.
- If trading mean reversion, validate the separate spread-dynamics model and avoid choosing every threshold on the final test period.
11. Practice questions
- Why are orthogonal principal directions and uncorrelated component scores different statements?
- A six-variable covariance has eigenvalues [88,8,3,0.5,0.3,0.2]. What variance fraction do the first three retain?
- Does explaining 99% of yield-change variance establish 99% risk coverage for every portfolio?
- In the three-tenor toy model, is [1,−2,1]ᵀ neutral to level and slope?
- Do equal-and-opposite two-bond notionals guarantee PC1 neutrality?
- Why might two windows show apparently different eigenvectors even when the retained subspace is stable?
- Does low variance of a PCA residual establish mean reversion? What is the AR(1) half-life if φ=0.9 under the stated stationary model?
- With w=[0.7,0.3]ᵀ and γ₁=[1,1]ᵀ/√2, find the projected PC1-neutral risky weights. Do they sum to one?
Answers
- Orthogonality is a dot-product relation between coordinate directions; uncorrelatedness is a covariance relation between random scores. The covariance eigendecomposition connects them for the fitted model.
- 99%, from (88+8+3)/100.
- No. Portfolio exposures can concentrate in omitted directions.
- Yes: its dot products with [1,1,1]ᵀ and [−1,0,1]ᵀ are both zero.
- No. Instrument sensitivities and the PC1 shape determine the hedge, not notional equality alone.
- Signs are arbitrary, and close or repeated eigenvalues allow rotations or reordered directions. Compare the span as well as individual vectors.
- No. Approximately 6.58 periods, from log(0.5)/log(0.9); this dynamic assumption is separate from PCA.
- [0.2,−0.2]ᵀ. They sum to zero; funding the total portfolio requires explicit cash or financing treatment.
Further reading
- Penn State: Principal Components Analysis for covariance, correlation, and component interpretation.
- Federal Reserve: Sovereign markets and global factors for the level and slope interpretation of yield-curve factors.
- New York Fed: Deconstructing the Yield Curve for uncertainty in estimating yield-curve factor structure.
PCA provides a disciplined coordinate system for risk. A trading application additionally needs sound instrument mappings, honest out-of-sample evaluation, and evidence for its expected returns.