當前位置: 首頁>>代碼示例>>Python>>正文


Python holiday.AbstractHolidayCalendar方法代碼示例

本文整理匯總了Python中pandas.tseries.holiday.AbstractHolidayCalendar方法的典型用法代碼示例。如果您正苦於以下問題:Python holiday.AbstractHolidayCalendar方法的具體用法?Python holiday.AbstractHolidayCalendar怎麽用?Python holiday.AbstractHolidayCalendar使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在pandas.tseries.holiday的用法示例。


在下文中一共展示了holiday.AbstractHolidayCalendar方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: regular_holidays

# 需要導入模塊: from pandas.tseries import holiday [as 別名]
# 或者: from pandas.tseries.holiday import AbstractHolidayCalendar [as 別名]
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,
        ]) 
開發者ID:rsheftel,項目名稱:pandas_market_calendars,代碼行數:18,代碼來源:exchange_calendar_cme.py

示例2: regular_holidays

# 需要導入模塊: from pandas.tseries import holiday [as 別名]
# 或者: from pandas.tseries.holiday import AbstractHolidayCalendar [as 別名]
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,
        ]) 
開發者ID:rsheftel,項目名稱:pandas_market_calendars,代碼行數:23,代碼來源:exchange_calendar_bmf.py

示例3: regular_holidays

# 需要導入模塊: from pandas.tseries import holiday [as 別名]
# 或者: from pandas.tseries.holiday import AbstractHolidayCalendar [as 別名]
def regular_holidays(self):
        """
        Returns
        -------
        pd.AbstractHolidayCalendar: a calendar containing the regular holidays
        for this calendar
        """
        return None 
開發者ID:quantopian,項目名稱:trading_calendars,代碼行數:10,代碼來源:trading_calendar.py

示例4: special_opens

# 需要導入模塊: from pandas.tseries import holiday [as 別名]
# 或者: from pandas.tseries.holiday import AbstractHolidayCalendar [as 別名]
def special_opens(self):
        """
        A list of special open times and corresponding HolidayCalendars.

        Returns
        -------
        list: List of (time, AbstractHolidayCalendar) tuples
        """
        return [] 
開發者ID:quantopian,項目名稱:trading_calendars,代碼行數:11,代碼來源:trading_calendar.py

示例5: special_closes

# 需要導入模塊: from pandas.tseries import holiday [as 別名]
# 或者: from pandas.tseries.holiday import AbstractHolidayCalendar [as 別名]
def special_closes(self):
        """
        A list of special close times and corresponding HolidayCalendars.

        Returns
        -------
        list: List of (time, AbstractHolidayCalendar) tuples
        """
        return [] 
開發者ID:quantopian,項目名稱:trading_calendars,代碼行數:11,代碼來源:trading_calendar.py

示例6: regular_holidays

# 需要導入模塊: from pandas.tseries import holiday [as 別名]
# 或者: from pandas.tseries.holiday import AbstractHolidayCalendar [as 別名]
def regular_holidays(self):
        return AbstractHolidayCalendar(rules=[USNewYearsDay, Christmas]) 
開發者ID:rsheftel,項目名稱:pandas_market_calendars,代碼行數:4,代碼來源:test_market_calendar.py

示例7: special_opens

# 需要導入模塊: from pandas.tseries import holiday [as 別名]
# 或者: from pandas.tseries.holiday import AbstractHolidayCalendar [as 別名]
def special_opens(self):
        return [(time(11, 15), AbstractHolidayCalendar(rules=[MonTuesThursBeforeIndependenceDay]))] 
開發者ID:rsheftel,項目名稱:pandas_market_calendars,代碼行數:4,代碼來源:test_market_calendar.py

示例8: special_closes

# 需要導入模塊: from pandas.tseries import holiday [as 別名]
# 或者: from pandas.tseries.holiday import AbstractHolidayCalendar [as 別名]
def special_closes(self):
        return [(time(11, 30), AbstractHolidayCalendar(rules=[MonTuesThursBeforeIndependenceDay]))] 
開發者ID:rsheftel,項目名稱:pandas_market_calendars,代碼行數:4,代碼來源:test_market_calendar.py

示例9: special_closes

