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.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/python/analytics/index_data.py b/python/analytics/index_data.py
index 8c769a03..9fcdfea3 100644
--- a/python/analytics/index_data.py
+++ b/python/analytics/index_data.py
@@ -152,13 +152,13 @@ def get_singlenames_quotes(indexname, date, tenors):
return list(r)
-def build_curve(r, tenors, currency="USD"):
+def build_curve(r, tenors):
if r['date'] is None:
raise ValueError(f"Curve for {r['cds_ticker']} is missing")
spread_curve = 1e-4 * np.array(r['spread_curve'], dtype='float')
upfront_curve = 1e-2 * np.array(r['upfront_curve'], dtype='float')
recovery_curve = np.array(r['recovery_curve'], dtype='float')
- yc = get_curve(r['date'], currency)
+ yc = get_curve(r['date'], r['currency'])
try:
sc = SpreadCurve(r['date'], yc, None, None, None,
tenors, spread_curve, upfront_curve, recovery_curve,
@@ -186,8 +186,7 @@ def build_curves_dist(quotes, args, workers=4):
def _get_singlenames_curves(index_type, series, trade_date, tenors):
sn_quotes = get_singlenames_quotes(f"{index_type.lower()}{series}",
trade_date, tenors)
- currency = "EUR" if index_type in ["XO", "EU"] else "USD"
- args = (np.array(tenors), currency)
+ args = (np.array(tenors),)
return build_curves_dist(sn_quotes, args)