In: Finance
Year |
Stock X |
Stock Y |
1 |
12.00% |
10.00% |
2 |
4.00% |
18.00% |
3 |
15.00% |
2.00% |
4 |
1.00% |
8.00% |
What is the covariance of the returns of Stock X with the returns of Stock Y?"
Please round to 6 decimal places, the answer should be negative. Thanks
Year | Stock X | Stock Y |
1 | 12% | 10% |
2 | 4% | 18% |
3 | 15% | 2% |
4 | 1% | 8% |
Expected Return
Expected Return of Stock X = E[X] = (12%+4%+15%+1%)/4 = 32%/4 = 8%
Expected Return of Stock Y = E[Y] = (10%+18%+2%+8%)/4 = 38%/4 = 9.5%
Covariance for a sample size of n is calculated using the below formula:
Cov(X,Y) = [(RX1-E[X])(RY1-E[Y])+(RX2-E[X])(RY2-E[Y])+(RX3-E[X])(RY3-E[Y])+(RX4-E[X])(RY4-E[Y])]/(n-1)
Sample size = n = 4
n-1 = 3
Covariance between X and Y = Cov(X,Y) = [(12%-8%)*(10%-9.5%)+(4%-8%)*(18%-9.5%)+(15%-8%)*(2%-9.5%)+(1%-8%)*(8%-9.5%)]/3 = [0.0002+(-0.0034)+(-0.00525)+0.00105]/3 = -0.0074/3 = -0.002466666666
Covariance of the returns of Stock X and Stock Y = Cov(X,Y) = -0.002467 (Rounded to 6 decimal places)
Answer -> -0.002467
Method 2: Using Excel
We can also calculate the Covariance using the COVARIANCE.S functin in Excel as shown below:
=COVARIANCE.S(B2:B5,C2:C5) = -0.002467
Answer -> -0.002467