quantlib.time.calendars.null_calendar.

NullCalendar

class NullCalendar

Bases: Calendar

Calendar for reproducing theoretical calculations.

This calendar has no holidays. It ensures that dates at whole-month distances have the same day of month.

Attributes:
name

name of the calendar

Methods

add_holiday(self, Date holiday)

Adds a date to the set of holidays for the given calendar.

adjust(self, Date given_date, ...)

Adjusts a non-business day to the appropriate near business day with respect to the given convention.

advance(self, Date given_date, int step=0, ...)

Advances the given date by the given number of business days or period.

business_day_list(self, Date from_date, ...)

Returns a list of business days between two dates.

business_days_between(self, Date date1, ...)

Returns the number of business days between two dates.

end_of_month(self, Date current_date)

Returns the last business day of the month to which the given date belongs.

holiday_list(self, Date from_date, ...)

Returns a list of holidays between two dates.

is_business_day(self, Date test_date)

Returns True if the date is a business day for the given market.

is_end_of_month(self, Date test_date)

Returns True if the date is the last business day of the month in the given market.

is_holiday(self, Date test_date)

Returns True if the date is a holiday for the given market.

is_weekend(self, int week_day)

Returns True if the weekday is part of the weekend for the given market.

remove_holiday(self, Date holiday)

Removes a date from the set of holidays for the given calendar.