aboutsummaryrefslogtreecommitdiffstats
path: root/python/analytics/index_data.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/analytics/index_data.py')
-rw-r--r--python/analytics/index_data.py10
1 files changed, 3 insertions, 7 deletions
diff --git a/python/analytics/index_data.py b/python/analytics/index_data.py
index c59ea23a..9a68f3d5 100644
--- a/python/analytics/index_data.py
+++ b/python/analytics/index_data.py
@@ -151,11 +151,10 @@ def get_singlenames_quotes(indexname, date):
return list(c)
-def build_curve(r, tenors, currency="USD", recovery_curve=None):
+def build_curve(r, tenors, currency="USD"):
spread_curve = 1e-4 * np.array(r['spread_curve'], dtype='float')
upfront_curve = 1e-2 * np.array(r['upfront_curve'], dtype='float')
- if recovery_curve is None:
- recovery_curve = np.array(r['recovery_curve'], dtype='float')
+ recovery_curve = np.array(r['recovery_curve'], dtype='float')
yc = get_curve(r['date'], currency)
try:
sc = SpreadCurve(r['date'], yc, None, None, None,
@@ -184,10 +183,7 @@ def _get_singlenames_curves(index_type, series, trade_date, tenors):
sn_quotes = get_singlenames_quotes(f"{index_type.lower()}{series}",
trade_date)
currency = "EUR" if index_type in ["XO", "EU"] else "USD"
- # we strip curves with a fixed recovery rate
- # need to figure out how to do it right
- recovery = np.full(len(tenors), 0.3) if index_type == "HY" else np.full(len(tenors), 0.4)
- args = (np.array(tenors), currency, recovery)
+ args = (np.array(tenors), currency)
return build_curves_dist(sn_quotes, args)