Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

End of Month (EOM) Rule Overrides Convention Rule in QuantLib Schedule #2141

Open
Pranayxx07 opened this issue Jan 22, 2025 · 1 comment
Open

Comments

@Pranayxx07
Copy link

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)]

Even though I have specified ql.Following for the date adjustment convention, the schedule generates a date of 30 March 2020 instead of the expected 1 April 2020. Given the holiday on 31 March 2020 and the End-of-Month (EOM) flag being set to True, I expected the date to roll forward to 1 April 2020.

Copy link

boring-cyborg bot commented Jan 22, 2025

Thanks for posting! It might take a while before we look at your issue, so don't worry if there seems to be no feedback. We'll get to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant