summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Horel <guillaume.horel@gmail.com>2021-11-19 22:17:28 -0500
committerGuillaume Horel <guillaume.horel@gmail.com>2021-11-19 22:17:28 -0500
commitcacb1a063048d9cbdbf56814341f72857cf288b4 (patch)
treedc40eb3e9017e0d32b88bc53c516bfcf3f0d5f44
parentcf39918f495bf51e07320531daeef96be7bb077f (diff)
downloadpyisda-cacb1a063048d9cbdbf56814341f72857cf288b4.tar.gz
add zero_rate
-rw-r--r--pyisda/curve.pyx5
1 files changed, 5 insertions, 0 deletions
diff --git a/pyisda/curve.pyx b/pyisda/curve.pyx
index e3a6a04..7fff52b 100644
--- a/pyisda/curve.pyx
+++ b/pyisda/curve.pyx
@@ -239,6 +239,11 @@ cdef class Curve(object):
return JpmcdsForwardZeroPrice(curve, pydate_to_TDate(d1),
pydate_to_TDate(d2))
+ def zero_rate(self, d):
+ cdef:
+ const TCurve* curve = get_TCurve(self)
+ return JpmcdsZeroRate(curve, pydate_to_TDate(d))
+
cdef fArray_to_list(TRatePt* fArray, int fNumItems):
cdef size_t i
cdef list l = []