Covariance matrix is a convenient structure for storing variance and covariance figures for securities and factors. Covariance represents the co-movements between securities and can be generated using a single-variable linear regression. Alternatively, in a multi-variable regression it is common to use factors to measure co-movements. The matrix is used for the evaluation and analysis of risk and for portfolio construction.
Synonym: variance-covariance matrix
Doc: Because variance-covariance is redundant
covariance matrix here.
Tom: So it's like calling it tuna instead of ahi tuna?
This video can be accessed in a new window or App , at the YouTube Channel or from below.
Covariance matrix definition for investment modeling (4:29)
The script includes two sections where we visualize and demonstrate the calculation of the covariance matrix.
We're sitting here in Excel, and this is a snippet from our boot camp course.
This is one depiction of the covariance matrix, generated using the monthly returns for four stocks located on the Returns tab.
In this state, the covariance matrix isn't very interpretable to the naked eye, and useful for analysis, but that's not what it is for. It sits behind software for portfolio analysis and optimization.
If you'd like to brush up on the calculation of covariance, there will be a link to the video at the end.
A correlation matrix, like this, is interpretable because the scale of correlation ranges from -1 to +1. It is created from the covariance matrix. The creation of the covariance matrix helps, so let's head there now.
We will create a covariance matrix for four stocks.
So third-party risk model providers use linear algebra in statistical programming languages to generate the covariance matrix at scale for thousands of securities, but here we'll calculate one manually in Excel.
There are three types of covariance matrices: historical, single-index and multi-factor. We are using the easiest one here called historical.
The matrix structure is actually borrowed form linear algebra and is used for matrix multiplication, which we cover in the boot camp.
Set up a table like this with matching rows and column labels for holding the co-movements between each stock. And if you notice, down the diagonal in blue, is the calculation for covariance of a stock versus itself, which mathematically is variance, and that's where the name name variance-covariance matrix comes from, but it is more clear to call it a covariance matrix.
In the first cell, use the sample covariance using the
=COVARIANCE.S function, then open
parenthesis, select the first array, comma, second array, closed
parenthesis and Enter. That's the variance of Microsoft.
Next, in the next row, we do the same thing but use the returns on Microsoft, then eBay and come up with a covariance of 0.0016 for the pair of stocks. See how it matches with this cell, logically.
Click box for answer.
False, 6 unique cells total, 3 variances and 3 covariance pairs
Our trained humans found other terms in the category risk forecasting you may find helpful.
Click Subscribe if you'd like to learn more.