diff options
Diffstat (limited to 'python/analytics')
| -rw-r--r-- | python/analytics/basket_index.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/python/analytics/basket_index.py b/python/analytics/basket_index.py index cf865033..6517b632 100644 --- a/python/analytics/basket_index.py +++ b/python/analytics/basket_index.py @@ -410,6 +410,11 @@ class BasketIndex(CreditIndex): recov, ) + def jump_to_default(self): + pvs = self.pv_vec().swaplevel(axis=1) + pvs = pvs.protection_pv - pvs.duration * np.array(self.coupons) + return -self.weights[:, None] * (self.recovery_rates[:, None] + pvs - 1) + class MarkitBasketIndex(BasketIndex): def __init__( |
