Python pandas.tseries.holiday.AbstractHolidayCalendar() Examples
The following are 25
code examples of pandas.tseries.holiday.AbstractHolidayCalendar().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
pandas.tseries.holiday
, or try the search function
.
Example #1
Source File: exchange_calendar_bmf.py From pandas_market_calendars with MIT License | 6 votes |
def regular_holidays(self): return AbstractHolidayCalendar(rules=[ ConfUniversal, AniversarioSaoPaulo, CarnavalSegunda, CarnavalTerca, SextaPaixao, CorpusChristi, Tiradentes, DiaTrabalho, Constitucionalista, Independencia, Aparecida, Finados, ProclamacaoRepublica, ConscienciaNegra, VesperaNatal, Natal, AnoNovo, AnoNovoSabado, ])
Example #2
Source File: exchange_calendar_cme.py From pandas_market_calendars with MIT License | 6 votes |
def regular_holidays(self): # The CME has different holiday rules depending on the type of # instrument. For example, http://www.cmegroup.com/tools-information/holiday-calendar/files/2016-4th-of-july-holiday-schedule.pdf # noqa # shows that Equity, Interest Rate, FX, Energy, Metals & DME Products # close at 1200 CT on July 4, 2016, while Grain, Oilseed & MGEX # Products and Livestock, Dairy & Lumber products are completely # closed. # For now, we will treat the CME as having a single calendar, and just # go with the most conservative hours - and treat July 4 as an early # close at noon. return AbstractHolidayCalendar(rules=[ USNewYearsDay, GoodFriday, Christmas, ])
Example #3
Source File: exchange_calendar_hkex.py From pandas_market_calendars with MIT License | 5 votes |
def regular_holidays(self): """ Rules are guesses based on observations of recent year. Rectify accordingly once the next year's holidays arrangement is published by the government. """ return AbstractHolidayCalendar(rules=[ HKNewYearsDay, SpringFestivalDayBefore1983, SpringFestivalDay2Before1983, SpringFestivalDay3Before1983, SpringFestivalDayBefore2010, SpringFestivalDay2Before2010, SpringFestivalDay3Before2010, SpringFestivalDay, SpringFestivalDay2, SpringFestivalDay3, GoodFriday, EasterMonday, TombSweepingDay, LabourDay, BuddhaShakyamuniDay, DragonBoatFestivalDay, HKRegionEstablishmentDay, MidAutumnFestivalDayBefore1983, MidAutumnFestivalDayBefore2010, MidAutumnFestivalDay, NationalDay, DoubleNinthFestivalDay, Christmas, BoxingDay, CommemoratingAlliedVictory, QueenBirthday, QueenBirthday2, IDontKnow ])
Example #4
Source File: exchange_calendar_cfe.py From pandas_market_calendars with MIT License | 5 votes |
def special_closes(self): return [( time(12, 15), AbstractHolidayCalendar(rules=[ USBlackFridayInOrAfter1993, ]) )]
Example #5
Source File: exchange_calendar_cfe.py From pandas_market_calendars with MIT License | 5 votes |
def regular_holidays(self): return AbstractHolidayCalendar(rules=[ USNewYearsDay, USMartinLutherKingJrAfter1998, USPresidentsDay, GoodFriday, USIndependenceDay, USMemorialDay, USLaborDay, USThanksgivingDay, Christmas ])
Example #6
Source File: exchange_calendar_lse.py From pandas_market_calendars with MIT License | 5 votes |
def special_closes(self): return [( time(12, 30), AbstractHolidayCalendar(rules=[ ChristmasEve, LSENewYearsEve, ]) )]
Example #7
Source File: exchange_calendar_lse.py From pandas_market_calendars with MIT License | 5 votes |
def regular_holidays(self): return AbstractHolidayCalendar(rules=[ LSENewYearsDay, GoodFriday, EasterMonday, MayBank_pre_1995, MayBank_post_1995_pre_2020, MayBank_post_2020, SpringBank_pre_2002, SpringBank_post_2002_pre_2012, SpringBank_post_2012, SummerBank, Christmas, WeekendChristmas, BoxingDay, WeekendBoxingDay ])
Example #8
Source File: exchange_calendar_ice.py From pandas_market_calendars with MIT License | 5 votes |
def regular_holidays(self): # https://www.theice.com/publicdocs/futures_us/exchange_notices/NewExNot2016Holidays.pdf # noqa return AbstractHolidayCalendar(rules=[ USNewYearsDay, GoodFriday, Christmas ])
Example #9
Source File: exchange_calendar_ice.py From pandas_market_calendars with MIT License | 5 votes |
def special_closes(self): return [ (time(13), AbstractHolidayCalendar(rules=[ USMartinLutherKingJrAfter1998, USPresidentsDay, USMemorialDay, USIndependenceDay, USLaborDay, USThanksgivingDay ])) ]
Example #10
Source File: exchange_calendar_eurex.py From pandas_market_calendars with MIT License | 5 votes |
def special_closes(self): return [( time(12, 30), AbstractHolidayCalendar(rules=[ ChristmasEve, EUREXNewYearsEve, ]) )]
Example #11
Source File: exchange_calendar_eurex.py From pandas_market_calendars with MIT License | 5 votes |
def regular_holidays(self): return AbstractHolidayCalendar(rules=[ EUREXNewYearsDay, GoodFriday, EasterMonday, MayBank, GermanNationalDay, Christmas, WeekendChristmas, BoxingDay, WeekendBoxingDay ])
Example #12
Source File: exchange_calendar_ose.py From pandas_market_calendars with MIT License | 5 votes |
def regular_holidays(self): return AbstractHolidayCalendar(rules=[ OSENewYearsDay, OSEMaundyThursday, OSEGoodFriday, OSEEasterMonday, OSELabourDay, OSEConstitutionDay, OSEWhitMonday, OSEAscensionDay, OSEChristmasEve, OSEChristmasDay, OSEBoxingDay, OSENewYearsEve ])
Example #13
Source File: exchange_calendar_tsx.py From pandas_market_calendars with MIT License | 5 votes |
def regular_holidays(self): return AbstractHolidayCalendar(rules=[ TSXNewYearsDay, FamilyDay, GoodFriday, VictoriaDay, CanadaDay, CivicHoliday, LaborDay, Thanksgiving, Christmas, WeekendChristmas, BoxingDay, WeekendBoxingDay ])
Example #14
Source File: trading_calendar.py From trading_calendars with Apache License 2.0 | 5 votes |
def regular_holidays(self): """ Returns ------- pd.AbstractHolidayCalendar: a calendar containing the regular holidays for this calendar """ return None
Example #15
Source File: exchange_calendar_cme.py From pandas_market_calendars with MIT License | 5 votes |
def special_closes(self): return [( time(12), AbstractHolidayCalendar(rules=[ USBlackFridayInOrAfter1993, ChristmasEveBefore1993, ChristmasEveInOrAfter1993, ]) )]
Example #16
Source File: exchange_calendar_cme.py From pandas_market_calendars with MIT License | 5 votes |
def special_closes(self): return [( time(12), AbstractHolidayCalendar(rules=[ USMartinLutherKingJrAfter1998, USPresidentsDay, USMemorialDay, USLaborDay, USIndependenceDay, USThanksgivingDay, USBlackFridayInOrAfter1993, ChristmasEveBefore1993, ChristmasEveInOrAfter1993, ]) )]
Example #17
Source File: test_market_calendar.py From pandas_market_calendars with MIT License | 5 votes |
def special_closes(self): return [(time(11, 30), AbstractHolidayCalendar(rules=[MonTuesThursBeforeIndependenceDay]))]
Example #18
Source File: test_market_calendar.py From pandas_market_calendars with MIT License | 5 votes |
def special_opens(self): return [(time(11, 15), AbstractHolidayCalendar(rules=[MonTuesThursBeforeIndependenceDay]))]
Example #19
Source File: test_market_calendar.py From pandas_market_calendars with MIT License | 5 votes |
def regular_holidays(self): return AbstractHolidayCalendar(rules=[USNewYearsDay, Christmas])
Example #20
Source File: trading_calendar.py From catalyst with Apache License 2.0 | 5 votes |
def special_closes(self): """ A list of special close times and corresponding HolidayCalendars. Returns ------- list: List of (time, AbstractHolidayCalendar) tuples """ return []
Example #21
Source File: trading_calendar.py From catalyst with Apache License 2.0 | 5 votes |
def special_opens(self): """ A list of special open times and corresponding HolidayCalendars. Returns ------- list: List of (time, AbstractHolidayCalendar) tuples """ return []
Example #22
Source File: trading_calendar.py From catalyst with Apache License 2.0 | 5 votes |
def regular_holidays(self): """ Returns ------- pd.AbstractHolidayCalendar: a calendar containing the regular holidays for this calendar """ return None
Example #23
Source File: trading_calendar.py From trading_calendars with Apache License 2.0 | 5 votes |
def special_closes(self): """ A list of special close times and corresponding HolidayCalendars. Returns ------- list: List of (time, AbstractHolidayCalendar) tuples """ return []
Example #24
Source File: trading_calendar.py From trading_calendars with Apache License 2.0 | 5 votes |
def special_opens(self): """ A list of special open times and corresponding HolidayCalendars. Returns ------- list: List of (time, AbstractHolidayCalendar) tuples """ return []
Example #25
Source File: exchange_calendar_jpx.py From pandas_market_calendars with MIT License | 4 votes |
def regular_holidays(self): return AbstractHolidayCalendar(rules=[ USNewYearsDay, JapanNewYearsDay2, JapanNewYearsDay3, JapanComingOfAgeDay1951To1973, JapanComingOfAgeDay1974To1999, JapanComingOfAgeDay, JapanNationalFoundationDay1969To1973, JapanNationalFoundationDay, JapanEmperorsBirthday, JapanVernalEquinox, JapanShowaDayUntil1972, JapanShowaDay, JapanConstitutionMemorialDayUntil1972, JapanConstitutionMemorialDay, JapanGreeneryDay, JapanChildrensDayUntil1972, JapanChildrensDay, JapanGoldenWeekBonusDay, JapanMarineDay1996To2002, JapanMarineDay2003To2019, JapanMarineDay2020, JapanMarineDay, JapanMountainDay2016to2019, JapanMountainDay2020, JapanMountainDay, JapanRespectForTheAgedDay1966To1972, JapanRespectForTheAgedDay1973To2002, JapanRespectForTheAgedDay, JapanAutumnalEquinox, JapanHealthAndSportsDay1966To1972, JapanHealthAndSportsDay1973To1999, JapanHealthAndSportsDay2000To2019, JapanSportsDay2020, JapanSportsDay, JapanCultureDayUntil1972, JapanCultureDay, JapanLaborThanksgivingDayUntil1972, JapanLaborThanksgivingDay, JapanEmperorAkahitosBirthday, JapanDecember29Until1988, JapanDecember30Until1988, JapanBeforeNewYearsDay, ])