aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/tests/test_yieldcurve.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/python/tests/test_yieldcurve.py b/python/tests/test_yieldcurve.py
index 8a684fda..b225e632 100644
--- a/python/tests/test_yieldcurve.py
+++ b/python/tests/test_yieldcurve.py
@@ -10,7 +10,8 @@ from quantlib.time.api import (
Unadjusted,
)
from quantlib.settings import Settings
-from serenitas.analytics.yieldcurve import YC
+from serenitas.analytics.yieldcurve import YC, USDMarkitYieldCurve
+import datetime
class TestYieldCurve(unittest.TestCase):
@@ -60,6 +61,12 @@ class TestYieldCurve(unittest.TestCase):
curve_df.append(curve.discount(term_date + 1))
self.assertListAlmostEqual(discounts, curve_df)
+ def test_new_yieldcurve(self):
+ evaluation_date = datetime.date(2021, 7, 14)
+ old_curve = YC(evaluation_date=evaluation_date)
+ new_curve = USDMarkitYieldCurve(evaluation_date)
+ self.assertEquals(old_curve.data, new_curve._yc.data)
+
if __name__ == "__main__":
unittest.main()