I am trying to understand the relationship between two methods of pricing callable bonds in the risk-neutral pricing framework.
Problem statement
Let's consider zero-coupon bond with face value 1, expiring in 1 year and callable at 6 months with strike $K =0.4$. I am going to work in the Ho-Lee model in which the spot rate follows the generalized Brownian motion $$ dr(t) = \theta(t) dt + \sigma d\hat{w}(t). $$ For the purposes of obtaining a numerical result, I will assume $\sigma = 0.16$ and $r(0) = 0.3$ and choose the fitting function to be $\theta(t) = 0$ (unrealistic values in practice).
I can show numerically that the price obtained from the finite-difference method (Method 2) converges to the analytical price (Method 1). I would like to obtain the analytical result directly from the PDE in Method 2.
Method 1
The zero-coupon discount curve is given by $ P(t,T) = e^{-r(t) (T-t) + \frac{\sigma^2}{6}(T-t)^3} $. Applying Ito's lemma we obtain $$ dP(t,T) = P(t,T) r(t) dt - P(t,T)(T-t)\sigma d\hat{w}(t). $$ It follows that a European call option with expiration $T_i$ on the ZCB with maturity $T_j>T_i$ can be priced using the Black pricing formula using a time-depedent volatility, \begin{align} \mathbf{CZCB}(t,T_i,T_j,K) & = P(t,T_i)\mathbb{E}^{Q_i}_t\left[\max(G(T_i)-K,0)\right] \\ & = P(t,T_i)\left[G(t)N(y+\bar{\sigma}\sqrt{T_i-t})-KN(y)\right] \end{align} where \begin{equation} G(t) = \frac{P(t,T_j)}{P(t,T_i)}, \quad \quad y = \frac{\log\left(\frac{G(0)}{K}\right)-\frac{1}{2}\bar{\sigma}^2(T_i-t)}{\bar{\sigma}\sqrt{T_i-t}}, \quad \quad \bar{\sigma} =\sigma(T_j-T_i). \end{equation} Thinking of the callable bond as a straight bond minus the call option we obtain \begin{equation} P(0,T_e)-\mathbf{CZCB}(0,T_c,T_e,K) = \$ \, 0.344467, \end{equation} where I have set $T_e = 1$, $T_c = 0.5$, and $K = 0.4$
Method 2
Thinking of the callable bond as a spot-rate contingent claim we see that the bond price satisfies the PDE, \begin{equation} \frac{\partial g}{\partial t} + \frac{1}{2}\sigma^2 \frac{\partial^2 g}{\partial r^2} - rg(r,t) = 0. \end{equation} In a fully explicitly discretization with $t_n = n \Delta t$ ($0 \leq n \leq N$) we have \begin{equation} g_n^j = h_n^j , \quad \quad h_n^j = \frac{1}{1+r_j\Delta t} \bigl[p g_{n+1}^{j+1}+(1-2p) g_{n+1}^{j} + p g_{n+1}^{j-1}\bigr], \quad \quad p = \frac{\sigma^2\Delta t}{2\Delta r^2}. \end{equation} with the following boundary conditions in the $t$-direction (assuming $N$ is even) \begin{align} g^j_N & = 1 \\ g^j_{N/2+1} & = \max(K,h^j_{N/2+1}) \end{align} where the second condition accounts for the possibility of exercise at the 6 month mark.