Skip to content
All library documents

QuantLib Bond Schedules with Long Front Stubs and Month-End Dates

Article Quant Q&A · Author: user51725

Summary

The document explains a QuantLib schedule issue for a quarterly coupon bond with a long initial stub. A forward schedule anchored to the June stub date of June 30 continues using the 30th for later quarterly dates when end-of-month handling is disabled. Setting the end-of-month flag cannot solve the example because the issue date is March 26 rather than month-end.

The answer recommends building an explicit date list, potentially by generating a mock schedule from March 31 and removing the June stub, then supplying that list to the appropriate Schedule constructor. A separate reply notes that the cited dates are treated as business days by QuantLib’s United States calendar, so Modified Following does not move them. The guidance concerns schedule construction and calendar behavior; users should verify the intended conventions and holiday calendar for their bonds.

Key ideas

  • A schedule anchored on a June 30 stub can continue on the 30th when end-of-month handling is disabled.
  • The end-of-month option is unsuitable when the issue date is not itself month-end.
  • An explicit date list can represent the desired coupon schedule with a long initial stub.
  • Modified Following only adjusts dates recognized as non-business days by the selected calendar.

Tags

Full text
# question on QuantLib schedule to get bond coupon payment dates - python


# question on QuantLib schedule to get bond coupon payment dates - python












sorry the original question was answered by an expert but somehow I cannot edit the original question and add comments. so posting it again with some follow up questions: i have a number of bonds that I need to get coupon payment dates, an example is listed below: issue date is 2020-03-026, maturity date is 2020-09-30, and the bond pays coupon on quarterly basis. The first coupon date is 2020-06-30 so this has a long stub in the front.

the following code gives me

[Date(26,3,2020), Date(30,6,2020), Date(30,9,2020), Date(30,12,2020), Date(30,3,2021), Date(30,6,2021), Date(30,9,2021), Date(30,12,2021), Date(30,3,2022), Date(30,6,2022), Date(30,9,2022)]

however I expect to have that 3 highlighted to be 31st instead of 30th. 31Dec2021 is US holiday so it should stay as 30th Dec when using modified following. any suggestions on how to solve this? endOfMonth cannot be used here since the issue date 26th March is not end of month.

```
schedule = ql.Schedule(
ql.Date('26-03-2020', '%d-%m-%Y'),
ql.Date('30-09-2022', '%d-%m-%Y'),
ql.Period("3m"),
ql.UnitedStates(),
ql.ModifiedFollowing,
ql.ModifiedFollowing,
ql.DateGeneration.Forward,
False,
ql.Date('30-06-2020', '%d-%m-%Y'))
```

## Answer by Luigi Ballabio (score 2)

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

With end-of-month set to `False`, the schedule doesn't even try to hit the 31st; it starts from a stub on the 30th, so it uses the 30th of the month for all other dates.

Unfortunately, as you say, you can't set end-of-month to `True` in this case; so you'll probably have to use the `Schedule` constructor that takes an explicit list of dates (you can generate them by starting a mock schedule on March 31st and removing the June stub). In Python, the constructor can also take a number of other parameters: this will enable bonds and other instruments to use the schedule correctly. You can see the full signature here.

## Answer by ql.user2511 (score 0)

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

These dates are not included as US holidays in QuantLib's United States calendar. They are considered as business days.

```
import QuantLib as ql
print(ql.UnitedStates().isBusinessDay(ql.Date(31, 12, 2020)))
print(ql.UnitedStates().isBusinessDay(ql.Date(30, 3, 2021)))
print(ql.UnitedStates().isBusinessDay(ql.Date(30, 3, 2022)))
```

The above lines check if the 31st December 2020, the 30th March 2021, and the 30th March 2022 are business days, and the returns are:

> True

> True

> True

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.