Covariance & Correlation Matrices
The cornerstone of portfolio theory.
Defining Covariance Matrices
Imagine a scatter plot of returns for two stocks. If the cloud of points is tilted upwards, the stocks tend to move together (positive covariance). If it's tilted downwards, they move oppositely (negative covariance). A circular cloud means no relationship (zero covariance).
A covariance matrix, often denoted as , is a square matrix that summarizes this relationship for a set of assets. For two assets, it looks like this:
- The diagonal elements (, ) are the variances of each asset—a measure of their individual risk or volatility.
- The off-diagonal elements (, ) are the covariances between the assets. Since , the matrix is always symmetric.
A positive covariance means the assets tend to move in the same direction. A negative covariance means they move in opposite directions. The covariance matrix doesn't just give us numbers; it geometrically describes the shape and tilt of our data cloud.
Defining Correlation Matrices
Covariance is useful, but its magnitude depends on the volatility of the assets, making it hard to compare. A covariance of 100 might be huge for two low-volatility stocks but tiny for two high-volatility ones. To fix this, we normalize the covariance to get the correlation coefficient, (rho).
The correlation is always between -1 and +1, giving us a standardized measure of the linear relationship. A correlation matrix is simply the covariance matrix where every element has been normalized in this way:
The diagonal is always 1 because an asset is perfectly correlated with itself.
Calculating Portfolio Variance
This is where the covariance matrix becomes the engine of portfolio theory. The variance (risk) of a portfolio is not just the average of the individual asset risks. The interaction between assets—their covariance—is critical. For a portfolio with weights , the portfolio variance is given by matrix multiplication:
This elegant equation shows that by combining assets with low or negative covariance, we can build a portfolio where the total risk is lower than the sum of its parts. This is the mathematical heart of diversification.