Covariance
Covariance is a statistical measure of the extent to which two variables tend to vary together. In finance, covariance is commonly used to measure the joint movement of the returns of two assets and is an important component of portfolio risk calculations.
A positive covariance indicates that two variables tend to move in the same direction, while a negative covariance indicates that they tend to move in opposite directions.
Population covariance
For two variables and , the population covariance is:
where:
- = observation of variable ;
- = observation of variable ;
- = population mean of ;
- = population mean of ;
- = number of observations.
The population means are:
and:
Sample covariance
When observations represent a sample from a larger population, sample covariance is commonly calculated as:
where:
- = sample covariance;
- = individual observation of ;
- = individual observation of ;
- = sample mean of ;
- = sample mean of ;
- = number of observations.
Covariance of investment returns
In finance, covariance can be calculated using the returns of two assets.
A simplified expression is:
where:
- = return of asset during period ;
- = return of asset during period ;
- = average return of asset ;
- = average return of asset ;
- = number of observations.
Positive covariance
Positive covariance indicates that the two variables tend to move in the same direction relative to their respective means.
A simplified relationship is:
This means that observations in which is above its mean tend to coincide with observations in which is above its mean, and observations below their respective means also tend to occur together.
Negative covariance
Negative covariance indicates that the two variables tend to move in opposite directions relative to their respective means.
A simplified relationship is:
When one variable is above its mean, the other tends to be below its mean, and vice versa.
Zero covariance
Zero covariance indicates that the variables have no linear co-movement as measured by covariance:
Zero covariance does not necessarily mean that the variables are completely independent or that no nonlinear relationship exists.
Covariance and correlation
Covariance is closely related to correlation.
The Pearson correlation coefficient can be expressed as:
Equivalently:
where:
- = correlation between and ;
- = standard deviation of ;
- = standard deviation of .
Unlike correlation, covariance is not restricted to the interval from −1 to +1 and depends on the units and scale of the variables.
Covariance and portfolio risk
Covariance is an important component of portfolio variance because it measures the joint movement of asset returns.
For a two-asset portfolio:
where:
- = portfolio variance;
- = portfolio weights;
- = standard deviations of the two assets;
- = covariance between their returns.
Using correlation, the same relationship can be written as:
Thus, covariance helps determine how combining assets affects overall portfolio risk.
Covariance matrix
For a portfolio containing multiple assets, the pairwise covariances can be organized into a covariance matrix.
For three assets, a simplified covariance matrix is:
The diagonal elements represent the variances of the individual assets, while the off-diagonal elements represent pairwise covariances.
Covariance is symmetric:
For a portfolio with weight vector , portfolio variance can be expressed compactly as:
Covariance and diversification
Covariance is important to diversification because assets do not necessarily move together.
If two assets have negative covariance, movements in one asset can partially offset movements in the other.
Even when covariance is positive but relatively low, combining the assets can reduce portfolio risk compared with a portfolio consisting of assets that move closely together.
A simplified relationship is:
The actual effect depends on portfolio weights and the individual volatilities of the assets.
Limitations
Covariance has several limitations:
- its magnitude depends on the units and scale of the variables;
- it does not have a standardized range;
- historical covariance may change over time;
- it measures linear co-movement;
- it does not establish causation;
- extreme observations can materially affect its value.
For this reason, correlation is often used when comparing the strength of relationships across variables with different scales.