Determine the weights in the minimum variance portfolio. Consider three securities with the following expected returns, standard deviations of returns, and correlations between returns:
$$
\begin{matrix}
\mu_1=0.20, & \sigma_1=0.31, & \rho_{12}=\rho_{21}=-0.2, \\
\mu_2=0.25, & \sigma_2=0.17, & \rho_{23}=\rho_{32}=0.6, \\
\mu_3=0.17, & \sigma_3=0.27, & \rho_{31}=\rho_{31}=0.15, \\
\end{matrix}
$$
Determine the weights in the minimum variance portfolio.  
My question is what is a minimum variance portfolio?
For finding the weights I know $0.20\omega_1+0.25\omega_2+0.17\omega_3=$ expected return of portfolio and $\omega_1+\omega_2+\omega_3=1$ but I don't know what the expected return of the portfolio is and there are three variables but only 2 constraints?
 A: first form the covariance matrix, $C,$ its entries are found from the standard deviations and correlations. 
Let $e = (1,1,\dots,1).$ In this case, $(1,1,1).$
Solve $Cy = e.$
Normalize the elements of $y$ so they add to $1.$ 
Done. 
(for discussion of why this is the minimal variance portfolio, see Joshi--Paterson, Introduction to Mathematical Portfolio Theory.)
A: We have 3 securities $S_1, S_2, S_3$
$$E[\sum_i \omega_i S_i] = \sum_i \omega_i E[S_i]$$
$$Var(\sum_i \omega_i S_i) = \sum_i \omega_i^2 Var(S_i) + 2\sum_{i < j} \omega_i \omega_j Cov(S_i, S_j)$$
We want to minimise $Var(\sum_i \omega_i S_i)$.
For $j=1,2,3$, solve
$$0 = \frac{\partial Var(\sum_i \omega_i S_i)}{\partial \omega_i}$$
We thus have
$$0 = \sum_{i=1}^{3} \omega_i Cov(s_i,s_j) = \sum_{i=1}^{3} \omega_i \sigma_i \sigma_j \rho_{i,j}$$
$$ \to 0 = \sum_{i=1}^{3} \omega_i \sigma_i \rho_{i,j}$$
This gives us $\Sigma \omega = 0$ where $\Sigma$ is the covariance matrix, $\omega$ is the vector of weights and $0$ is the zero vector.
To verify that it is a minimum, use second derivative test.
