Explicit log-price scheme for local-volatility pricing (source code)

= Explicit log-price scheme for local-volatility pricing
{title2=$u_t+au_{xx}+bu_x=0,\quad a=\sigma^2/2,\quad b=r-\sigma^2/2$}

With $x=\log S$ and $u=e^{r(T-t)}V(e^x,t)$, a <local volatility> pricing equation becomes the displayed backward equation. <Central finite differences> and the <explicit Euler method> give $u_i^{j-1}=u_i^j+k[a_i^jD_{xx}u_i^j+b_i^jD_xu_i^j]$. Nonnegative weights require $k\sigma_i^2/h^2\leq1$ and $|b_i|h\leq\sigma_i^2$. Under these conditions the update is a convex combination, yielding maximum-norm stability. With smooth coefficients, positive diffusion, fixed positive remaining maturity and suitable consistent boundary treatment, its ordinary error is $O(k+h^2)$. Volatility bounds alone do not imply all this regularity or a Greek error expansion.