Solution (source code)

= Solution

Work conditionally on a positive-probability atom of $\mathcal F_{T-1}$. Let $Z$ have the <conditional distribution> of $S_T$ there, and let $Z'$ be an independent copy of that conditional law. The finite sample space makes all <expectations> finite. Then
$$
2\operatorname{Cov}(g(Z),Z)
=\mathbb E[(g(Z)-g(Z'))(Z-Z')].
$$
Strict increase of $g$ makes the integrand nonnegative, and strictly positive whenever $Z\ne Z'$. The <conditional variance> is positive by part (c), so the <conditional distribution> is nondegenerate and $\mathbb P(Z\ne Z')>0$. Thus the numerator of the hedge ratio is strictly positive on every such atom. The denominator is also positive, giving
$$
\boxed{\pi_T>0\quad\text{almost surely}.}
$$
This is <strict positive covariance with an increasing payoff>. The independent copy is taken from the <conditional distribution>, not from an unrelated unconditional distribution.