aboutsummaryrefslogtreecommitdiffstats
path: root/python/tests/test_swaption.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/tests/test_swaption.py')
-rw-r--r--python/tests/test_swaption.py5
1 files changed, 3 insertions, 2 deletions
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)