|
From: Javit H. <ch...@vi...> - 2010-07-30 05:49:49
|
I updated the generalized Hull White model and performed tests with QL-1.0.1. Tests are successful. For some reason calibration takes longer now. In the BermudanSwaption.cpp, I changed the optimization end criteria down to 40 and 10 from 400 and 100 for the max iteration and stationary iterations. This way, it takes shorter to calibrate. I attached the files. The changes: -- For some reason, parameter.hpp in QL-1.0.1 is not the same as trunk version 17224. The trunk version is the correct one except the line 145 : Parameter(times.size()+1, where the “+1” should go away. -- The changes in GHW classes are only at the lines where a PiecewiseConstantParameter class is initiated. The new parameter.hpp accepts constraints at the initialization. I imposed positive constraints for both the a_ and sigma_ parameters in the model. Here are my suggestions: -- Update the parameter.hpp in QL-1.0.1 as above. -- Update the GHW model files with the ones attached. -- The BermudanSwaption.cpp test file can be modified as the one I attached to include the GHW test in the test-suite. The BermudanSwaption.cpp output from my laptop is below. I look forward to your comments. Thank you, Javit G2 (analytic formulae) calibration 1x5: model 10.05475 %, market 11.48000 % (-1.42525 %) 2x4: model 10.48803 %, market 11.08000 % (-0.59197 %) 3x3: model 10.67504 %, market 10.70000 % (-0.02496 %) 4x2: model 10.83340 %, market 10.21000 % (+0.62340 %) 5x1: model 10.98264 %, market 10.00000 % (+0.98264 %) calibrated to: a = 0.099851, sigma = 0.010545 b = 0.099851, eta = 0.010545 rho = -0.74998 Hull-White (analytic formulae) calibration 1x5: model 11.87889 %, market 11.48000 % (+0.39889 %) 2x4: model 11.76594 %, market 11.08000 % (+0.68594 %) 3x3: model 11.87495 %, market 10.70000 % (+1.17495 %) 4x2: model 11.88579 %, market 10.21000 % (+1.67579 %) 5x1: model 11.85322 %, market 10.00000 % (+1.85322 %) calibrated to: a = 0.10014, sigma = 0.0076919 Hull-White (numerical) calibration 1x5: model 10.31044 %, market 11.48000 % (-1.16956 %) 2x4: model 10.50842 %, market 11.08000 % (-0.57158 %) 3x3: model 10.62836 %, market 10.70000 % (-0.07164 %) 4x2: model 10.71895 %, market 10.21000 % (+0.50895 %) 5x1: model 10.81202 %, market 10.00000 % (+0.81202 %) calibrated to: a = 0.10014, sigma = 0.006877 Black-Karasinski (numerical) calibration 1x5: model 12.85815 %, market 11.48000 % (+1.37815 %) 2x4: model 13.11871 %, market 11.08000 % (+2.03871 %) 3x3: model 13.25333 %, market 10.70000 % (+2.55333 %) 4x2: model 13.33942 %, market 10.21000 % (+3.12942 %) 5x1: model 13.43137 %, market 10.00000 % (+3.43137 %) calibrated to: a = 0.08249, sigma = 0.1667 Generalized Hull-White calibration 1x5: model 11.16996 %, market 11.48000 % (-0.31004 %) 2x4: model 11.15188 %, market 11.08000 % (+0.07188 %) 3x3: model 10.87750 %, market 10.70000 % (+0.17750 %) 4x2: model 10.42011 %, market 10.21000 % (+0.21011 %) 5x1: model 9.78110 %, market 10.00000 % (-0.21890 %) parameter[0] =, 0.04 parameter[1] =, 0.37449 parameter[2] =, 0.084144 parameter[3] =, 0.1 parameter[4] =, 0.24785 parameter[5] =, 0.053831 Payer bermudan swaption struck at 5.00000 % (ATM) Generalized HW: 14.515 G2: 14.549 HW: 15.005 HW (num): 13.404 BK: 16.457 Payer bermudan swaption struck at 6.00000 % (OTM) Generalized HW: 3.671 G2: 3.4158 HW: 3.6088 HW (num): 2.6985 BK: 5.6241 Payer bermudan swaption struck at 4.00000 % (ITM) Generalized HW: 42.622 G2: 42.838 HW: 43.154 HW (num): 42.52 BK: 42.998 Run completed in 15 m 31 s Press any key to continue . . . Alexander Lotter wrote: > > > > Javit Hafizoglu wrote: >> >> I'm relocating. Lots of things to do. I'm planning to finish this update >> by the end of June. >> >> > > Hi Javit, > > Great. I could assist you by tests. Just let me know, if you need any > help. > > Take care > > Alex > > http://old.nabble.com/file/p29303026/GHW.rar GHW.rar -- View this message in context: http://old.nabble.com/Generalized-Hull-White-model-problems-tp28647789p29303026.html Sent from the quantlib-dev mailing list archive at Nabble.com. |