Solution (source code)

= Solution

Condition on the information through time $n-1$. Independence of $ξ_n$ and the definition of the <Bellman equation for terminal-wealth utility> imply
$$
\mathbb E[V(n,X_n)\mid\mathcal F_{n-1}]\leq V(n-1,X_{n-1}),
$$
because the actual holding is one candidate in the supremum. Thus $V(n,X_n)$ is a <supermartingale> for every strategy.

For the stated strategy it is a <martingale>, so
$$
\mathbb E[U(X_N^*)]=V(0,X_0).
$$
Every competing strategy has expected terminal value at most $V(0,X_0)$ by the supermartingale inequality from part (a), evaluated at the bounded time $N$. Hence $θ^*$ is optimal.