diff options
Diffstat (limited to 'python')
| -rw-r--r-- | python/analytics/basket_index.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/python/analytics/basket_index.py b/python/analytics/basket_index.py index 8122fffb..78bacba0 100644 --- a/python/analytics/basket_index.py +++ b/python/analytics/basket_index.py @@ -207,6 +207,7 @@ class BasketIndex(CreditIndex): """ tweak the singlename curves to match index quotes""" quotes = self._get_quotes(*args) self.tweaks = [] + for m in self.maturities: if m not in quotes: self.tweaks.append(np.nan) @@ -215,6 +216,7 @@ class BasketIndex(CreditIndex): index_quote = quotes[m] if abs(self.pv(m) - index_quote) < 1e-12: # early exit self.tweaks.append(0.) + continue lo, hi = -0.3, 0.3 hi_tilde = exp(hi) - 1 while hi_tilde < 5: |
