I have been receiving some emails in regards to the calibration of the G2++ Model for interest rates via Excel/Matlab. Personally, I find Matlab’s fminsearch() optimizer not very good. An alternative is to use the Leverberg Marquard optimization algorithm. This routine is efficient, fast and robust method which also has a good global convergence property. However, there are three areas of attention when this routine fails to yield a good fit: provide better initial solution, do better scaling, and provide better bounds. A good bound may prevent the algo go into an area with scaling issues and a good bound also can change the initial point.
The attached application contains implementations of the G2++ Model using Levenberg Marquardt optimization. Functions included in the spreadsheet:
1) Hull White Model Calibration
2) Black Karasinki Model Calibration
3) Bermudan Swaption in HW Interest Rate Tree
4) European Swaption in HW model using Jamshidian
5) European exchange option for risky bond vs. risk free bond using two factor trinomial tree for default intensity
References:
Interest Rate Models Theory and Practice by Damiano Brigo, Fabio Mercurio
Numerical Methods in Scientific Computing, Volume 1 by Germund Dahlquist, Åke Björck