I implemented the one factor Hull White model for educational purposes and I calibrated the model from a given (made up!) yield curve:
The Zero Coupon Bond Prices from this yield curve are:
Taking the log of the bond prices and use cubic splines for interpolation gives:
Calculating the instantaneous forward rates from the curve above using
$$ f^M(t) = -\frac{\partial \operatorname{log}P(t)}{\partial t} $$
where i use the first derivative of the cubic spline at time $t$ to calculate $\frac{\partial \operatorname{log}P(t)}{\partial t}$ results in
(blue are the forward rates, orange is the original yield curve)
When I calculate the Bond prices from the model I get the following result:
The orange line are the bond prices from the model, the blue dots are the original bond prices.
My questions:
- The forward curve has quite a swing. Is there a problem / fault in my approach?
- Is it plausible that the model prices (last image) differ that much from the data I used for calibration?
The whole jupyter notebook is available here: https://nbviewer.jupyter.org/gist/wpla/435437ddc5bcb1f6bdcae274117725e7