gs_quant.datetime.date.prev_business_date — gs_quant 0.1 documentation

# gs_quant.datetime.date.prev_business_date

`prev_business_date`(dates=datetime.date(2021, 1, 5), calendars=(), week_mask=None)

  Returns the previous business date for a given date or date series, defaulting to today.

  Parameters

    - dates (`Union`[`date`, `Iterable`[`date`]]) – The input date or dates, defaults to today

    - calendars (`Union`[`str`, `Tuple`[`str`, …]]) – Calendars to use for holidays

    - week_mask (`Optional`[`str`]) – Which days are considered weekends (defaults to Saturday and Sunday)

  Return type

    `Union`[`date`, `Iterable`[`date`]]

  Returns

    A date (if dates is a single date) or tuple of dates, adjusted by the offset of one day.

  Example

      >>> import datetime as dt
      >>> prev_bus_date = prev_business_date()