diff options
Diffstat (limited to 'python/analytics/index.py')
| -rw-r--r-- | python/analytics/index.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/python/analytics/index.py b/python/analytics/index.py index 9504451a..b4805df2 100644 --- a/python/analytics/index.py +++ b/python/analytics/index.py @@ -12,6 +12,9 @@ except ModuleNotFoundError: pass from pandas.tseries.offsets import BDay from pyisda.curve import SpreadCurve +from pyisda.date import previous_twentieth +from termcolor import colored +from .utils import build_table def g(index, spread, exercise_date, pv=None): @@ -114,7 +117,12 @@ class CreditIndex(CreditDefaultSwap): else: recovery = 0.3 if index_type == "HY" else 0.4 super().__init__( - value_date, maturity, recovery, coupon, notional, df.issue_date[0] + previous_twentieth(value_date), + maturity, + recovery, + coupon, + notional, + df.issue_date[0], ) self._quote_is_price = index_type == "HY" self._indic = tuple( |
