diff options
| author | Guillaume Horel <guillaume.horel@serenitascapital.com> | 2016-08-08 11:45:34 -0400 |
|---|---|---|
| committer | Guillaume Horel <guillaume.horel@serenitascapital.com> | 2016-08-08 11:45:34 -0400 |
| commit | a1a6f286afffa881427e3d8b3b6071d5676b9c26 (patch) | |
| tree | 15c189ca4e9830d8e8ecb62e554cf145eac510f0 | |
| parent | 1ce5ac59f97510857114d015aeadc66604a7e240 (diff) | |
| download | pyisda-a1a6f286afffa881427e3d8b3b6071d5676b9c26.tar.gz | |
fix bug
| -rw-r--r-- | pyisda/curve.pyx | 3 |
1 files changed, 2 insertions, 1 deletions
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 = <TDate*>malloc(sizeof(TDate) * len(dates)) cdef size_t i cdef double* rates = <double*>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], <double>(yc._dates[i]-base_date_c)/365., <double>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], <double>1, dcc(day_count_conv)) return yc |
