aboutsummaryrefslogtreecommitdiffstats
path: root/python/analytics
diff options
context:
space:
mode:
Diffstat (limited to 'python/analytics')
-rw-r--r--python/analytics/tranche_basket.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/python/analytics/tranche_basket.py b/python/analytics/tranche_basket.py
index e28b2db2..8765b1c0 100644
--- a/python/analytics/tranche_basket.py
+++ b/python/analytics/tranche_basket.py
@@ -18,6 +18,7 @@ from . import dawn_engine, serenitas_engine, serenitas_pool
from copy import deepcopy
from dateutil.relativedelta import relativedelta
from lru import LRU
+from math import log
from pyisda.date import cds_accrued
from scipy.optimize import brentq
from scipy.interpolate import CubicSpline, PchipInterpolator
@@ -868,7 +869,6 @@ class TrancheBasket(BasketIndex):
def jump_to_default(self, zero_recovery=False):
curves = self.curves
orig_factor, orig_cumloss = self.factor, self.cumloss
- el_orig = self.expected_loss()
orig_upfs = (
self.tranche_factors()
* self.tranche_pvs(protection=True, zero_recovery=zero_recovery).bond_price
@@ -1051,7 +1051,6 @@ class TrancheBasket(BasketIndex):
else:
index_short.cs = self.cs
if index_short.cs.empty:
- n_tranches = self.K_orig.shape[0]
return pd.DataFrame(
{"fwd_delta": np.nan, "fwd_gamma": np.nan}, index=self._row_names
)