diff options
Diffstat (limited to 'python/analytics/tranche_basket.py')
| -rw-r--r-- | python/analytics/tranche_basket.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/python/analytics/tranche_basket.py b/python/analytics/tranche_basket.py index f5b5d0a2..88cfbea0 100644 --- a/python/analytics/tranche_basket.py +++ b/python/analytics/tranche_basket.py @@ -954,13 +954,13 @@ class TrancheBasket(BasketIndex): if x == 0. or x == 1.: newrho = x else: - newrho = expit(index1._skew(log(x / el1))) + newrho = index1.skew(x) assert newrho >= 0. and newrho <= 1., f"Something went wrong x: {x}, rho: {newrho}" return self.expected_loss_trunc(x, rho=newrho) / el1 - \ index2.expected_loss_trunc(K2, newrho, shortened) / el2 def aux2(x, index1, index2, K2, shortened): - newrho = expit(index1._skew(log(x))) + newrho = index1.skew(x) assert newrho >= 0 and newrho <= 1, f"Something went wrong x: {x}, rho: {newrho}" return np.log(self.probability_trunc(x, newrho)) - \ np.log(index2.probability_trunc(K2, newrho, shortened)) @@ -995,4 +995,4 @@ class TrancheBasket(BasketIndex): # need to figure out a better way of setting the bounds moneyness1_eq.append(brentq(aux2, K2 * 0.1/el1, K2 * 2.5/el1, (self, index2, K2, shortened))) - return np.hstack([np.nan, expit(self._skew(np.log(moneyness1_eq))), np.nan]) + return np.hstack([np.nan, self.skew(moneyness1_eq), np.nan]) |
