Sub topic 10
Covariance and Correlation
Assume you know means, variance, standard deviation, z-scores, and basic sampling. This chapter shows how to measure whether two investment variables move together.
Covariance: direction of joint movement
Covariance measures whether two variables tend to be above or below their means at the same time. For a sample, calculate it as:
s_{XY}=\frac{\sum_{i=1}^{n}(X_i-\bar X)(Y_i-\bar Y)}{n-1}A positive covariance means that high values of \(X\) tend to occur with high values of \(Y\), and low values tend to occur together. A negative covariance means that high values of one variable tend to occur with low values of the other. A covariance near zero indicates little linear co-movement.
Covariance depends on the units of both variables. For example, covariance between returns measured in percentages has different numerical units from covariance between returns measured as decimals. This makes covariance difficult to compare across pairs of variables.
Correlation: standardized covariance
Correlation standardizes covariance by dividing it by both standard deviations:
r_{XY}=\frac{s_{XY}}{s_Xs_Y}The sample correlation \(r\) always lies between \(-1\) and \(+1\).
| Correlation | Meaning |
|---|---|
| \(+1\) | Perfect positive linear relationship |
| \(0\) | No linear relationship |
| \(-1\) | Perfect negative linear relationship |
The closer the absolute value of \(r\) is to 1, the stronger the linear relationship. For example, \(r=0.80\) indicates a strong positive linear association, while \(r=-0.25\) indicates a weak negative linear association.
Worked example
Suppose three monthly observations are:
| Month | Fund return \(X\) | Index return \(Y\) |
|---|---|---|
| 1 | 1 | 2 |
| 2 | 2 | 4 |
| 3 | 3 | 5 |
The means are \(\bar X=2\) and \(\bar Y=11/3\). The deviations from the means are:
- \(X-\bar X=(-1,0,1)\)
- \(Y-\bar Y=(-5/3,1/3,2/3)\)
The sum of cross-products is:
(-1)(-5/3)+(0)(1/3)+(1)(2/3)=7/3Therefore:
s_{XY}=\frac{7/3}{3-1}=\frac{7}{6}The standard deviations are \(sX=1\) and \(sY\approx1.528\). Thus:
r=\frac{7/6}{(1)(1.528)}\approx0.763The fund and index have a moderately strong positive linear relationship.
Exercise
If two assets have covariance 0.018, standard deviations 0.12 and 0.20, what is their correlation?
Show answer
r = 0.018 / (0.12 × 0.20) = 0.75. The assets have a strong positive linear relationship.