Quant GT
Browse all lessons
Section 12 · Lesson 12.3

Covariance Matrices

Encoding variance and pairwise relationships in one object.

For a vector of random variables X=(X1,,Xk)X = (X_1, \dots, X_k), the covariance matrix Σ\Sigma is

Σij=Cov(Xi,Xj)\Sigma_{ij} = \mathrm{Cov}(X_i, X_j)

The diagonal holds the variances Var(Xi)\mathrm{Var}(X_i); the off-diagonal entries encode pairwise relationships.

Three properties matter:

Σ\Sigma is symmetric: Σij=Σji\Sigma_{ij} = \Sigma_{ji}.Σ\Sigma is positive semi-definite: aΣa0a^\top \Sigma a \ge 0 for any vector aa. This says portfolio variance can't be negative.For a linear combination Y=aXY = a^\top X, Var(Y)=aΣa\mathrm{Var}(Y) = a^\top \Sigma a.

Portfolio variance is the canonical application: with weights ww and asset returns X(μ,Σ)X \sim (\mu, \Sigma),

Var(wX)=wΣw\mathrm{Var}(w^\top X) = w^\top \Sigma w

Negative off-diagonal entries help — that's diversification. Positive off-diagonals hurt because correlated assets don't cancel each other's swings.