http://quantlib.414.s1.nabble.com/Ex-coupon-adjustment-based-on-unadjusted-coupon-dates-tp18430.html
Hi all,
In South Africa, bond settlement is T+3 trading days and the ex-coupon period is 10 calendar days from the UNadjusted coupon payment date.
So for a trade date of 2017-06-30 the settlement date is 2017-07-05 (over a weekend).
One specific bond, the R207, has a coupon payable on 2017-07-15 (a Saturday), which is adjusted to Monday (BDC = Following).
The correct ex-coupon date should be 2017-07-15 - 10 calendar days = 2017-07-05, which means on the trade date of 2017-06-30 that coupon was already ex.
However, I see in fixedratecoupon.cpp, line 154+ that the ex-coupon date is calculated based on the adjusted coupon payment date (line 166).
Unless there is a better alternative, I'd like to add a parameter to the ex-coupon details to enable the calculation of the ex-coupon date based on the UNadjusted coupon payment date. If you are happy with this, I'll submit a PR, but I just wanted to confirm with you first.
thanks