Adjuster#

class rateslib.scheduling.Adjuster(args)#

Bases: object

Enumerable type for date adjustment rules.

Variants

In [1]: variants
Out[1]: 
['to_json',
 'Actual',
 'Following',
 'ModifiedFollowing',
 'Previous',
 'ModifiedPrevious',
 'FollowingSettle',
 'ModifiedFollowingSettle',
 'PreviousSettle',
 'ModifiedPreviousSettle',
 'BusDaysLagSettle',
 'CalDaysLagSettle',
 'FollowingExLast',
 'FollowingExLastSettle']

Methods Summary

adjust(date, calendar)

Return a date under a date adjustment rule.

adjusts(dates, calendar)

Return a vector of dates adjusted under a date adjustment rule.

to_json()

Return a JSON representation of the object.

Methods Documentation

adjust(date, calendar)#

Return a date under a date adjustment rule.

Parameters:
  • date (datetime) – Date to adjust.

  • calendar (Cal, UnionCal or NamedCal) – The calendar to assist with date adjustment.

Return type:

datetime

adjusts(dates, calendar)#

Return a vector of dates adjusted under a date adjustment rule.

Parameters:
  • dates (list[datetime]) – Dates to adjust.

  • calendar (Cal, UnionCal or NamedCal) – The calendar to assist with date adjustment.

Return type:

list[datetime]

to_json()#

Return a JSON representation of the object.

Return type:

str