FactorPad
Build a Better Process

Covariance Definition and Tutorial

This underappreciated statistical measure sits inside risk models and helps institutional portfolio managers allocate to risky assets for clients around the world.
  1. Define - Define Covariance for Investment Modeling.
  2. Context - Use Covariance in a sentence.
  3. Video - Watch the video for context.
  4. Script - Follow along with the transcript below.
  5. Quiz - Test yourself.
face pic by Paul Alan Davis, CFA
Updated: February 17, 2021
It's easy to go from covariance to correlation, all you need is the standard deviation of each pair of investments. Learn more below.

Outline Back Tip Next

/ factorpad.com / fin / glossary / covariance.html


An ad-free and cookie-free website.


Covariance in Finance

Intermediate

Covariance is a measure of the co-movements in returns between different assets. It is calculated by multiplying the demeaned returns for each asset. Unlike variance and standard deviation, there is one covariance per pair of assets, not one per asset. Covariance is used to forecast portfolio risk.

Synonym: joint variability

For context, recall that the risk-reduction benefit of diversification in a portfolio is higher when the performance of those assets don't move in tandem. In other words, the co-movements, or covariance, is low. The data that sits in risk models includes covariance measures for each individual asset, or in the case of a multifactor model may include the covariance of style or fundamental factors. That's why covariance is such an important measure in portfolio management applications.

In a Sentence

Pam:  Hey Eve, what's the best measurement period for calculating covariance?
Eve:  Guy says at least 60. I love Guy, the quant guy, but I understand why you asked me.

Video

This video can be accessed in a new window or App , at the YouTube Channel or from below.

Covariance definition for investment modeling (4:42)

Video Script

The script includes two sections where we visualize and demonstrate the calculation of covariance.

Visualize

We're sitting here in Excel, and this is a snippet from our boot camp course.

This is one depiction of covariance, from a risk-return scatterplot of returns for one stock Merck versus a basket of stocks, the Market, for 60 periods. Think about each dot here as returns for the Market on the x-axis and Merck on the y-axis, for each month.

So if stocks exhibit co-movements, as they appear to here, then a pattern will look linear. A random shotgun pattern would have low covariance. This is an example of positive covariance because a rise in the Market, corresponded with positive movements in Merck.

The calculation helps us understand covariance, so let's head there now.

Demonstrate

Let's walk through a calculation for two stocks, Microsoft and eBay.

We have six monthly returns for each stock from April to September 2003. Column F is the return on Microsoft, eBay is in column G.

Next we compute the average of each, here 2.38% for Microsoft and 3.98% for eBay. Then move those over to columns H and I.

In column J, take the return minus this average which gives us 3.24%. That's 5.62% minus 2.38%. For eBay it is 8.91% minus 3.98%, or 4.93%. Carry that formula down. Columns J and K are called demeaned returns.

Next, in column L, multiply these together. As you notice, when the stocks move together, like in April, the product is positive. And when they move in opposite directions, the product is negative.

Next, using the =SUM() function, add up the products to get -0.0037 for the pair of stocks. Next, divide by 6 observations to get the covariance of -0.0006. If you saw our video on variance then you know it isn't interpretable as the units are in returns squared. Covariance is similar, so we translate it to correlation by dividing by the product of the two standard deviations.

So to interpret, these two stocks had negative covariance, meaning as one moved up, the other moved down. These would be examples of diversifying stocks.

Quiz

Click box for answer.

Covariance is to correlation as variance is to standard deviation. | True or False?

True. The latter is the interpretable counterpart.

Using 60 monthly returns for stocks, the result of a Covariance calculation is in units of return return percent. | True or False?

False. The units are returns squared, which isn't easily interpreted.

Questions or Comments?

Still unclear on the term Covariance? Check out the Quant 101 Series, specifically Four Essential Stock Risk Measures.

Related Terms

Our trained humans found other terms in the category statistics basics you may find helpful.


What's Next?

Connect at YouTube, twitter @factorpad, and no-spam mailing list if you'd like to learn more.

Outline Back Tip Next

/ factorpad.com / fin / glossary / covariance.html


covariance for investments
covariance matrix
variance covariance matrix
stock risk
covariance in finance
stock co-movements
demeaned returns
forecast portfolio risk
portfolio analysis
stock risk
covariance in finance
portfolio covariance
covariance example
covariance tutorial
stock correlation
cov formula
covariance for two stocks
covariance of stocks
covariance interpretation
analysis of covariance
covariance of returns
covariance between stocks

A newly-updated free resource. Connect and refer a friend today.