Square roots for matrices
A symmetric matrix is positive definite when for every ; equivalently, all its eigenvalues are positive. Covariance matrices are always positive semidefinite, because is the variance of a portfolio and variances cannot be negative. They are positive definite, with every portfolio having strictly positive variance, exactly when no asset is redundant.
Every positive definite matrix has a Cholesky factorisation with lower triangular and a positive diagonal: the matrix analogue of a square root. It uses the symmetry, so it costs about , half of LU, and it needs no pivoting. If the algorithm meets a negative number under a square root, the matrix is not positive definite, which makes Cholesky a cheap test of that property.
- Positive definite: for all ; all eigenvalues positive.
- Cholesky: , half the cost of LU, no pivoting, and a cheap positive-definiteness test.
- Correlated draws: turns independent normals into returns with covariance .
If you estimate a covariance matrix from fewer observations than assets, or two assets have identical returns, the sample matrix is only semidefinite and Cholesky stops on a zero or slightly negative pivot. Remedies are more data, dropping duplicates, shrinkage towards a well-behaved target, or adding a small multiple of the identity to the diagonal.
Lab · what's graded
6 tasks · 100 pts- Factor a matrix20 pts
- Factor a correlation matrix20 pts
- A correlated draw15 pts
- Which matrix is positive definite15 pts
- When Cholesky fails10 pts
- Simulating correlated returns20 pts