From c83f99c7ba776a5a99def4d9e5ff81f75643d30e Mon Sep 17 00:00:00 2001 From: Guillaume Horel Date: Tue, 21 Feb 2023 16:02:29 -0500 Subject: check for possible empty curve (happens in jtd calc) --- pyisda/credit_index.pyx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyisda/credit_index.pyx b/pyisda/credit_index.pyx index 5797f45..b7f1d74 100644 --- a/pyisda/credit_index.pyx +++ b/pyisda/credit_index.pyx @@ -75,7 +75,8 @@ cdef class CurveList: else: if len(curves) >= 1: w, sc = curves[0] - self.base_date = sc.get_TCurve().fBaseDate + if sc is not None: + self.base_date = sc.get_TCurve().fBaseDate i = 0 cdef int n_skipped = 0 -- cgit v1.2.3-70-g09d2