BDE 4.14.0 Production release
|
Provide stateless functions for ISDA 30/360 eom convention.
This component provides a struct
, bbldc::TerminatedIsda30360Eom
, that serves as a namespace for defining a suite of date-related functions used to compute the day count and year fraction between two dates as prescribed by the International Swaps and Derivatives Association (ISDA) 30/360 day-count convention with end-of-month (eom) adjustments. In this day-count convention (also known as "30E/360
ISDA"), each year is assumed to have 12 months and 360 days, with each month consisting of exactly 30 days. Special end-of-month rule adjustments are made to account for the last day of February. Note that in this day-count convention, the second date may or may not be adjusted depending on the termination date (e.g., maturity date).
Given beginDate
and endDate
, let:
Reference: http://www.isda.org/c_and_a/docs/30-360-2006ISDADefs.xls (tab labeled "30E-360 ISDA")
The year fraction is simply the day count divided by 360.
This section illustrates intended use of this component.
The following snippets of code illustrate how to use bbldc::TerminatedIsda30360Eom
methods. First, create two bdlt::Date
variables, d1
and d2
:
Then, compute the day count between the two dates:
Finally, compute the year fraction between the two dates: