openseries.date_offset_foll

openseries.date_offset_foll(raw_date, months_offset=12, countries='SE', markets=None, custom_holidays=None, *, adjust=False, following=True)[source]

Offset dates according to a given calendar.

Parameters:
  • raw_date (DateType) – The date to offset from.

  • months_offset (int) – Number of months as integer. Defaults to 12.

  • 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.

  • adjust (bool) – Determines if offset should adjust for business days. Defaults to False.

  • following (bool) – Determines if days should be offset forward (following) or backward. Defaults to True.

Returns:

Offset date.

Return type:

dt.date