Solution (source code)

= Solution

An <instantaneous forward rate> curve determines the unit-face-value <zero-coupon bond> through $f(t,T)=-\partial_T\log P(t,T)$ and $P(t,t)=1$. Integrating in maturity gives
$$
\boxed{P(t,T)=\exp\left[-\int_t^Tf(t,u)du\right].}
$$
The diagonal is the <short rate>, $\boxed{r_t=f(t,t)}$, and the <continuous-time bank account> has $B_t=\exp(\int_0^tr_sds)$ when $B_0=1$. Therefore the <discounted bond price martingale> has value
$$
\boxed{Z_t(t,T)=B_t^{-1}P(t,T)
=\exp\left[-\int_0^tr_sds-\int_t^Tf(t,u)du\right].}
$$
Under the <risk-neutral measure> of the <Heath-Jarrow-Morton model>, sufficiently integrable discounted bond prices are true <martingales>; without that integrability their stochastic dynamics initially establish a local <martingale>.