From a1a6f286afffa881427e3d8b3b6071d5676b9c26 Mon Sep 17 00:00:00 2001 From: Guillaume Horel Date: Mon, 8 Aug 2016 11:45:34 -0400 Subject: fix bug --- pyisda/curve.pyx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyisda/curve.pyx b/pyisda/curve.pyx index 46708ff..699666a 100644 --- a/pyisda/curve.pyx +++ b/pyisda/curve.pyx @@ -133,12 +133,13 @@ cdef class YieldCurve(Curve): yc._dates = malloc(sizeof(TDate) * len(dates)) cdef size_t i cdef double* rates = malloc(sizeof(double) * len(dfs)) + yc._ninstr = len(dates) for i, d in enumerate(dates): yc._dates[i] = pydate_to_TDate(d) JpmcdsDiscountToRateYearFrac(dfs[i], (yc._dates[i]-base_date_c)/365., 1, &rates[i]); - yc._thisptr = JpmcdsMakeTCurve(base_date_c, yc._dates, rates, len(dfs), + yc._thisptr = JpmcdsMakeTCurve(base_date_c, yc._dates, rates, dfs.shape[0], 1, dcc(day_count_conv)) return yc -- cgit v1.2.3-70-g09d2