FactorPad
Faster Learning Tutorials

Covariance definition and tutorial

This underappreciated statistical measure sits inside risk models and helps institutional portfolio managers manage and allocate risk for clients around the world.
  1. Define - Define Covariance for Investment Modeling.
  2. Context - Use Covariance in a sentence.
  3. Video - See the video.
  4. Script - Read the transcript.
  5. Quiz - Test your knowledge.
by Paul Alan Davis, CFA, June 28, 2016
Updated: December 21, 2018
It's easy to go from covariance to correlation, all you need is the standard deviation for the pair of investments. Learn more below.

Outline Back Next

~/ home  / finance  / glossary  / covariance


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


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

Questions or Comments?

Still unclear on the term Covariance? Leave a question in the comments section on YouTube or 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.


What's Next?

Click Subscribe if you'd like to learn more.

  • To see all terms in the Glossary, click Outline.
  • To learn about the Correlation Matrix, click Back.
  • For a tutorial on Covariance Matrix, click Next.

Outline Back Next

~/ home  / finance  / glossary  / covariance



 
 
Keywords:
covariance
covariance matrix
portfolio analysis
stock co-movements
demeaned returns
forecast portfolio risk
covariance for two stocks
stock risk
variance covariance matrix
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