Q:

Correlation of asset X with a portfolio of asset Y and Z

I have three assets and a covariance matrix.
How do I calculate the correlation of asset X with a portfolio that includes assets Y and Z?
For example, assume I want to calculate the correlation of high yield bonds to a portfolio that includes 60% equities and 40% U.S. Treasuries.
Thanks.

A:

This is fairly basic but anyway... 
Let us define:

$X$, $Y$ and $Z$ your assets $-$ without any loss of generality, assume $X$ designates high yield bonds, $Y$ equities and $Z$ US Treasuries $-$ and $P$ your portfolio;
$\sigma_X$, $\sigma_Y$ and $\sigma_Z$ their respective standard deviation, and $\sigma_P$ the standard deviation of the portfolio;
$\sigma_{X,Y}$, $\sigma_{X,Z}$ and $\sigma_{Y,Z}$ their pairwise covariances;
$w$ the proportion of equities in your portfolio $-$ so $60\%$ in your example.

Your portfolio $P$ can be written as:
$$ P = wY+(1-w)Z $$
You are interested in computing the correlation $\mathbb{Corr}(X,P)$ between your portfolio and high yield bonds. By the properties of variance and covariance, we obtain:
$$ \begin{align}
\mathbb{Corr}(X,P) & = \frac{\mathbb{Cov}(X,wY+(1-w)Z)}{\sigma_X\sigma_P}
\\[9pt]
& = \frac{w\,\sigma_{X,Y}+(1-w)\sigma_{X,Z}}{\sigma_X\sqrt{(w^2\sigma_Y^2+(1-w)^2\sigma_Z^2+2w(1-w)\sigma_{Y,Z})}}
\end{align} $$
Your are left with $\sigma_X$, $\sigma_Y$, $\sigma_Z$, $\sigma_{X,Y}$, $\sigma_{X,Z}$ and $\sigma_{Y,Z}$, which are the elements of your variance-covariance matrix, and $w$ which you set yourself.

