diff options
Diffstat (limited to 'python/tests')
| -rw-r--r-- | python/tests/test_cds.py | 2 | ||||
| -rw-r--r-- | python/tests/test_swaption.py | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/python/tests/test_cds.py b/python/tests/test_cds.py index 28c22cc2..26ec809e 100644 --- a/python/tests/test_cds.py +++ b/python/tests/test_cds.py @@ -6,7 +6,7 @@ from quantlib.time.api import Date import sys sys.path.append('..') -from swaption import Index +from analytics import Index from yieldcurve import YC, ql_to_jp class TestUpfront(unittest.TestCase): diff --git a/python/tests/test_swaption.py b/python/tests/test_swaption.py index 1ff2f5ec..10c07249 100644 --- a/python/tests/test_swaption.py +++ b/python/tests/test_swaption.py @@ -7,7 +7,8 @@ import numpy as np import sys sys.path.append('..') -from swaption import Index, g +from analytics import Index +from analytics.option import g class TestStrike(unittest.TestCase): index = Index.from_name("ig", 26, "5yr", @@ -19,7 +20,7 @@ class TestStrike(unittest.TestCase): def test_strike(self): """ check if strike price is the same as computing the pv with the expected forward yield curve.""" - strike = g(self.index, self.index.spread, self.exercise_date) + strike = g(self.index, self.index.spread, self.exercise_date, False) * self.index.notional old_yc = self.index._yc self.index.trade_date = self.exercise_date self.index._yc = old_yc.expected_forward_curve(self.exercise_date) |
