Skip to content
All library documents

QuantLib Schedules: End-of-Month Dates Override the Following Convention

Article Quant Q&A · Author: Roshan Yadav

Summary

This exchange clarifies how QuantLib constructs a monthly schedule when end-of-month handling is enabled. The example starts and matures on month ends, uses forward date generation, and marks a date near the end of March as a holiday. Although the schedule specifies the Following business-day convention, the generated date remains at the prior month’s end rather than moving to the next business day.

The accepted answer confirms that enabling the end-of-month rule takes precedence in this case, so the Following convention is ignored for the schedule’s end-of-month dates. This is a narrow clarification about schedule generation, not a general discussion of all calendar adjustments or conventions. The example illustrates the behavior, but provides no broader comparison across schedule settings or evidence about other QuantLib date-generation configurations.

Key ideas

  • When end-of-month handling is enabled, QuantLib preserves end-of-month dates in the illustrated schedule.
  • In this case, the end-of-month rule takes precedence over the Following business-day convention.
  • The example demonstrates the behavior with a monthly schedule and a holiday near a month end.
  • The explanation is specific to the shown configuration and does not compare other schedule settings.

Tags

Full text
# Is End of Month (Eom) Rule overrides convention rule in Quantlib Schedule?


# Is End of Month (Eom) Rule overrides convention rule in Quantlib Schedule?












```
import QuantLib as ql

startdate = ql.Date(31,1,2020)
maturityDate = ql.Date(31,1,2021)
calendar = ql.NullCalendar()
tenor = ql.Period(ql.Monthly)

calendar.addHoliday(ql.Date(31,3,2020))

aschedule =ql.Schedule(startdate,maturityDate,tenor,calendar,ql.Following,ql.Unadjusted,ql.DateGeneration.Forward,True)

list(aschedule)
```

Output [Date(31,1,2020), Date(29,2,2020), Date(30,3,2020), Date(30,4,2020), Date(31,5,2020), Date(30,6,2020), Date(31,7,2020), Date(31,8,2020), Date(30,9,2020), Date(31,10,2020), Date(30,11,2020), Date(31,12,2020), Date(31,1,2021)]

> First I have added holiday on 31/03/2020 then I have passed ql.following to businessconvention but the date is shifted to 30/03/2020 instead of 01/04/2020. Is it overriding convention with EOM Rule?

## Answer by Luigi Ballabio (score 1, accepted)

https://quant.stackexchange.com/a/73869

Yes, it does. If you tell the function that you want end-of-month dates, that's what it will return. In that case, the Following convention is ignored.

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.