BDE 4.14.0 Production release
|
Provide stateless functions for the SIA-30/360-neom convention.
This component provides a struct
, bbldc::BasicSia30360Neom
, 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 Standard Industry Association (SIA) 30/360 no-end-of-month day-count convention. In this day-count convention (also known as "US
30/360 no-end-of-month" or just "30/360 no-end-of-month"), each year is assumed to have 12 months and 360 days, with each month consisting of exactly 30 days. No end-of-month rule adjustments are applied for the last day of any month (including February).
Given beginDate
and endDate
, let:
Reference: Standard Securities Calculation Methods (1996) ISBN 1-882936-01-9
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::BasicSia30360Neom
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: