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.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/python/analytics/basket_index.py b/python/analytics/basket_index.py
index 63cb66d0..0701e713 100644
--- a/python/analytics/basket_index.py
+++ b/python/analytics/basket_index.py
@@ -200,7 +200,12 @@ class BasketIndex(CreditIndex):
""" tweak the singlename curves to match index quotes"""
quotes = self._get_quotes(*args)
self.tweaks = []
- for m, index_quote in quotes.items():
+ for m in self.maturities:
+ if m not in quotes:
+ self.tweaks.append(np.nan)
+ continue
+ else:
+ index_quote = quotes[m]
lo, hi = -0.3, 0.3
hi_tilde = exp(hi) - 1
while hi_tilde < 5: