DateOffset in Pandas with a Holiday Calendar

pandas

Solution

Currently I think you need to create a custom subclass. You'd need to override the `apply` and `onOffset` methods to take into account your holiday calendar.

We should add an optional holiday calendar parameter in the business-X frequencies eventually though. I made a github issue to keep track of it: https://github.com/pydata/pandas/issues/2301

Problem

Pandas currently allows you to add business days to a given date `datetime.today() + 3*BDay()`. I would like to extend the idea of a business day to exclude a given DateIndex of holidays as well as weekends. Is that possible incorporate a DateIndex into an offset?

Original source