summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Horel <guillaume.horel@gmail.com>2018-06-25 16:34:28 -0400
committerGuillaume Horel <guillaume.horel@gmail.com>2018-06-25 16:34:43 -0400
commit3811cfd135fcde317dc5d622ac54ee2ca45990f9 (patch)
treed74297656e875590de122cfc95415c5259c87754
parent64c2d3f8b5cb4fd7dead9d07050b4df73fb7892f (diff)
downloadpyisda-3811cfd135fcde317dc5d622ac54ee2ca45990f9.tar.gz
add end_date property
-rw-r--r--pyisda/legs.pyx8
1 files 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.