How End-of-Month Conventions Affect QuantLib Date Tenors
Summary
The end-of-month Boolean in QuantLib date helpers determines how a tenor is added when a start date falls at month end. With the rule enabled, adding one month to June 30 produces July 31; with it disabled, the resulting date is July 30. This convention can therefore change instrument dates and, in turn, the dates used in yield-curve construction. The appropriate setting depends on the relevant market convention. The answer gives US Treasury instruments as an example where the rule is enabled, while noting that many swap markets use it disabled. The material clarifies the purpose of the flag but does not answer the original question about whether the helper input should be the market data date or a settlement-adjusted date. Users should follow the conventions for the instruments being modeled.
Key ideas
- The end-of-month flag controls whether a month tenor preserves a month-end date.
- With the rule enabled, June 30 plus one month lands on July 31.
- With the rule disabled, the same tenor lands on July 30.
- The correct setting depends on the market convention for the instrument.
Tags
Full text
# Quantlib endOfMonth bool # Quantlib endOfMonth bool my question is two fold and if the legend Luigi answers this question it would make my day. - what is the purpose of this endofMonth boolean in the depoit or fra or swap helper functions. - what is the correct input to this function when creating yield curves. is it passing in the date of the data t or t+2? ## Answer by Helin (score 5, accepted) https://quant.stackexchange.com/a/68658 Consider an effective start date of June 30, 2021, and you want to add a tenor of "1-month" to it. Should it be July 30, 2021 or July 31, 2021? This is where the "end-of-month rule" is needed. If end-of-month rule is `true`, then 1-month later is July 31, 2021; otherwise, 1-month later is July 30, 2021. Whether it should be `true` or `false` depends on the market. The US Treasury market uses `true` as its convention, but many swap markets use `false`.
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.