Solution (source code)

= Solution

Substitute $U=e^{\theta x}V$. After dividing by $e^{\theta x}$, the PDE becomes
$$
V_t+(B+\theta\rho zC)V_z
+\frac12C^2V_{zz}
+\frac12\theta(\theta-1)z^2V=0,
$$
with terminal condition $V(T,z)=1$.