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.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/python/analytics/basket_index.py b/python/analytics/basket_index.py
index de65d5cc..bcf3d17c 100644
--- a/python/analytics/basket_index.py
+++ b/python/analytics/basket_index.py
@@ -138,8 +138,8 @@ class BasketIndex(CreditIndex):
coupon = self.index_desc.coupon[maturity]
except KeyError:
raise ValueError("Non standard maturity: coupon must be provided")
- return CreditIndex.pv(self, self.step_in_date, self.cash_settle_date,
- maturity, self.yc, coupon, epsilon)
+ return super().pv(self.step_in_date, self.cash_settle_date, maturity,
+ self.yc, coupon, epsilon)
def coupon_leg(self, maturity=None):
return self.index_desc.coupon.values * self.duration()
@@ -149,10 +149,10 @@ class BasketIndex(CreditIndex):
def spread(self, maturity=None, coupon=None):
if maturity is None:
- return (self.index_desc.coupon.values + BasketIndex.pv(self) /
+ return (self.index_desc.coupon.values + self.pv() /
self.duration()) * 1e4
else:
- return (coupon + BasketIndex.pv(self, maturity, coupon=coupon) /
+ return (coupon + self.pv(maturity, coupon=coupon) /
self.duration(maturity)) * 1e4
def duration(self, maturity=None):