# 需要導入模塊: from pandas.tseries import holiday [as 別名]
# 或者: from pandas.tseries.holiday import AbstractHolidayCalendar [as 別名]
def special_closes(self):
        return [(
            time(12),
            AbstractHolidayCalendar(rules=[
                USMartinLutherKingJrAfter1998,
                USPresidentsDay,
                USMemorialDay,
                USLaborDay,
                USIndependenceDay,
                USThanksgivingDay,
                USBlackFridayInOrAfter1993,
                ChristmasEveBefore1993,
                ChristmasEveInOrAfter1993,
            ])
        )] 
開發者ID:rsheftel,項目名稱:pandas_market_calendars,代碼行數:17,代碼來源:exchange_calendar_cme.py

示例10: regular_holidays

# 需要導入模塊: from pandas.tseries import holiday [as 別名]
# 或者: from pandas.tseries.holiday import AbstractHolidayCalendar [as 別名]
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
        ]) 
開發者ID:rsheftel,項目名稱:pandas_market_calendars,代碼行數:37,代碼來源:exchange_calendar_hkex.py

示例11: regular_holidays

# 需要導入模塊: from pandas.tseries import holiday [as 別名]
# 或者: from pandas.tseries.holiday import AbstractHolidayCalendar [as 別名]
def regular_holidays(self):
        return AbstractHolidayCalendar(rules=[
            TSXNewYearsDay,
            FamilyDay,
            GoodFriday,
            VictoriaDay,
            CanadaDay,
            CivicHoliday,
            LaborDay,
            Thanksgiving,
            Christmas,
            WeekendChristmas,
            BoxingDay,
            WeekendBoxingDay
        ]) 
開發者ID:rsheftel,項目名稱:pandas_market_calendars,代碼行數:17,代碼來源:exchange_calendar_tsx.py

示例12: regular_holidays

# 需要導入模塊: from pandas.tseries import holiday [as 別名]
# 或者: from pandas.tseries.holiday import AbstractHolidayCalendar [as 別名]
def regular_holidays(self):
        return AbstractHolidayCalendar(rules=[
            OSENewYearsDay,
            OSEMaundyThursday,
            OSEGoodFriday,
            OSEEasterMonday,
            OSELabourDay,
            OSEConstitutionDay,
            OSEWhitMonday,
            OSEAscensionDay,
            OSEChristmasEve,
            OSEChristmasDay,
            OSEBoxingDay,
            OSENewYearsEve
        ]) 
開發者ID:rsheftel,項目名稱:pandas_market_calendars,代碼行數:17,代碼來源:exchange_calendar_ose.py

示例13: regular_holidays

# 需要導入模塊: from pandas.tseries import holiday [as 別名]
# 或者: from pandas.tseries.holiday import AbstractHolidayCalendar [as 別名]
def regular_holidays(self):
        return AbstractHolidayCalendar(rules=[
            EUREXNewYearsDay,
            GoodFriday,
            EasterMonday,
            MayBank,
            GermanNationalDay,
            Christmas,
            WeekendChristmas,
            BoxingDay,
            WeekendBoxingDay
        ]) 
開發者ID:rsheftel,項目名稱:pandas_market_calendars,代碼行數:14,代碼來源:exchange_calendar_eurex.py

示例14: special_closes

# 需要導入模塊: from pandas.tseries import holiday [as 別名]
# 或者: from pandas.tseries.holiday import AbstractHolidayCalendar [as 別名]
def special_closes(self):
        return [(
            time(12, 30),
            AbstractHolidayCalendar(rules=[
                ChristmasEve,
                EUREXNewYearsEve,
            ])
        )] 
開發者ID:rsheftel,項目名稱:pandas_market_calendars,代碼行數:10,代碼來源:exchange_calendar_eurex.py

示例15: special_closes

# 需要導入模塊: from pandas.tseries import holiday [as 別名]
# 或者: from pandas.tseries.holiday import AbstractHolidayCalendar [as 別名]
def special_closes(self):
        return [
            (time(13), AbstractHolidayCalendar(rules=[
                USMartinLutherKingJrAfter1998,
                USPresidentsDay,
                USMemorialDay,
                USIndependenceDay,
                USLaborDay,
                USThanksgivingDay
            ]))
        ] 
開發者ID:rsheftel,項目名稱:pandas_market_calendars,代碼行數:13,代碼來源:exchange_calendar_ice.py


注:本文中的pandas.tseries.holiday.AbstractHolidayCalendar方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。