I am trying to figure out the method for calculating the portfolio volatility using matrices. I have read online the following definition for calculating the portfolio volatility using matrix algebra
The variance of a portfolio of correlated assets can be written as WTvW, where W is a column vector (ie a matrix with a single column) containing the weights of different assets in the portfolio. V is the covariance matrix, and WT is the transpose of the matrix W.
I have tried to calculate this on a spreadsheet, but am not sure if i have done it correctly. More specifically, im not sure if i am multiplying the vectors with the covariance matrix correctly.
Can someone please confirm my calculation I have used commas below to separate the different values in the vector and matrix
assuming my weights vector is 0.89, 0.11 my covariance matrix is a 2x2 matrix = 1 , 0.674571 0.674571, 1
to calculate the result i first multiply my weights vector with the covariance matrix
i.e 0.89*1 + 0.11*0.674571
and 0.89*0.674571 + 0.11*1
which gives the following vector A 0.964202851 0.710368523
I then multiply vector A with the weights vector, i.e
0.964202851 * 0.89 0.710368523 0.11 = 0.964202851*0.89+0.710368523 *0.11 = 0.936281075
Is this correct, or do i have an error in my calculation