# Computing the minimum variance portfolio for only two risky assets

Given two risky assets and their corresponding covariance matrix, how do I compute the global minimum variance portfolio, its standard deviation and its expected return?

• Are you like for Programming code or math? Feb 19, 2015 at 20:42

Assume the weights of the two assets are $w$,$1-w$ respectively;the expected returns and standard deviations are denoted by $\mu$,$\sigma$ with subscripts 1,2,p(for portfolio),i.e,we have $\mu_1$,$\mu_2$,$\mu_p$,$\sigma_1$,$\sigma_2$,$\sigma_p$.The correlation coefficent is $\rho$ Then
$$\sigma_p^2=w^2\sigma_1^2+(1-w)^2\sigma_2^2+2w(1-w)\sigma_1\sigma_2\rho \,\,\,\,...(1)$$ $$\mu_p=w\mu_1+(1-w)\mu_2 \,\,\,\,\,\,\,\,\,\,\,\,...(2)$$ $$\frac{d_{\sigma_p}}{dw}=0$$ $$w=\frac{\sigma_2^2-\rho\sigma_1\sigma_2}{\sigma_2^2+\sigma_1^2-2\rho\sigma_1\sigma_2}\,\,\,\,\,\,...(3)$$