diff options
Diffstat (limited to 'python/tests/test_swap_index.py')
| -rw-r--r-- | python/tests/test_swap_index.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/python/tests/test_swap_index.py b/python/tests/test_swap_index.py index f2816bac..c197559a 100644 --- a/python/tests/test_swap_index.py +++ b/python/tests/test_swap_index.py @@ -1,17 +1,21 @@ import unittest -import sys from quantlib.indexes.swap.usd_libor_swap import UsdLiborSwapIsdaFixAm from quantlib.time.api import Date, Period, Years -from yieldcurve import YC +from serenitas.analytics.yieldcurve import YC + class UsdLiborSwap(unittest.TestCase): def test_creation(self): yc = YC() yc.extrapolation = True - USISDA30 = UsdLiborSwapIsdaFixAm(Period(30, Years), forwarding=yc, discounting=yc) + USISDA30 = UsdLiborSwapIsdaFixAm( + Period(30, Years), forwarding=yc, discounting=yc + ) USISDA30.add_fixing(Date(25, 1, 2018), 0.02781) - USISDA02 = UsdLiborSwapIsdaFixAm(Period(2, Years), forwarding=yc, discounting=yc) + USISDA02 = UsdLiborSwapIsdaFixAm( + Period(2, Years), forwarding=yc, discounting=yc + ) USISDA02.add_fixing(Date(25, 1, 2018), 0.02283) USFS022 = USISDA02.underlying_swap(Date(27, 1, 2020)) USFS0230 = USISDA30.underlying_swap(Date(27, 1, 2020)) |
