quantlib

question about refDate and refPeriodStart/End


The Quantlib's Event class has referenceDate and Coupon class has referenceStartPeriod and referenceEndPeriod in addition to accrualStartDate and accrualEndDate. What is the real world scenario to use ref date and refPeriodStart/End?

I can follow the implementation but curious to know the real world use cases.


Solution

  • You're right, the refDate parameter passed to the Event::hasOccurred method probably shouldn't be called reference date; it's not a reference for anything. Calling event.hasOccurred(d) tells you whether or not the event has already occurred at date d. I don't have a better name for the parameter at this time; it's not necessarily an evaluation date either, because by calling the method I might be asking whether the event will have occurred in a year's time or whether it had occurred three months ago. Suggestions are welcome.

    In the Coupon class, the reference start and end are only used in the case the day-count convention is Act/Act(ISMA), since the latter requires a reference period in case of long or short coupons; you can find the details in this document from ISDA. In short, besides the start and end of the short/long coupon, the day-count algorithm also needs the start and end of a "regular" reference period. We're calling those refPeriodStart and refPeriodEnd.