diff options
Diffstat (limited to 'python')
| -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 66f2657b..f264062a 100644 --- a/python/analytics/tranche_basket.py +++ b/python/analytics/tranche_basket.py @@ -261,7 +261,7 @@ class DualCorrTranche(): self.attach, self.attach)) if self.attach == 0: self.rho[1], = next(c) - elif self.attach == 100: + elif self.detach == 100: self.rho[0], = next(c) else: self.rho = np.array([corr for corr, in c]) @@ -291,10 +291,10 @@ class DualCorrTranche(): def _greek_calc(self): eps = 1e-4 - indexbp = [self.tranche_legs(1., 0.).bond_price] + indexbp = [self.tranche_legs(1., -1., 0.).bond_price] bp = [self.pv] for tweak in [eps, -eps, 2*eps]: - indexbp.append(self.tranche_legs(1., 0., tweak).bond_price) + indexbp.append(self.tranche_legs(1., -1., tweak).bond_price) bp.append(self._pv(tweak)) return {'indexbp': indexbp, 'bp': bp} |
