aboutsummaryrefslogtreecommitdiffstats
path: root/python/analytics/basket_index.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/analytics/basket_index.py')
-rw-r--r--python/analytics/basket_index.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/python/analytics/basket_index.py b/python/analytics/basket_index.py
index bbdec164..84286843 100644
--- a/python/analytics/basket_index.py
+++ b/python/analytics/basket_index.py
@@ -404,14 +404,13 @@ class MarkitBasketIndex(BasketIndex):
get_index_quotes(
index_type, series, tenors, years=None, remove_holidays=False
)[["close_price", "id"]]
- .groupby(level=["date", "tenor"], as_index=True)
- .nth(0)
+ .reset_index(level=["index", "series"], drop=True)
.dropna()
)
self.index_quotes.close_price = 1 - self.index_quotes.close_price / 100
def _get_quotes(self):
- quotes = self.index_quotes.loc[self.value_date, "close_price"]
+ quotes = self.index_quotes.loc[(self.value_date, self.version), "close_price"]
return {self.tenors[t]: q for t, q in quotes.items()}