openseries.holiday_calendar
- openseries.holiday_calendar(startyear, endyear, countries='SE', markets=None, custom_holidays=None)[source]
Generate a business calendar.
- Parameters:
startyear (int) – First year in date range generated.
endyear (int) – Last year in date range generated.
countries (CountriesType) – (List of) country code(s) according to ISO 3166-1 alpha-2. Defaults to “SE”.
markets (list[str] | str | None) – (List of) markets code(s) supported by exchange_calendars.
custom_holidays (list[str] | str | None) – Argument where missing holidays can be added.
- Returns:
Generate a business calendar.
- Raises:
CountriesNotStringNorListStrError – If
countriesis not a supported ISO 3166-1 alpha-2 string or a list of such strings.- Return type:
busdaycalendar