I have two sub portfolios (lets call them portfolio a & portfolio b - a portfolio is just a vector of weights that sum to 1) that combine to create a total portfolio. I also have a 2 x 2 covariance matrix.

| Variance a Covariance ab |
| Covariance ab Variance b |

By taking the square root of the diagonals of this covariance matrix and I able to create a 2 x 2 correlation matrix so I can get the correlation between portfolio a and b.

What I would like to know is the correlation of portfolio a with the total portfolio (that is portfolio a and portfolio b combined) & the correlation of portfolio b with the total portfolio?

Edit

I should mention that portfolios a & b have the same investable universe. So let says our investable universe is 2000 stocks. portfolio a is a 2000 x 1 vector as is portfolio b. Row i in both vectors correspond to the same company which is linked to another matrix.

From the answer you accepted and from your edit, it seems you only wanted to calculate covariance (or correlation) matrix between a and b, but your question wanted to know correlation between a and (a+b), and b and (a+b). It is misleading, however, what was the reason for asking for correlation between a, and b with (a+b)?
–
user12348May 10 '14 at 23:07

Hi @user13248 I can understand why you would be confused. There were quite a few comments between myself and Matt Wolf. It was suggested that we delete the comments due to the high number. However it appears we were over zealous in doing so. As one of the comments from Matt was a link to a previous answer. I will try to find this link and add it to my post. This was the reason I accepted Matt's answer. After I had accepted the question Marco provided a very detailed and clear answer.
–
mHelpMeMay 12 '14 at 8:56

That link is more general and easy to implement and should work on multiple sub portfolios. @Marco-Breitig's solution is for binary mix. I reconciled them long hand, they both match.
–
user12348May 13 '14 at 7:07

3 Answers
3

You can obtain the covariance between 2 portfolios by multiplying the row vector, containing the weights of portfolio A with the variance-covariance matrix of the assets and then multiplying with the column vector, containing the weights of assets in portfolio B.

Equally you can set up a new portfolio A+B by creating a new column vector that contains the combined weights of column vectors A and B and perform same as above to obtain your covariance between A and A+B. Same follows for B and A+B.

What you described will lead to covariance between portfolios a and b. The OP asked for correlation (covariance will do, too) between (a+b) and a or b. If (a+b) portfolio is c then the answer should show how to get covariance(a,c) or covariance(b,c). This does not answer the question. Hence, down voted. I will be happy to up vote if I am wrong. Just wanted to make sure that someone looking for a quick answer is misled.
–
user12348May 13 '14 at 6:46

Sure, and combined portfolio weight vectors can simply be set up by combining portfolio a and b weightings. Hence, you can easily derive the covariance between portfolio a and (a+b). I am a bit rusty on linear algebra so I am only 90% confident this is right, please correct and explain why if not.
–
Matt WolfMay 13 '14 at 7:04

You really need to work with variance-covariance matrix of the two portfolios and their respective weights in combined portfolio. Please see the edit to the OP.
–
user12348May 13 '14 at 7:13

I saw that edit but that link (though I was the one who initially provided it) leads one down an incorrect road because the question there is about portfolio correlations with their own assets. Using my approach you should get the correct covariance and from that correlation between two portfolios if you construct the weight vectors carefully. If you downvoted it can you explain why this approach would not work (in detail if possible as I like to learn what I got wrong).
–
Matt WolfMay 13 '14 at 7:20

To clarify notation, you have an universe of $n=2000 \space$ stocks and two portfolio vectors $\mathbf{a},\mathbf{b}\in\mathbb{R}^{n}$ with $\left\|\mathbf{a}\right\|_{1}=\left\|\mathbf{b}\right\|_{1}=1$. Further, you have Estimators for the true Variance $\operatorname{Var}\left[\mathbf{a}\right]$ resp. $\operatorname{Var}\left[\mathbf{b}\right]$ and the Covariance $\operatorname{Cov}\left[\mathbf{a},\mathbf{b}\right]$.

Normally you'd multiply the portfolio weights with the random return vector $\boldsymbol{\mu}\in\mathbb{R}^{n}$ to get the portfolio returns $p_{\mathbf{a}} := \mathbf{a}^{T}\boldsymbol{\mu}$. This portfolio return now is a random variable and it makes sense to speak of its Variance etc. In slight abuse of Notation you can call the portfolio value $a$, which is now a real number. The same holds for the portfolio value $b$.

For a new portfolio $\alpha{a}+\beta{b}=:{c}\in\mathbb{R}\space$ with weights $\alpha+\beta=1$ you want to know $\operatorname{Var}\left[{c}\right]$.

You are interested in
$$
\operatorname{Cov}\left[{a},{c}\right]
= \operatorname{Cov}\left[{a},\alpha{a}+\beta{b}\right]$$ $$
\overset{(2)}{=} \alpha\operatorname{Cov}\left[a,a\right]+\beta\operatorname{Cov}\left[a,b\right]
=
\alpha\operatorname{Var}\left[a\right]+\beta\operatorname{Cov}\left[a,b\right]
\textrm{.}
$$
The equality (2) follows from the definition of Covariance and some manipulations:
$$
\operatorname{Cov}\left[{a},{c}\right]
=
\operatorname{Cov}\left[{a},\alpha{a}+\beta{b}\right]$$
$$=
\mathbb{E}\left[\left(a-\mathbb{E}\left[a\right]\right)\left(\alpha{a}+\beta{b} - \mathbb{E}\left[\alpha{a}+\beta{b}\right]\right)\right]$$ $$
=
\mathbb{E}\left[\left(\alpha{a^{2}}-2\alpha{a}\mathbb{E}\left[a\right]+\alpha\mathbb{E}\left[a\right]^{2}\right) + \left(\beta{ab}-\beta{a\mathbb{E}\left[b\right]}-\beta{b}\mathbb{E}\left[a\right]+\beta\mathbb{E}\left[a\right]\mathbb{E}\left[b\right]\right)\right]$$
$$
=
\mathbb{E}\left[\alpha\left(a-\mathbb{E}\left[a\right]\right)^{2} + \beta\left(a-\mathbb{E}\left[a\right]\right)\left(b-\mathbb{E}\left[b\right]\right)\right]
=
\alpha\operatorname{Var}\left[{a}\right] + \beta\operatorname{Cov}\left[a,b\right]
$$
You can get the Correlation from the Covariance in the obvious way, devide the Covariance by the square root of the product of the Variances of both random variables.

Hope I didn't miscalculate and that is the answer you were looking for.

Let there be n stocks, 2 portfolio a and b. c is a combined portfolio of portfolio a and portfolio b. $\Sigma $ is variance-covariance matrix of the n assets. Weight vectors for portfolios a and b are $$w_{pa},w_{pb}\in\mathbb{R}^{n} ,$$ $$\left\|w_{pa}\right\|_{1}=\left\|w_{pb}\right\|_{1}=1 $$

Your answer would be more clear if you did relate the former relations to calculating Cov(a,c). If w_c = xw_a+yw_b, then Cov(a,c) = w_a'V w_c = xw_a'Vw_a + yw_a'Vw_b with V the Var-Cov matrix of returns.
–
Marco BreitigMay 13 '14 at 15:53