File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change 1- from __future__ import division
2- from __future__ import print_function
3-
41import unittest
52
63from quantlib .models .shortrate .onefactormodels .hullwhite import HullWhite
@@ -59,7 +56,7 @@ def test_hull_white_calibration(self):
5956 )
6057 )
6158
62- model = HullWhite (yield_ts , a = 0.05 , sigma = .005 )
59+ model = HullWhite (yield_ts , a = 0.1 , sigma = .01 )
6360
6461 data = [[1 , 5 , 0.1148 ],
6562 [2 , 4 , 0.1108 ],
@@ -93,9 +90,8 @@ def test_hull_white_calibration(self):
9390 print ('Hull White calibrated parameters:\n a: %f sigma: %f' %
9491 (model .a , model .sigma ))
9592
96- cached_a = 0.0464041
97- cached_sigma = 0.00579912
98-
93+ cached_a = 0.04603
94+ cached_sigma = 0.005779
9995 tolerance = 1.0e-5
10096
10197 self .assertAlmostEqual (cached_a , model .a , delta = tolerance )
You can’t perform that action at this time.
0 commit comments