aboutsummaryrefslogtreecommitdiffstats
path: root/python/analytics
diff options
context:
space:
mode:
Diffstat (limited to 'python/analytics')
-rw-r--r--python/analytics/basket_index.py2
-rw-r--r--python/analytics/index_data.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/python/analytics/basket_index.py b/python/analytics/basket_index.py
index 0001a4e7..4d57f944 100644
--- a/python/analytics/basket_index.py
+++ b/python/analytics/basket_index.py
@@ -142,7 +142,7 @@ class BasketIndex(CreditIndex):
def recovery_rates(self):
# we don't always have the 6 months data point
# so pick arbitrarily the 1 year point
- return np.array([c.recovery_rates[1] for c in self.curves])
+ return np.array([c.recovery_rates[0] for _, c in self.curves])
def pv(self, maturity=None, epsilon=0., coupon=None):
if maturity is None:
diff --git a/python/analytics/index_data.py b/python/analytics/index_data.py
index 0d253f00..df96dbd3 100644
--- a/python/analytics/index_data.py
+++ b/python/analytics/index_data.py
@@ -166,7 +166,7 @@ def build_curve(r, tenors):
defaulted=r['event_date'])
except ValueError as e:
print(r[0], e)
- return None
+ return r['weight'], None
return r['weight'], sc