Skip to content

Commit 8920ce1

Browse files
committed
fix tests
1 parent 68925f6 commit 8920ce1

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

test/test_hullwhite_model.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
from __future__ import division
2-
from __future__ import print_function
3-
41
import unittest
52

63
from 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:\na: %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)

0 commit comments

Comments
 (0)