diff options
| author | Guillaume Horel <guillaume.horel@gmail.com> | 2018-04-11 17:09:54 -0400 |
|---|---|---|
| committer | Guillaume Horel <guillaume.horel@gmail.com> | 2018-04-11 17:09:54 -0400 |
| commit | bc8f89b531964965d57c14ef161f3ea786b935f0 (patch) | |
| tree | 65622e58fbf0ea7b2b3e21aa4d9ddda4d114312a | |
| parent | 1085fbf6750adf025c3278bb3892db056454a799 (diff) | |
| download | pyisda-bc8f89b531964965d57c14ef161f3ea786b935f0.tar.gz | |
serialize tradedate
| -rw-r--r-- | pyisda/credit_index.pyx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/pyisda/credit_index.pyx b/pyisda/credit_index.pyx index dabed20..d527749 100644 --- a/pyisda/credit_index.pyx +++ b/pyisda/credit_index.pyx @@ -199,7 +199,8 @@ cdef class CurveList: # return copy def __reduce__(self): - return (self.__class__, (self.curves, self.weights)) + return (self.__class__, (self.curves, self.weights, + TDate_to_pydate(self.base_date))) @cython.auto_pickle(False) cdef class CreditIndex(CurveList): @@ -260,7 +261,8 @@ cdef class CreditIndex(CurveList): def __reduce__(self): return (self.__class__, - (TDate_to_pydate(self.start_date), self.maturities, self.curves, self.weights)) + (TDate_to_pydate(self.start_date), self.maturities, self.curves, + self.weights, TDate_to_pydate(self.base_date))) def __hash__(self): cdef: |
