aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/tests/test_swaption.py4
-rw-r--r--python/tests/test_yieldcurve.py5
2 files changed, 5 insertions, 4 deletions
diff --git a/python/tests/test_swaption.py b/python/tests/test_swaption.py
index bc71d012..4cd34093 100644
--- a/python/tests/test_swaption.py
+++ b/python/tests/test_swaption.py
@@ -67,14 +67,14 @@ class TestBreakeven(unittest.TestCase):
def test_hypayer(self):
payer = Swaption(self.hyindex, self.exercise_date, self.hystrike)
payer.sigma = .4
- payer.notional = 1e7
+ payer.notional = 100_000_000
self.assertAlmostEqual(payer.breakeven, 100.66971148766)
def test_hyreceiver(self):
receiver = Swaption(self.hyindex, self.exercise_date,
self.hystrike, "receiver")
receiver.sigma = .4
- receiver.notional = 1e7
+ receiver.notional = 100_000_000
self.assertAlmostEqual(receiver.breakeven, 103.9609977905)
def test_igpayer(self):
diff --git a/python/tests/test_yieldcurve.py b/python/tests/test_yieldcurve.py
index 5bf708e2..0a84ead8 100644
--- a/python/tests/test_yieldcurve.py
+++ b/python/tests/test_yieldcurve.py
@@ -24,8 +24,9 @@ class TestYieldCurve(unittest.TestCase):
settings.evaluation_date = Date(23, 6, 2016)
curve = YC()
term_date = Date(20, 6, 2021)
- cds_schedule = Schedule(settings.evaluation_date, term_date, Period(Quarterly),
- WeekendsOnly(), Following, Unadjusted, CDS)
+ cds_schedule = Schedule.from_effective_termination(
+ settings.evaluation_date, term_date, Period(Quarterly),
+ WeekendsOnly(), Following, Unadjusted, CDS)
curve_df = [curve.discount(d) for d in cds_schedule[1:-1]]
#last date is term_date+1
curve_df.append(curve.discount(term_date+1))