From 3811cfd135fcde317dc5d622ac54ee2ca45990f9 Mon Sep 17 00:00:00 2001 From: Guillaume Horel Date: Mon, 25 Jun 2018 16:34:28 -0400 Subject: add end_date property --- pyisda/legs.pyx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pyisda/legs.pyx b/pyisda/legs.pyx index 5b15cc8..fa82629 100644 --- a/pyisda/legs.pyx +++ b/pyisda/legs.pyx @@ -43,9 +43,13 @@ cdef class ContingentLeg: self._thisptr.endDate, self._thisptr.notional, self._thisptr.protectStart)) + + @property + def end_date(self): + return TDate_to_pydate(self._thisptr.endDate) - def pv(self, today, step_in_date, value_date, YieldCurve yc, SpreadCurve sc, - double recovery_rate): + def pv(self, today, step_in_date, value_date, YieldCurve yc not None, + SpreadCurve sc not None, double recovery_rate): """ Present Value of the ContingentLeg cashflows. -- cgit v1.2.3-70-g09d2