Schedule

Schedule#

class sigtech.framework.schedules.schedule.Schedule

Baseclasses: ScheduleBase, ABC

Subclasses: ScheduleDateSeries, ScheduleDaily, ScheduleEveryDay, SchedulePeriodic

Base class handling delivery operations.

Keyword arguments:

  • Delivery offset - Determine the publication lag from the data date to the actual publication/delivery date in the system.

  • Delivery business day count convention.

  • Delivery time - Time of the day when the delivery/publication of the data points occurs.

  • Delivery timezone - Timezone for the delivery/publication of the data points of the schedule.

  • Delivery holidays - Holiday calendar driving the schedule data points.

Example of object creation:

import datetime as dtm
from sigtech.framework.schedules.schedule import Schedule

schedule = Schedule(
               delivery_offset='1BD',
               delivery_bdc=None,
               delivery_time=dtm.time(9, 0, 0),
               delivery_timezone='Europe/London',
               delivery_holidays='London'
           )
date_increment(d: date, n: int) Any

Move a given date d exactly n business days forward or backward.

Parameters:
  • d – Input date.

  • n – Number of business days for bump.

Returns:

New bumped date from the input date.

delivery_kwargs()

Return a dict containing the class attributes.

get_exact_business_dates(d: date, n: int) list[datetime.date]

Return n business days after date d.

Parameters:
  • d – Start date.

  • n – Number of days.

Returns:

List of dates.

prev_reference_date(d: date) date

Return the past delivery date for the input date.

Parameters:

d – Input date.

Returns:

date.

prev_reference_datetime(d: Union[date, datetime, Timestamp]) Timestamp

Return the past delivery datetime for the input date.

Parameters:

d – Input date, datetime or timestamp.

Returns:

pandas Timestamp.