diff options
Diffstat (limited to 'python/analytics/tranche_functions.py')
| -rw-r--r-- | python/analytics/tranche_functions.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/python/analytics/tranche_functions.py b/python/analytics/tranche_functions.py index 3355a887..b72d4bba 100644 --- a/python/analytics/tranche_functions.py +++ b/python/analytics/tranche_functions.py @@ -455,6 +455,8 @@ def credit_schedule(tradedate, coupon, yc, enddate=None, tenor=None, rule=CDS201 sched = Schedule.from_rule( tradedate, enddate, Period("3M"), cal, ModifiedFollowing, Unadjusted, rule ) + if sched[1] == start_date: # we need to skip one date + sched = sched.after(start_date) payment_dates = [pydate_from_qldate(cal.adjust(d)) for d in sched if d > start_date] df = [yc.discount_factor(d) for d in payment_dates] coupons = [ |
