Solution (source code)

= Solution

The risky weights of the normalized <market portfolio> must sum to one. Since $\mathbf1^Tz=38/11>0$, divide each component by this sum:
$$
\boxed{w_M=\left(\frac{13}{38},\frac{13}{38},\frac{12}{38}\right)^T.}
$$
Every weight is positive in this case, although the optimization permitted <short selling>.