For some bonds I work with the last coupon date is not equal to bond's maturity date. E.g. the last coupon date is April 25th, 2020 and maturity date is April 25th, 2021. I looked at Schedule class and MakeSchedule() and I don't see a clear way to reflect this. I feel it can't be that hard, though. Would appreciate if someone gives me a hint. Thank you!
You can obtain the desired effect by tweaking the bond construction.
For instance, let's say you're creating a 4-years bond with semiannual coupons paying 3%, but missing the last. This makes for 7 coupons. Instead, you'll create the schedule as usual (so you have 8 periods), but specify a null last coupon when creating the bond. So:
This will give you the correct price; the disadvantage is that you'll have a coupon paying 0%, which is less clean than having just the ones that actually exist. If this turns out to be a problem, you can inherit from
You can use the same trick for most kinds of bond; e.g., for floating-rate bonds you can cancel the last coupon by passing a null gearing.