Skip to main content

Covariance

IntermediateFinance FoundationsAlso known as: sample covariance, how two returns move together

Finds: whether two returns move together.

When to use it: Use it to see whether two returns tend to move in the same direction (positive) or in opposite directions (negative). Its size is hard to interpret, so it is usually converted to correlation.

The formula

Cov(X,Y)\displaystyle Cov(X,Y)=∑i=1n(xi−xˉ)(yi−yˉ)n−1\displaystyle = \frac{\sum_{i=1}^{n}(x_{i}-\bar{x})(y_{i}-\bar{y})}{n-1}

In words: Cov(X,Y) = sum of (xi − mean x)(yi − mean y) / (n − 1)

What each symbol means

Cov(X,Y)Sample covariance of X and Ypercent squared
x_i, y_iPaired observations, such as two assets' returns in the same periodpercent
x-bar, y-barMean of X and mean of Ypercent
nNumber of pairsnumber

Worked example

Asset X returned 10%, −5% and 15%, and asset Y returned 8%, −2% and 12% in the same three years. What is their covariance?

Deviation of each X from its mean3.33%, −11.67%, 8.33%
Deviation of each Y from its mean2%, −8%, 6%
Multiply the deviations pair by pair0.0007, 0.0093, 0.0050
Covariance0.0075
The answer

The covariance is 0.0075. It is positive, so the two assets tend to move together.

Want every formula on a few pages?Get the free Cheat Sheet (PDF) →

Calculator

Covariance0.0075

Keep going