PCA, covariance matrices and what an eigenvalue is telling you
LA · Chapter 614 min readAsked at Two Sigma, Citadel, DE Shaw, AQR
After this lesson you should be able to
- Derive PCA as either maximum variance or minimum reconstruction error.
- Say why every covariance matrix is positive semi-definite, and test a proposed correlation matrix.
- Read the principal components of a yield curve.
PCA is the eigendecomposition of a covariance matrix, and almost every question about it is really a question about what eigenvalues and eigenvectors mean. Get that right and the yield-curve interpretation, the risk-model application and the "is this a valid correlation matrix?" question all follow from the same fact.
Derivation 6.1
Why every covariance matrix is positive semi-definite
The one-line argument, and it is the answer to several interview questions at once.
A quadratic form in is the variance of a portfolio.
Variances cannot be negative.
Proposition 6.2
Testing a proposed correlation matrix
The classic question — "can three assets be pairwise correlated at ?" — is a positive semi-definiteness check. Build the matrix, find its eigenvalues, and if any is negative the matrix describes a portfolio with negative variance, which cannot exist.
Holds when
- For the equicorrelation matrix with off-diagonal , the eigenvalues are (once) and (twice).
- So is required, and is exactly the boundary: attainable, but only just.
- In general, assets can be pairwise equicorrelated only down to .
Example 6.3
Can four assets all be pairwise correlated at ?
Show the worked solutionHide the worked solution
Worked solution
- Formula
- Substitute
- Solve
- Answer
Sanity check. The intuition: if every pair pulls against every other, at some point there is nowhere left for them all to go. With four assets the floor is ; with many assets it approaches zero.
| Aspect | Maximum variance | Minimum reconstruction error |
|---|---|---|
| Objective | Maximise subject to | Minimise over rank- |
| Solved by | Lagrange multipliers; the multiplier is the eigenvalue | Eckart–Young: keep the top singular values |
| Answer | The top eigenvector of | The same subspace |
The rest of this lesson is in Premium
You have read the opening. 10 more sections follow, including 2 worked examples and 3 quick checks.
Nothing is charged for 7 days, and you can cancel before then. Or read The law of large numbers and the central limit theorem in full, free.