What is Covariance?
In financial parlance, the term “covariance” is primarily in portfolio theory. It refers to measuring the relationship between the returns of two stocks or other assets. It can be calculated based on returns of the stocks at different intervals and the sample sizeSample SizeThe sample size formula depicts the relevant population range on which an experiment or survey is conducted. It is measured using the population size, the critical value of normal distribution at the required confidence level, sample proportion and margin of error.read more or the number of intervals.
Covariance Formula
Mathematically, it is represented as:
You are free to use this image on you website, templates, etc., Please provide us with an attribution linkHow to Provide Attribution?Article Link to be HyperlinkedFor eg:Source: Covariance Formula (wallstreetmojo.com)
where
- RAi =Return of stock A in the ith intervalRBi =Return of stock B in the ith intervalRA=Mean of the return of stock ARB=Mean of the return of stock Bn = Sample size or the number of intervals
The covariance calculation between stock A and stock B can also be obtained by multiplying the standard deviation of returns of stock A, the standard deviation of returns of stock B, and the correlation between stock A’s and stock B’s returns. Mathematically, it represents as,
Cov (RA, RB) = ρ(A, B) * ơA * ơB
where ρ(A, B) = Correlation between returns of stock A and stock B
- ơA = Standard deviation of returns of stock AơB = Standard deviation of returns of stock B
Explanation
Example
- Firstly, determine the returns of stock A at different intervals, and they are denoted by RAi, which is the return in the ith interval, i.e., RA1, RA2, RA3,….., RAn are the returns for 1st, 2nd, 3rd,….. and nth interval. Next, determine the returns of stock B at the same intervals and they are denoted by RBi Next, calculate the mean of the returns of stock A by adding all the returns of stock A and then dividing the result by the number of intervals. It is denoted by RA. Next, calculate the mean of the returns of stock B by adding all the returns of stock B and then dividing the result by the number of intervals. It is denoted by RB Finally, the calculation of covariance is derived based on returns of both the stocks, their mean returns, and the number of intervals, as shown above. The calculation of covariance between stock A and stock B can also be derived by using the second method in the following steps:Step 1: Firstly, determine the standard deviation of the returns of stock A based on the mean return, returns at each interval, and several intervals. It is denoted by ơA.Step 2: Next, determine the standard deviation of the returns of stock B, and it is denoted by ơB.Step 3: Next, determine the correlation between the returns of stock A and that of stock B by using statistical methods such as the Pearson R test. It is denoted by ρ(A, B).Step 4: Finally, the covariance calculation between stock A and stock B can be derived by multiplying the standard deviation of returns of stock A, the standard deviation of returns of stock B, and the correlation between returns of stock A and stock B, as shown below.Cov (RA, RB) = ρ(A, B) * ơA * ơ
The calculation of covariance between stock A and stock B can also be derived by using the second method in the following steps:Step 1: Firstly, determine the standard deviation of the returns of stock A based on the mean return, returns at each interval, and several intervals. It is denoted by ơA.Step 2: Next, determine the standard deviation of the returns of stock B, and it is denoted by ơB.Step 3: Next, determine the correlation between the returns of stock A and that of stock B by using statistical methods such as the Pearson R test. It is denoted by ρ(A, B).Step 4: Finally, the covariance calculation between stock A and stock B can be derived by multiplying the standard deviation of returns of stock A, the standard deviation of returns of stock B, and the correlation between returns of stock A and stock B, as shown below.Cov (RA, RB) = ρ(A, B) * ơA * ơ
Determine the covariance between stock A and stock B.
Given, RA1 = 1.2%,RA2 = 0.5%,RA3 = 1.0%
RB1= 1.7%,RB2 = 0.6%,RB3 = 1.3%
Therefore, the calculation will be as follows,
Now, mean return of stock A,RA= (RA1 + RA2 + RA3 ) / n
- RA= (1.2% + 0.5% + 1.0%) / 3RA= 0.9%
Mean Return of Stock B, RB= (RB1 +RB2+ RB3 ) / n
- RB= (1.7% + 0.6% + 1.3%) / 3RB= 1.2%
Therefore, one can calculate the covariance between stock A and stock B as:
= [(1.2 – 0.9) * (1.7 – 1.2) + (0.5 – 0.9) * (0.6 – 1.2) + (1.0 – 0.9) * (1.3 – 1.2)] / (3 -1)
Covariance between Stock A and Stock B will be –
- Cov (RA, RB) = 0.200
Therefore, the correlation between stock A and stock B is 0.200, which is positive. As such, both returns move in the same direction, i.e., either with positive or negative returns.
Relevance and Uses
From the perspective of a portfolio analyst, it is vital to grasp the concept of covariance because it is primarily used in portfolio theory to decide which assets are to be included in the portfolio. It is a statistical tool to measure the directional relationship between the price movement of two assets, such as stocks. One can also use it to ascertain the movement of a stock vis-à-vis the benchmark index, i.e., whether the stock price goes up or goes down with the increase in the benchmark index or vice versa. This metric helps a portfolio analyst reduce a portfolio’s overall risk. A positive value indicates that the assets move in the same direction, while a negative value indicates that the assets move in opposite directions.
Recommended Articles
This article has been a guide to Covariance and its definition. Here, we discuss calculating covariance using its formula, a practical example, and a downloadable Excel template. You can learn more about financing from the following articles: –
- Population Variance FormulaPopulation Variance FormulaPopulation variance can be calculated using this formula: σ2 = ∑ni=1 (xi – μ)2 / N, where, σ2 is population variance, x1, x2, x3,…..xn are the observations, N is the number of observations and µ is the mean of the data set.read moreFormula of Variance AnalysisFormula Of Variance AnalysisThe variance analysis formula calculates and examines the difference between the standards numbers expected by the business and the actual numbers achieved by them. It is calculated by deducting the actual number achieved from the standards numbers expected by the business.read moreCalculate Portfolio VarianceCalculate Portfolio VariancePortfolio variance is a statistical value of modern investment theory that measures the dispersion of average returns of a portfolio from its mean. In short, it determines the total risk of the portfolio. Portfolio variance = w12 * ơ12+w22 * ơ22+2 * ρ1,2 * w1 * w2 * ơ1 * ơ2read moreCorrelation vs. CovarianceCorrelation Vs. CovarianceCovariance and Correlation are two terms which are exactly opposite to each other; both are used for statistics and regression analysis. Covariance reflects how two variables vary from each other, whereas correlation depicts the relationship between two variables.read moreHistogram ExamplesHistogram ExamplesA histogram is a visual presentation for summarizing the discrete or the continuous data. The example includes the visual representation on the graph, and the customer’s complaints made on different parameters where the most reported reason will have the highest height in the graph presented.read more