What's new

# Covariance matrix vs variance formula for 2-asset question

#### kevolution

##### Member
I was looking at this specific 2-asset portfolio example and noticed that BT uses the matrix formula to get the variance of P.

What I'm confused about is why do you not use the variance formula: variance = X1^2*stddev(asset1)^2 + X2^2*stddev(asset2)^2 + 2*X1*X2*stddev(asset1)*stddev(asset2)*correlation

where X1 and X2 are the weights (in this case 0.5 and 0.5). The correlation part of the summation gets canceled out since it's 0 for this problem.

I get a different answer when using the above formula vs. the covariance matrix method. I got variance = 0.0108

Please tell me what I'm doing wrong. Thanks!

#### David Harper CFA FRM

##### David Harper CFA FRM
Staff member
Subscriber
@kevolution I apologize but our matrix math is incorrect here. Of course you are correct the two methods should produce the same result: after all, your formula is the reduced version of the matrix approach for the special case of only two assets. I do agree with your result, the portfolio variance (in returns^2) should be 0.01083. I'm not sure how we mistakenly got 0.04 in the matrix math. Our mistake in σ^2(p) = x'*cov()*x is that you have to post-multiply then pre-multiply. I entered into Excel super quickly here at https://www.dropbox.com/s/osftut2k9vdozbf/0517-t8-jorion-matrix.xlsx?dl=0 See below, the first step (1. post multiply) returns the column vector in purple [0.0432, 0.0867]; then (step 2) the pre-multiply returns dollar variance of 0.3897, which matches return (%) StdDev of 10.40% such that 10.404%^2 = 0.0108. Thank you. cc @Nicole Seaman

Last edited:

#### kevolution

##### Member
Thanks for the clarification! Was getting a bit worried there...

On a similar note, I noticed in the question:

Why do we split the covariance(USD, .5*USD + .5*EUR)? Could we not have just calculated using the correlation given, the volatility of USD, and the portfolio volatility (calculated with the variance portfolio formula)?

#### David Harper CFA FRM

##### David Harper CFA FRM
Staff member
Subscriber
Hi @kevolution If we here multiply σ(P)*σ(USD)*ρ(USD,EUR), notice the inconsistency between σ(P) and ρ(USD,EUR). To get COV(USD, P) we really want σ(USD)*σ(P)*ρ(USD,P). In this case, ρ(USD,P) is not provided but it's 0.934 such that COV(USD,P) = σ(USD)*σ(P)*ρ(USD,P) = 0.30*0.2247*0.934 = 0.063. The reason the solution splits covariance is that unlike a more typical COV(X,Y) where X and Y are somewhat unrelated, here we are looking for the covariance of a position with the portfolio that holds the position, so the correlation is going to be high due to the self-reference. (and it's using covariance properties) This is portfolio VaR and the typical "next step" is retrieving the marginal VaR which, for USD, is given by β(USD,Portfolio) * Portfolio VaR/Portfolio Value = 1.25*$7.4/20 = 0.4611 such that USD component VaR = 0.4611*$10 USD position = \$4.6 mm. I hope that explains!

#### kevolution

##### Member
Thanks! I assumed the correlation provided was actually between USD and P. Now it makes much more sense why you would have to do some extra work to get the final answer. Do you expect the exam to have something more complex like this?

#### David Harper CFA FRM

##### David Harper CFA FRM
Staff member
Subscriber
@kevolution maybe not or probably not, I don't really know, but it's on the syllabus and the exam is notoriously difficult to predict. The 2017 P2 practice paper queries marginal VaR but supplies betas, so you can see that's pretty close. Thanks,

#### GregW

##### New Member
Hi David,

Maybe I'm missing something simple here but I am looking at your spreadsheet for Jorion Chapter 7 and I am a bit confused as to how you are calculating the co-variance between an asset and the portfolio - in the Excel you are using volatility i ^2 *weight of i + covariance of i & j * weight j - in your example the second term disappears as you have specified that the covariance between i and j is 0 - but I am still confused as to how exactly this is being derived.

Maybe this has been answered elsewhere on the forum but any help would be great.

Regards,

Greg

#### David Harper CFA FRM

##### David Harper CFA FRM
Staff member
Subscriber
Hi @GregW Yes that's a bit tricky because we are looking for the covariance between a position and a portfolio that contains the position, so there is self-referencing, but it just applies covariance properties (https://en.wikipedia.org/wiki/Covariance#Properties) as follows:
• We want Cov[A, w(A)*A + w(B)*B] because the portfolio is w(A)*A + w(B)*B, which distributes:
• Cov[A, w(A)*A] + Cov[A, weight(B)*B], and the constants can come out:
• w(A)*Cov(A,A) + w(B)* Cov(A*B), but Cov(A,A) = variance(A) such that
• w(A)*variance(A)+ w(B)* Cov[A*B], which is the formula in the sheet. I hope this explains!

Last edited: