Hi,
I’m getting an error when trying to build a swap, with a roll date of 29 or 30, where February is a scheduled month.
“FAIL: Date ‘2015-02-28’ does not match roll convention ‘Day30’ when starting to roll forwards”
I’m not clear on the rules for MODFOLLOW here. Feb 27 is the last business day, though I think the accrual schedule needs to be built with unadjusted dates, to avoid stub problems.
I’ve come up short on any reference that talks about the interaction of roll and bus day adjustments.
Thanks for any help,
Ken.
Our documentation for schedules is here, and we can expand it if it is incomplete.
The rules of the schedule generator are that dates are calculated unadjusted. When a roll convention applies, and there is no stub convention or explicit stub dates, the start and end dates are expected to match the roll convention. Thus, specifying a roll convention of ‘Day30’ would require both the start and end date to be on the 30th of the month. If the start or end month is February, then you would need to specify a stub to get it to work (by setting the stub convention).
I don’t think the MODFOLLOW part is relevent. The business day adjustments are applied after the generation of unadjusted dates.
Can you say where the data is coming from? Is it a standard FpML document, or just a test example? The reason I ask is because it could be argued that February 28th does match the ‘Day30’ roll convention, as it is one of the possible valid outputs when in the middle of rolling. (As such, it may be a good idea to allow this case without setting a stub)
I’m trying to replicate the future flows for an existing trade (real, LCH cleared), using the last coupon dates as leg effective dates. I have adjusted coupon dates to work with, and need to unadjust them – for a Day30, and a last adjusted coupon of Feb 27, am trying to use Feb 28.
Do I need to create a stub to replicate the trade, even if it’s in the middle of the pre-existing schedule? If so, for this one, as there’s no Feb 30th, is that a LONG_INITIAL stub if I use Feb 28?
If February is in the middle of a schedule, then ‘Day30’ roll convention should work just fine. eg. from January 30th to April 30th using ‘Day30’ would give Jan 30, Feb 28, Mar 30, Apr 30 (all unadjusted).
If February is at the start of a schedule, then there is a problem, and you’d have to have a stub with the current code. That would yield Feb 28, Mar 30, Apr 30. I’ve tested it, and both a SHORT_INITIAL or a LONG_INITIAL stub produce the same output in this case, which is a bit of a bug anyway.
There is a Java FX GUI - ScheduleGui
- in the examples package which you can use to test this out quickly.
I’ve made a change here so no stub convention is needed. It is an edge case, but the change seems justfied: https://github.com/OpenGamma/Strata/pull/519
thanks
Thanks – the stub worked for me. When I get a chance I’ll try the change. FYI I had approx 10 of these in a portfolio of several thousand swaps.