Brownian representation replication in a local volatility market (source code)

= Brownian representation replication in a local volatility market
{c}
{title2=$\pi_t=h_t/(\widetilde S_t\sigma(t,S_t))$}

For a square-integrable discounted claim martingale $dM=h\,dW$ and discounted stock $d\widetilde S=\widetilde S\sigma\,dW$, choose stock holdings $h/(\widetilde S\sigma)$. The remaining wealth lies in the bond. A nonnegative claim makes this replication admissible; discounted admissible wealth is a <supermartingale>, establishing the minimal initial cost.