Crate cal_calc

Source
Expand description

Implementation of (bank) holidays. Calendars are required to verify whether an exchange is open or if a certain cash flow could be settled on a specific day. They are also needed to calculate the amount of business days between to given dates. Because of the settlement rules, bank holidays have an impact on how to rollout cash flows from fixed income products. The approach taken here is to define a set of rules to determine bank holidays. From this set of rules, a calendar is generated by calculating all bank holidays within a given range of years for fast access.

Structs§

Calendar
Calendar for arbitrary complex holiday rules
SimpleCalendar

Enums§

CalendarError
Error class for calendar calculation
Holiday
NthWeek
Specifies the nth week of a month

Traits§

CalendarProvider

Functions§

is_leap_year
Returns true if the specified year is a leap year (i.e. Feb 29th exists for this year)
last_day_of_month
Calculate the last day of a given month in a given year
nok_holidays
target_holidays
uk_settlement_holidays
us_settlement_holidays