diff options
Diffstat (limited to 'python/analytics')
| -rw-r--r-- | python/analytics/basket_index.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/python/analytics/basket_index.py b/python/analytics/basket_index.py index 612fb733..6e4ec262 100644 --- a/python/analytics/basket_index.py +++ b/python/analytics/basket_index.py @@ -8,13 +8,14 @@ from pyisda.date import previous_twentieth from typing import List from yieldcurve import get_curve import datetime +import logging import numpy as np import pandas as pd from math import exp from scipy.optimize import brentq from pandas.tseries.offsets import Day, BDay - +logger = logging.getLogger(__name__) def make_index(t, d, args): instance = t.__new__(t) @@ -261,7 +262,7 @@ class BasketIndex(CreditIndex): else: break else: - print(f"couldn't calibrate for date: {self.value_date} and maturity: {m}") + logger.warning(f"couldn't calibrate for date: {self.value_date} and maturity: {m}") self.tweaks.append(np.NaN) continue self.tweaks.append(eps) |
