summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pyisda/curve.pxd3
-rw-r--r--pyisda/curve.pyx2
2 files changed, 4 insertions, 1 deletions
diff --git a/pyisda/curve.pxd b/pyisda/curve.pxd
index c7362c0..e0bb094 100644
--- a/pyisda/curve.pxd
+++ b/pyisda/curve.pxd
@@ -193,6 +193,9 @@ cdef extern from "isda/cfinanci.h":
double yearFraction, # (I) See JpmcdsDayCountFraction
double basis, # (I) Basis for the rate
double *rate) nogil
+cdef extern from "isda/macros.h":
+ cdef double JPMCDS_MAX_RATE
+
cdef enum Basis:
CONTINUOUS = 5000
DISCOUNT_RATE = 512
diff --git a/pyisda/curve.pyx b/pyisda/curve.pyx
index f91a90c..6aa54a7 100644
--- a/pyisda/curve.pyx
+++ b/pyisda/curve.pyx
@@ -591,7 +591,7 @@ cdef class SpreadCurve(Curve):
<long>'M',
b'NONE')
else:
- rates = vector[double](n_dates, 1000)
+ rates = vector[double](n_dates, JPMCDS_MAX_RATE)
curve = JpmcdsMakeTCurve(today_c,
end_dates_c,
rates.data(),