diff options
| author | Guillaume Horel <guillaume.horel@gmail.com> | 2023-12-06 15:19:42 -0500 |
|---|---|---|
| committer | Guillaume Horel <guillaume.horel@gmail.com> | 2023-12-06 15:20:17 -0500 |
| commit | 5dae9f5ef287051da68aebea342af3663bf97398 (patch) | |
| tree | 96c8e31259b783781095555a4352034aebd67359 | |
| parent | d1d925e0a38facd9fbd859aa9dd81f4df89ded0d (diff) | |
| download | pyisda-5dae9f5ef287051da68aebea342af3663bf97398.tar.gz | |
use index base_date instead of curve's own base date
| -rw-r--r-- | pyisda/credit_index.pyx | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/pyisda/credit_index.pyx b/pyisda/credit_index.pyx index b4a5277..9f56293 100644 --- a/pyisda/credit_index.pyx +++ b/pyisda/credit_index.pyx @@ -15,7 +15,8 @@ from .legs cimport (JpmcdsCdsContingentLegMake, JpmcdsCdsFeeLegMake, from .curve cimport (SpreadCurve, JpmcdsCopyCurve, tweak_curve, YieldCurve, JpmcdsFreeTCurve, survival_prob, Hash64WithSeed, Hash64, uint64_t, CurveName, - JpmcdsCdsParSpreads, name_offset_from_buf) + JpmcdsCdsParSpreads, name_offset_from_buf, DocClause, Seniority, + to_seniority, to_doc_clause) from .date cimport (pydate_to_TDate, TDate_to_pydate, JpmcdsDtFwdAny, TDateInterval, JpmcdsMakeDateInterval) from .cdsone cimport JpmcdsStringToStubMethod, TStubMethod @@ -442,7 +443,7 @@ cdef class CreditIndex(CurveList): else: for j in range(self._maturities.size()): JpmcdsContingentLegPV(self.contingent_legs[j], - sc.fBaseDate, + self.base_date, cash_settle_date_c, step_in_date_c, yc.get_TCurve(), @@ -450,7 +451,7 @@ cdef class CreditIndex(CurveList): recovery_rate, &cl_pv[i,j]) JpmcdsFeeLegPV(self.fee_legs[j], - sc.fBaseDate, + self.base_date, step_in_date_c, cash_settle_date_c, yc.get_TCurve(), @@ -596,7 +597,7 @@ cdef class CreditIndex(CurveList): r[i] = 0.0 else: JpmcdsContingentLegPV(legs_long.first, - curve.fBaseDate, + self.base_date, cash_settle_date_c, step_in_date_c, yc.get_TCurve(), @@ -604,7 +605,7 @@ cdef class CreditIndex(CurveList): deref(recovery_rate), &cl_pv_long) JpmcdsContingentLegPV(legs_short.first, - curve.fBaseDate, + self.base_date, cash_settle_date_c, step_in_date_c, yc.get_TCurve(), @@ -612,7 +613,7 @@ cdef class CreditIndex(CurveList): deref(recovery_rate), &cl_pv_short) JpmcdsFeeLegPV(legs_long.second, - curve.fBaseDate, + self.base_date, step_in_date_c, cash_settle_date_c, yc.get_TCurve(), @@ -620,7 +621,7 @@ cdef class CreditIndex(CurveList): True, &fl_pv_long) JpmcdsFeeLegPV(legs_short.second, - curve.fBaseDate, + self.base_date, step_in_date_c, cash_settle_date_c, yc.get_TCurve(), |
