diff options
| -rw-r--r-- | python/tests/test_dates.py | 4 | ||||
| -rw-r--r-- | python/tests/test_upfront_cds.py | 12 | ||||
| -rw-r--r-- | python/tests/test_yieldcurve.py | 4 |
3 files changed, 10 insertions, 10 deletions
diff --git a/python/tests/test_dates.py b/python/tests/test_dates.py index 8f781e3b..556aa33d 100644 --- a/python/tests/test_dates.py +++ b/python/tests/test_dates.py @@ -192,7 +192,7 @@ class TestHolidays(unittest.TestCase): True, 1.0, 1.0, - cal="/usr/share/cds/US", + cal="/usr/share/cds/NYM", ) def test_juneteenth(self): @@ -200,7 +200,7 @@ class TestHolidays(unittest.TestCase): def test_previous_twentwieth(self): self.assertEqual( - previous_twentieth(datetime.date(2022, 7, 22), cal="/usr/share/cds/US"), + previous_twentieth(datetime.date(2022, 7, 22), cal="/usr/share/cds/NYM"), datetime.date(2022, 6, 21), ) diff --git a/python/tests/test_upfront_cds.py b/python/tests/test_upfront_cds.py index ebc5cddb..1ad88ccd 100644 --- a/python/tests/test_upfront_cds.py +++ b/python/tests/test_upfront_cds.py @@ -11,7 +11,7 @@ from quantlib.time.api import ( Following, Unadjusted, Schedule, - Rule, + DateGeneration, ) from quantlib.instruments.api import CreditDefaultSwap, Side from quantlib.pricingengines.credit.isda_cds_engine import ( @@ -45,7 +45,7 @@ def snac_pv(spread, term_date, fixed_coupon=0.01, recovery=0.4, ts=YC()): calendar, Quarterly, Following, - Rule.CDS, + DateGeneration.CDS, Actual360(), recovery, ts, @@ -79,10 +79,10 @@ def snac_pv(spread, term_date, fixed_coupon=0.01, recovery=0.4, ts=YC()): calendar, Following, Unadjusted, - Rule.CDS, + DateGeneration.CDS, ) cds_trade = CreditDefaultSwap( - Side.BUYER, + Side.Buyer, 100, fixed_coupon, cds_schedule, @@ -142,10 +142,10 @@ if __name__ == "__main__": WeekendsOnly(), Following, Unadjusted, - Rule.CDS, + DateGeneration.CDS, ) cds_trade = CreditDefaultSwap.from_upfront( - Side.BUYER, + Side.Buyer, 10000000, 0.0, 0.01, diff --git a/python/tests/test_yieldcurve.py b/python/tests/test_yieldcurve.py index ef1c3169..1331beee 100644 --- a/python/tests/test_yieldcurve.py +++ b/python/tests/test_yieldcurve.py @@ -4,7 +4,7 @@ from quantlib.time.api import ( Period, Quarterly, Schedule, - Rule, + DateGeneration, WeekendsOnly, Following, Unadjusted, @@ -54,7 +54,7 @@ class TestYieldCurve(unittest.TestCase): WeekendsOnly(), Following, Unadjusted, - Rule.CDS2015, + DateGeneration.CDS2015, ) curve_df = [curve.discount(d) for d in cds_schedule[1:-1]] # last date is term_date+1 |
