UnionCal#
- class rateslib.calendars.UnionCal(calendars, settlement_calendars)#
A calendar object for making date roll adjustment calculations, combining multiple calendars.
- Parameters:
calendars (list of Cal) – A list of Cal objects.
settlement_calendars – A list of Cal objects used only as associated settlement calendars.
Attributes Documentation
- holidays#
- week_mask#
See also
Cal
: Base calendar object type.Methods Summary
add_bus_days
(date, days, settlement)Return a business date separated by days from an input business date.
add_days
(date, days, modifier, settlement)Return a date separated by calendar days from input date, and rolled with a modifier.
add_months
(date, months, modifier, roll, ...)Return a date separated by months from an input date, and rolled with a modifier.
bus_date_range
(start, end)Return a list of business dates in a range.
cal_date_range
(start, end)Return a list of calendar dates in a range.
is_bus_day
(date)Return whether the date is a business day.
is_non_bus_day
(date)Return whether the date is not a business day.
is_settlement
(date)Return whether the date is a business day in an associated settlement calendar.
lag
(date, days, settlement)Adjust a date by a number of business days, under lag rules.
roll
(date, modifier, settlement)Adjust a non-business date to a business date under a specific modification rule.
to_json
()Return a JSON representation of the object.
Methods Documentation
- add_bus_days(date, days, settlement)#
Return a business date separated by days from an input business date.
See
Cal.add_bus_days
.
- add_days(date, days, modifier, settlement)#
Return a date separated by calendar days from input date, and rolled with a modifier.
See
Cal.add_days
.
- add_months(date, months, modifier, roll, settlement)#
Return a date separated by months from an input date, and rolled with a modifier.
See
Cal.add_months
.
- bus_date_range(start, end)#
Return a list of business dates in a range.
See
Cal.bus_date_range
.
- cal_date_range(start, end)#
Return a list of calendar dates in a range.
See
Cal.cal_date_range
.
- is_bus_day(date)#
Return whether the date is a business day.
See
Cal.is_bus_day
.
- is_non_bus_day(date)#
Return whether the date is not a business day.
See
Cal.is_non_bus_day
.
- is_settlement(date)#
Return whether the date is a business day in an associated settlement calendar.
If no such associated settlement calendar exists this will return True.
See
Cal.is_settlement
.
- lag(date, days, settlement)#
Adjust a date by a number of business days, under lag rules.
See
Cal.lag
.
- roll(date, modifier, settlement)#
Adjust a non-business date to a business date under a specific modification rule.
See
Cal.roll
.
- to_json()#
Return a JSON representation of the object.
- Return type:
str