Solution (source code)

= Solution

Because $S_1$ is <multivariate normal distribution>[Gaussian], the terminal wealth $W_1$ is normal. For <constant absolute risk aversion utility>
$$
U(x)=-e^{-\gamma x},
$$
the <moment-generating function> of a normal variable gives
$$
\mathbb E[U(W_1)]
=-\exp\left\{-\gamma\mathbb EW_1
+\frac{\gamma^2}{2}\operatorname{Var}(W_1)\right\}.
$$
Maximizing this expected utility is equivalent to maximizing
$$
\theta^Tb-\frac{\gamma}{2}\theta^TV\theta,
$$
after dropping a constant. The unique first-order condition is
$$
b-\gamma V\theta=0,
$$
and strict concavity gives
$$
\theta=\frac1\gamma V^{-1}b=\frac1\gamma\theta_m.
$$
It agrees with part (a) exactly when
$$
\boxed{
\gamma=\frac1\lambda
=\frac{\bigl(\mu-(1+r)S_0\bigr)^TV^{-1}
\bigl(\mu-(1+r)S_0\bigr)}
{w_1-(1+r)w_0}.
}
$$
For the usual risk-averse convention $\gamma>0$, the asserted correspondence assumes $w_1>(1+r)w_0$; under that natural target-return condition the choice is unique.