openseries.offset_business_days

openseries.offset_business_days(ddate, days, countries='SE', markets=None, custom_holidays=None)[source]

Bump date by business days.

It first adjusts to a valid business day and then bumps with given number of business days from there.

Parameters:
  • ddate (dt.date) – A starting date that does not have to be a business day.

  • days (int) – The number of business days to offset from the business day that is given. If days is set as anything other than an integer its value is set to zero.

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

The new offset business day.

Return type:

dt.date