当前位置: 首页>>代码示例>>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;未经允许,请勿转载。