When a SPGB bond has a maturity date which falls on a weekend for discounting purposes the maturity date is bumped to the next business day. This means
DiscountingFixedCouponBondProductPricer#dirtyPriceFromYieldStandard needs special handling to adjust pow on the final coupon period, the problem I have is how to get the next business day, specifically using ES0000012B39 as an example it matures on 2028-04-30 (Sunday) but the 2028-05-01 (Monday) is a bank holiday in the target calendar, so the date which needs to be used for this adjustment is 2028-05-02 (Tuesday).
Once a bond has been resolved it’s not possible to access
ReferenceData or a
HolidayCalendar instance so I am unsure how to best modify the existing code to expose this date. Should ResolvedFixedCouponBond have an additional property added to it? Or should ReferenceData be added to the method signature and the bond calendar exposed? I can’t come up with a clean way to effect this change.