Solution (source code)

= Solution

The product rule and self-financing identity show that $XY$ is the stochastic integral of $H$ against the vector of deflated prices $YP$, hence is a <local martingale>. It is nonnegative by admissibility and positivity of $Y$. Every nonnegative local martingale is a <supermartingale>, so
$$
\mathbb E(X_TY_T)\leq X_0Y_0.
$$