derivitec.core.client.DerivitecClient.adjust_business_day¶
- DerivitecClient.adjust_business_day(calendar, dt, bdc)[source]¶
Adjust a date to a business day using a calendar and business day convention.
- Parameters:
calendar (Calendar) – The calendar used for adjusting.
date (datetime) – The date to adjust.
bdc (BusinessDayConvention) – The business day convention.
- Return type:
Code
>>> calendars = client.get_calendars( ["USD"] ) >>> calendar = calendars[0] >>> dt = datetime(2017, 7, 15) >>> bdc = BusinessDayConvention.ModifiedFollowing >>> response = client.adjust_business_day(calendar, dt, bdc) >>> response.Date