Solution (source code)

= Solution

Use the <Black-Scholes equation> with the claim's terminal condition $V(T,s)=g(s)$:
$$
V_t+rsV_s+\frac12\sigma^2s^2V_{ss}-rV=0.
$$
For $t<T$, the <Itô formula> under the physical measure gives
$$
dV(t,S_t)=\left(rV(t,S_t)+(\mu-r)S_tV_s(t,S_t)\right)dt
+\sigma S_tV_s(t,S_t)\,dW_t.
$$
Choose the <delta hedge> and its bank-account holding by
$$
\boxed{\pi_t=V_s(t,S_t),\qquad
\phi_t=\frac{V(t,S_t)-S_tV_s(t,S_t)}{B_t}.}
$$
Their portfolio value is $V(t,S_t)$, and
$$
\phi_t\,dB_t+\pi_t\,dS_t
=\left(rV+(\mu-r)S_tV_s\right)dt+\sigma S_tV_s\,dW_t
=dV(t,S_t).
$$
Thus the portfolio is <self-financing> and, with initial capital $V(0,S_0)$, has terminal wealth $g(S_T)$.

Localizing to compact stock-price intervals and times below $T$ justifies these stochastic integrals from the classical smoothness of $V$. The extension to maturity also follows from boundedness. Under the <Risk-neutral measure for the Black-Scholes model>, discounted $V(t,S_t)$ is a bounded <local martingale>, hence a true square-integrable <martingale>. Its quadratic variation has finite expectation, so the stock-integral coefficient is square integrable through $T$. Equivalence of measures preserves its almost-sure finiteness, and the physical drift integral is finite by <Cauchy-Schwarz>. The terminal limit is $g(S_T)$.

Finally, $B_t=B_0e^{rt}$ is bounded away from zero on this finite horizon, and bounded $V$ makes $V(t,S_t)/B_t$ bounded below by a deterministic constant. The hedge is therefore an <admissible trading strategy>. \b[The displayed holdings replicate the payoff admissibly], even if the bounded payoff can be negative.