diff options
| author | Guillaume Horel <guillaume.horel@gmail.com> | 2018-03-20 17:17:59 -0400 |
|---|---|---|
| committer | Guillaume Horel <guillaume.horel@gmail.com> | 2018-03-20 17:17:59 -0400 |
| commit | f749f287b8f73b66ee34d9101049fc0f3f94aa59 (patch) | |
| tree | 274851e16d6c19dd92c1086e1e2d5479df5a059f | |
| parent | 0bf22d5cdd35624345f0dadf78c5e3972ab10c10 (diff) | |
| download | pyisda-f749f287b8f73b66ee34d9101049fc0f3f94aa59.tar.gz | |
better output
| -rw-r--r-- | pyisda/credit_index.pyx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/pyisda/credit_index.pyx b/pyisda/credit_index.pyx index 1a63c26..5c5102d 100644 --- a/pyisda/credit_index.pyx +++ b/pyisda/credit_index.pyx @@ -348,14 +348,13 @@ cdef class CreditIndex(CurveList): &fl_pv[i,j]) i += 1 - return pd.concat({'duration': - pd.DataFrame(fl_pv, + return pd.concat([pd.DataFrame(fl_pv, columns=d.view('M8[D]'), index=tickers), - 'protection_pv': pd.DataFrame(cl_pv, columns=d.view('M8[D]'), - index=tickers)}) + index=tickers)], + keys=['duration', 'protection_pv']) def accrued(self): cdef double accrued FeeLegAI(self.fee_legs[0], self.base_date, &accrued) |
