aboutsummaryrefslogtreecommitdiffstats
path: root/python/analytics/tranche_basket.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/analytics/tranche_basket.py')
-rw-r--r--python/analytics/tranche_basket.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/python/analytics/tranche_basket.py b/python/analytics/tranche_basket.py
index c11798a8..58d09365 100644
--- a/python/analytics/tranche_basket.py
+++ b/python/analytics/tranche_basket.py
@@ -65,7 +65,10 @@ class TrancheBasket(BasketIndex):
def tranche_factors(self):
return np.diff(self.K) / np.diff(self.K_orig) * self.factor
- def _get_quotes(self):
+ def _get_quotes(self, spread=None):
+ if spread is not None:
+ return {self.maturity:
+ self._snacpv(spread * 1e-4, self.coupon(self.maturity), self.recovery)}
refprice = self.tranche_quotes.indexrefprice.iat[0]
refspread = self.tranche_quotes.indexrefspread.iat[0]
if refprice is not None: