aboutsummaryrefslogtreecommitdiffstats
path: root/python/analytics
diff options
context:
space:
mode:
Diffstat (limited to 'python/analytics')
-rw-r--r--python/analytics/basket_index.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/python/analytics/basket_index.py b/python/analytics/basket_index.py
index 5ad27574..6f72731a 100644
--- a/python/analytics/basket_index.py
+++ b/python/analytics/basket_index.py
@@ -322,7 +322,7 @@ class BasketIndex(CreditIndex):
self.tweaks = []
for m in self.maturities:
- if m not in quotes:
+ if np.isnan(quotes.get(m, np.nan)):
self.tweaks.append(np.nan)
continue
else:
@@ -401,6 +401,7 @@ class MarkitBasketIndex(BasketIndex):
)[["close_price", "id"]]
.groupby(level=["date", "tenor"], as_index=True)
.nth(0)
+ .dropna()
)
self.index_quotes.close_price = 1 - self.index_quotes.close_price / 100