diff options
| author | Guillaume Horel <guillaume.horel@gmail.com> | 2023-02-21 16:02:29 -0500 |
|---|---|---|
| committer | Guillaume Horel <guillaume.horel@gmail.com> | 2023-02-21 16:02:29 -0500 |
| commit | c83f99c7ba776a5a99def4d9e5ff81f75643d30e (patch) | |
| tree | c27085975e251d1246c38a23c7da26fda06ec11f | |
| parent | fe6d1bc02d560819be454a431739c718e9f68cc0 (diff) | |
| download | pyisda-c83f99c7ba776a5a99def4d9e5ff81f75643d30e.tar.gz | |
check for possible empty curve (happens in jtd calc)
| -rw-r--r-- | pyisda/credit_index.pyx | 3 |
1 files changed, 2 insertions, 1 deletions
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 |
