Consider the following 2 stocks:
Closing Prices |
||
Stock A |
Stock B |
|
Year 1 |
33.75 |
112.09 |
Year 2 |
31.69 |
115.74 |
Year 3 |
29.17 |
115.89 |
Year 4 |
25.64 |
120.75 |
Year 5 |
27.97 |
125.12 |
Year 6 |
30.36 |
127.46 |
Year 7 |
32.74 |
110.49 |
Year 8 |
35.09 |
111.26 |
Year 9 |
31.89 |
106.99 |
Year 10 |
33.56 |
105.17 |
Year 11 |
30.12 |
108.25 |
Covariance between two stocks x and y is calculated as correlation(x,y)*standard deviation of x* standard deviation of y
Standard deviation of x is calculated as sqrt((summation of (Xi-X)^2)/(n-1)); where Xi is the individual stock price, X is mean of the given stock prices and n is the number of values in the sample.
Mean= 33.75+31.69+....30.12/11= 31.09
= sqrt((33.75-31.09)^2+(31.69-31.09)^2+....(30.12-31.09)^2)/(11-1))
= 2.78
Standard deviation of y is calculated similarly.
Mean= 112.09+115.74+....108.25/11= 114.47
= sqrt((112.09-114.47)^2+(115.74-114.47)^2+....(108.25-114.47)^2)/(11-1))
= 7.34
So, Covariance= (-0.301*2.78*7.34)= -6.15
Get Answers For Free
Most questions answered within 1 hours.