diff options
Diffstat (limited to 'python/tests/test_index.py')
| -rw-r--r-- | python/tests/test_index.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/python/tests/test_index.py b/python/tests/test_index.py index eaea83d6..18c639e2 100644 --- a/python/tests/test_index.py +++ b/python/tests/test_index.py @@ -16,9 +16,14 @@ class TestStrike(unittest.TestCase): index.spread = 75 exercise_date = datetime.date(2016, 8, 19) + def test_pv(self): + self.assertAlmostEqual(self.index.clean_pv, + g(self.index, self.index.spread, self.index.trade_date) * + self.index.notional) + def test_strike(self): """strike price equals clean_pv using expected forward yield curve""" - strike = g(self.index, self.index.spread, self.exercise_date, False) * self.index.notional + strike = g(self.index, self.index.spread, self.exercise_date) * 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) |
