Looking for code to implement the interest rate trinomial tree in the Generalized Hull-White model

Hi everyone!

I am a quantitative finance student and I am currently focusing on interest rate models. In that regard, I was trying to implement the interest rate trinomial tree following the Generalized Hull-White model, from the 2017 paper by Hull and White (see: http://www-2.rotman.utoronto.ca/~hull/downloadablepublications/TreeExtension.pdf , the example in paragraph 5 in particular). In the paper itself the model is implemented manually with a three-period example, however I am trying to make it work for more periods.

Does anyone have any piece of code which implements or tries to replicate the GHW interest rate trinomial tree? It would also work if you have anything for the classical Hull-White model (1994). Thanks in advance for your help.

Davide Tagazzini

1 Like

You might take a look at RQuantLib, which has HWAnalytic (Hull-White model using analytic formulas), and HWTree (Hull-White model using a tree) listed as pricing-method options in several functions:
https://CRAN.R-project.org/package=RQuantLib

There's a post here that might be relevant as well:

1 Like

Thanks for your reply. I looked into it, especially the part dealing with trees, i.e.
HWTree (Hull-White model using a tree). However, it can only be used as a parameter for other functions and does not explicitly constructs the HW trinomial tree (through the two-stage approach described by Hull and White). If you find anything more specific on codes about building HW trees, please let me know. Thanks again.

1 Like

I don't know anything about HW trees, but RQuantLib and QuantLib (the C++ package on which it's built) are both open source, so you should be able to dig down into the source code to see how the parameter is implemented.

You might also check out quant.stackexchange.com β€” nothing seems identical, but there are a few questions over there about implementations that make me think there might be more of the domain knowledge necessary to help you over there.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.