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 195b43da..e28b2db2 100644
--- a/python/analytics/tranche_basket.py
+++ b/python/analytics/tranche_basket.py
@@ -880,7 +880,10 @@ class TrancheBasket(BasketIndex):
self.curves = [
(w, c) if c.ticker != curve.ticker else (w, None) for w, c in curves
]
- L = (1 - curve.recovery_rates[0]) * weight * orig_factor
+ if zero_recovery:
+ L = weight * orig_factor
+ else:
+ L = (1 - curve.recovery_rates[0]) * weight * orig_factor
self._cumloss = orig_cumloss + L
self._factor = orig_factor * (1 - weight)
self.K = adjust_attachments(self.K_orig, self.cumloss, self.factor)