100 likes | 284 Views
C++ Hull – White P r icer. 3 rd year student project @ ENSAE 2011/2012. Model. EDS :. Background. Banks need : Parcimony 3-params is already a lot to interpret Flexibility model should be able to produce the ≠ historical curve shapes (+ volatility humps , Bermuda squeeze, … )
E N D
C++ Hull – White Pricer 3rd year student project @ ENSAE 2011/2012
Model • EDS :
Background • Banks need : • Parcimony 3-params is already a lot to interpret • Flexibility model should be able to produce the ≠ historical curve shapes (+ volatility humps, Bermuda squeeze, … ) • Tractability formulas for bonds & swaps options • Speed calibration, pricing & risks (semi-) explicit methods
Implementation details • Everything is computed on the same tree
Nifty Tricks • Root Finder Algorithm • will accept : • a Functor • a λ-Function • a Member Function Pointer • is also templatized on the <x,y> pair type
Code Engineering • SVN Versionning • Main Repository : Google Code project • Externals for Boost & GTest libraries • Unit Tests • Requires a library (static or dynamic) • Less helpful for mathematical features • TDD very hard in practice • Trade-Of induced by file splitting • + : less versioning conflicts • + : more efficient build • - : increased cost of trial & errors
Failures • The address of an element in a STL Vector is not constant • Time indexes can be tricky ( & an error can have a huge impact if the grid is irregular) • = vs. == was the cause of 3 major bugs !
Possible Extensions • Hull – White parameters : • Calibration on a Swaptions market-data • Effect on Black implied surfaces ? • Risk computations : • Greeks (Δ by buckets, sensitivity to σ and a) • VaR (curve stress-test scenarios importation) • Performance : • Trace expensive calls • Cache them ?
Bibliography • Interest Rates Theory • Brigo, Mercurio (book) • Hull, White (1994, 1996a, 1996b articles) • Numerical Implementation • Both • http://ramneekhanda.wordpress.com/2011/09/27/hull-white-model-for-interest-rate-derivatives/