summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pyisda/credit_index.pyx7
1 files changed, 3 insertions, 4 deletions
diff --git a/pyisda/credit_index.pyx b/pyisda/credit_index.pyx
index b2c8913..8d2bf34 100644
--- a/pyisda/credit_index.pyx
+++ b/pyisda/credit_index.pyx
@@ -162,7 +162,7 @@ cdef class CurveList:
sc.ticker = p.first
sc.recovery_rates = self.recovery_rates[p.second]
sc.defaulted = self.defaulted[p.second]
- r.append(sc)
+ r.append((self._weights[p.second], sc))
return r
@curves.setter
@@ -199,8 +199,7 @@ cdef class CurveList:
# return copy
def __reduce__(self):
- return (self.__class__, (self.curves, self.weights,
- TDate_to_pydate(self.base_date)))
+ return (self.__class__, (self.curves, TDate_to_pydate(self.base_date)))
@cython.auto_pickle(False)
cdef class CreditIndex(CurveList):
@@ -261,7 +260,7 @@ 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.base_date)))
+ TDate_to_pydate(self.base_date)))
def __hash__(self):
cdef: