In financial mathematics, the Hull-White model is a model of future interest rates. In its most generic formulation, it belongs to the class of no-arbitrage models that are able to fit today’s term structure of interest rates. It is relatively straightforward to translate the mathematical description of the evolution of future interest rates onto a tree or lattice and so interest rate derivatives such as Bermudan Swaptions can be valued in the model. The first Hull-White model was described by John C. Hull and Alan White in 1990. The model is still popular in the market today (from Wiki).
This section mainly introduces the implementation process of short-rate and discount, which is core part of option pricing, and applied in Tree Engine and FD (finite-difference method) Engine.
As an important part of the Tree/ FD Engines, the class \(HWModel\) implements the single-factor Hull-White model to calculate short-rate and discount by using continuous compounding, including 4 functions (treeShortRate, fdShortRate, discount, discountBond). The implementation process is introduced as follows:
- Function treeShortRate:
- The short-rates is calculated at time point \(t\) with the duration \(dt\) from 0 to N point-by-point. As in the calculation process, the variable \(value\) needs to be calculated first. To improve the initiation interval (II), an array \(values16\) is implemented to store the intermediate results from each iteration. Then, an addition tree is performed subsequently to achieve an II = 1 for the whole process. Finally, the short rate is calculated using variable \(value\).
- For implementing the generic Tree framework, the \(state\_price\) calculating process is moved from Tree Lattice to this Model.
- Function fdShortRate: The short-rate is calculated at time point \(t\).
- Function discount: The discount is calculated at time point \(t\) with the duration \(dt\) based on the short-rate.
- Function discountBond: The discount bond is calculated at time point \(t\) with the duration \(dt=T-t\) based on the short-rate.