pandas-market-calendars 5.1.0__py3-none-any.whl → 5.1.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pandas_market_calendars/__init__.py +39 -39
 - pandas_market_calendars/calendar_registry.py +58 -57
 - pandas_market_calendars/calendar_utils.py +1151 -1151
 - pandas_market_calendars/calendars/asx.py +100 -70
 - pandas_market_calendars/calendars/bmf.py +225 -219
 - pandas_market_calendars/calendars/bse.py +433 -425
 - pandas_market_calendars/calendars/cboe.py +153 -149
 - pandas_market_calendars/calendars/cme.py +417 -405
 - pandas_market_calendars/calendars/cme_globex_agriculture.py +172 -172
 - pandas_market_calendars/calendars/cme_globex_base.py +127 -119
 - pandas_market_calendars/calendars/cme_globex_crypto.py +166 -158
 - pandas_market_calendars/calendars/cme_globex_energy_and_metals.py +224 -216
 - pandas_market_calendars/calendars/cme_globex_equities.py +131 -123
 - pandas_market_calendars/calendars/cme_globex_fixed_income.py +136 -136
 - pandas_market_calendars/calendars/cme_globex_fx.py +101 -101
 - pandas_market_calendars/calendars/eurex.py +139 -131
 - pandas_market_calendars/calendars/eurex_fixed_income.py +106 -98
 - pandas_market_calendars/calendars/hkex.py +437 -431
 - pandas_market_calendars/calendars/ice.py +89 -81
 - pandas_market_calendars/calendars/iex.py +163 -155
 - pandas_market_calendars/calendars/jpx.py +125 -117
 - pandas_market_calendars/calendars/lse.py +126 -118
 - pandas_market_calendars/calendars/mirror.py +144 -144
 - pandas_market_calendars/calendars/nyse.py +1462 -1466
 - pandas_market_calendars/calendars/ose.py +124 -118
 - pandas_market_calendars/calendars/sifma.py +391 -383
 - pandas_market_calendars/calendars/six.py +144 -136
 - pandas_market_calendars/calendars/sse.py +305 -315
 - pandas_market_calendars/calendars/tase.py +232 -224
 - pandas_market_calendars/calendars/tsx.py +193 -185
 - pandas_market_calendars/class_registry.py +115 -115
 - pandas_market_calendars/holidays/cme.py +385 -385
 - pandas_market_calendars/holidays/cme_globex.py +214 -214
 - pandas_market_calendars/holidays/cn.py +1476 -1476
 - pandas_market_calendars/holidays/jp.py +401 -401
 - pandas_market_calendars/holidays/jpx_equinox.py +506 -506
 - pandas_market_calendars/holidays/nyse.py +1536 -1536
 - pandas_market_calendars/holidays/oz.py +82 -63
 - pandas_market_calendars/holidays/sifma.py +350 -350
 - pandas_market_calendars/holidays/uk.py +186 -186
 - pandas_market_calendars/holidays/us.py +376 -376
 - pandas_market_calendars/market_calendar.py +1006 -1008
 - {pandas_market_calendars-5.1.0.dist-info → pandas_market_calendars-5.1.3.dist-info}/METADATA +5 -4
 - pandas_market_calendars-5.1.3.dist-info/RECORD +50 -0
 - {pandas_market_calendars-5.1.0.dist-info → pandas_market_calendars-5.1.3.dist-info}/WHEEL +1 -1
 - pandas_market_calendars-5.1.0.dist-info/RECORD +0 -50
 - {pandas_market_calendars-5.1.0.dist-info → pandas_market_calendars-5.1.3.dist-info}/licenses/LICENSE +0 -0
 - {pandas_market_calendars-5.1.0.dist-info → pandas_market_calendars-5.1.3.dist-info}/licenses/NOTICE +0 -0
 - {pandas_market_calendars-5.1.0.dist-info → pandas_market_calendars-5.1.3.dist-info}/top_level.txt +0 -0
 
| 
         @@ -1,123 +1,131 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            from datetime import time
         
     | 
| 
       2 
     | 
    
         
            -
             
     | 
| 
       3 
     | 
    
         
            -
            from pandas.tseries.holiday import AbstractHolidayCalendar
         
     | 
| 
       4 
     | 
    
         
            -
             
     | 
| 
       5 
     | 
    
         
            -
             
     | 
| 
       6 
     | 
    
         
            -
             
     | 
| 
       7 
     | 
    
         
            -
             
     | 
| 
       8 
     | 
    
         
            -
                 
     | 
| 
       9 
     | 
    
         
            -
                 
     | 
| 
       10 
     | 
    
         
            -
             
     | 
| 
       11 
     | 
    
         
            -
                 
     | 
| 
       12 
     | 
    
         
            -
                 
     | 
| 
       13 
     | 
    
         
            -
             
     | 
| 
       14 
     | 
    
         
            -
             
     | 
| 
       15 
     | 
    
         
            -
                 
     | 
| 
       16 
     | 
    
         
            -
                 
     | 
| 
       17 
     | 
    
         
            -
                 
     | 
| 
       18 
     | 
    
         
            -
                 
     | 
| 
       19 
     | 
    
         
            -
                 
     | 
| 
       20 
     | 
    
         
            -
                 
     | 
| 
       21 
     | 
    
         
            -
                 
     | 
| 
       22 
     | 
    
         
            -
                 
     | 
| 
       23 
     | 
    
         
            -
                 
     | 
| 
       24 
     | 
    
         
            -
                 
     | 
| 
       25 
     | 
    
         
            -
                 
     | 
| 
       26 
     | 
    
         
            -
                 
     | 
| 
       27 
     | 
    
         
            -
                 
     | 
| 
       28 
     | 
    
         
            -
             
     | 
| 
       29 
     | 
    
         
            -
             
     | 
| 
       30 
     | 
    
         
            -
                 
     | 
| 
       31 
     | 
    
         
            -
                 
     | 
| 
       32 
     | 
    
         
            -
                 
     | 
| 
       33 
     | 
    
         
            -
                 
     | 
| 
       34 
     | 
    
         
            -
             
     | 
| 
       35 
     | 
    
         
            -
             
     | 
| 
       36 
     | 
    
         
            -
             
     | 
| 
       37 
     | 
    
         
            -
             
     | 
| 
       38 
     | 
    
         
            -
             
     | 
| 
       39 
     | 
    
         
            -
                 
     | 
| 
       40 
     | 
    
         
            -
             
     | 
| 
       41 
     | 
    
         
            -
                 
     | 
| 
       42 
     | 
    
         
            -
             
     | 
| 
       43 
     | 
    
         
            -
             
     | 
| 
       44 
     | 
    
         
            -
             
     | 
| 
       45 
     | 
    
         
            -
             
     | 
| 
       46 
     | 
    
         
            -
             
     | 
| 
       47 
     | 
    
         
            -
                 
     | 
| 
       48 
     | 
    
         
            -
             
     | 
| 
       49 
     | 
    
         
            -
             
     | 
| 
       50 
     | 
    
         
            -
             
     | 
| 
       51 
     | 
    
         
            -
             
     | 
| 
       52 
     | 
    
         
            -
             
     | 
| 
       53 
     | 
    
         
            -
             
     | 
| 
       54 
     | 
    
         
            -
             
     | 
| 
       55 
     | 
    
         
            -
             
     | 
| 
       56 
     | 
    
         
            -
                    "" 
     | 
| 
       57 
     | 
    
         
            -
             
     | 
| 
       58 
     | 
    
         
            -
             
     | 
| 
       59 
     | 
    
         
            -
                 
     | 
| 
       60 
     | 
    
         
            -
             
     | 
| 
       61 
     | 
    
         
            -
                     
     | 
| 
       62 
     | 
    
         
            -
             
     | 
| 
       63 
     | 
    
         
            -
             
     | 
| 
       64 
     | 
    
         
            -
             
     | 
| 
       65 
     | 
    
         
            -
             
     | 
| 
       66 
     | 
    
         
            -
             
     | 
| 
       67 
     | 
    
         
            -
             
     | 
| 
       68 
     | 
    
         
            -
             
     | 
| 
       69 
     | 
    
         
            -
             
     | 
| 
       70 
     | 
    
         
            -
             
     | 
| 
       71 
     | 
    
         
            -
             
     | 
| 
       72 
     | 
    
         
            -
             
     | 
| 
       73 
     | 
    
         
            -
             
     | 
| 
       74 
     | 
    
         
            -
             
     | 
| 
       75 
     | 
    
         
            -
             
     | 
| 
       76 
     | 
    
         
            -
             
     | 
| 
       77 
     | 
    
         
            -
             
     | 
| 
       78 
     | 
    
         
            -
             
     | 
| 
       79 
     | 
    
         
            -
             
     | 
| 
       80 
     | 
    
         
            -
             
     | 
| 
       81 
     | 
    
         
            -
             
     | 
| 
       82 
     | 
    
         
            -
             
     | 
| 
       83 
     | 
    
         
            -
             
     | 
| 
       84 
     | 
    
         
            -
             
     | 
| 
       85 
     | 
    
         
            -
             
     | 
| 
       86 
     | 
    
         
            -
             
     | 
| 
       87 
     | 
    
         
            -
             
     | 
| 
       88 
     | 
    
         
            -
             
     | 
| 
       89 
     | 
    
         
            -
             
     | 
| 
       90 
     | 
    
         
            -
             
     | 
| 
       91 
     | 
    
         
            -
                                     
     | 
| 
       92 
     | 
    
         
            -
             
     | 
| 
       93 
     | 
    
         
            -
             
     | 
| 
       94 
     | 
    
         
            -
             
     | 
| 
       95 
     | 
    
         
            -
             
     | 
| 
       96 
     | 
    
         
            -
             
     | 
| 
       97 
     | 
    
         
            -
             
     | 
| 
       98 
     | 
    
         
            -
             
     | 
| 
       99 
     | 
    
         
            -
             
     | 
| 
       100 
     | 
    
         
            -
             
     | 
| 
       101 
     | 
    
         
            -
                                     
     | 
| 
       102 
     | 
    
         
            -
             
     | 
| 
       103 
     | 
    
         
            -
             
     | 
| 
       104 
     | 
    
         
            -
             
     | 
| 
       105 
     | 
    
         
            -
             
     | 
| 
       106 
     | 
    
         
            -
             
     | 
| 
       107 
     | 
    
         
            -
             
     | 
| 
       108 
     | 
    
         
            -
                                 
     | 
| 
       109 
     | 
    
         
            -
             
     | 
| 
       110 
     | 
    
         
            -
             
     | 
| 
       111 
     | 
    
         
            -
             
     | 
| 
       112 
     | 
    
         
            -
             
     | 
| 
       113 
     | 
    
         
            -
             
     | 
| 
       114 
     | 
    
         
            -
             
     | 
| 
       115 
     | 
    
         
            -
                                     
     | 
| 
       116 
     | 
    
         
            -
             
     | 
| 
       117 
     | 
    
         
            -
             
     | 
| 
       118 
     | 
    
         
            -
             
     | 
| 
       119 
     | 
    
         
            -
             
     | 
| 
       120 
     | 
    
         
            -
             
     | 
| 
       121 
     | 
    
         
            -
                             
     | 
| 
       122 
     | 
    
         
            -
             
     | 
| 
       123 
     | 
    
         
            -
             
     | 
| 
      
 1 
     | 
    
         
            +
            from datetime import time
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            from pandas.tseries.holiday import AbstractHolidayCalendar
         
     | 
| 
      
 4 
     | 
    
         
            +
            import sys
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
            # check python versiOn aNd import accordingly
         
     | 
| 
      
 7 
     | 
    
         
            +
            if sys.version_info >= (3, 9):
         
     | 
| 
      
 8 
     | 
    
         
            +
                # For Python 3.9 and later, import directly
         
     | 
| 
      
 9 
     | 
    
         
            +
                from zoneinfo import ZoneInfo
         
     | 
| 
      
 10 
     | 
    
         
            +
            else:
         
     | 
| 
      
 11 
     | 
    
         
            +
                # For Python 3.8 and earlier, import from backports
         
     | 
| 
      
 12 
     | 
    
         
            +
                from backports.zoneinfo import ZoneInfo
         
     | 
| 
      
 13 
     | 
    
         
            +
             
     | 
| 
      
 14 
     | 
    
         
            +
            from pandas_market_calendars.holidays.cme import (
         
     | 
| 
      
 15 
     | 
    
         
            +
                USMartinLutherKingJrAfter1998Before2015,
         
     | 
| 
      
 16 
     | 
    
         
            +
                USMartinLutherKingJrAfter2015,
         
     | 
| 
      
 17 
     | 
    
         
            +
                USPresidentsDayBefore2015,
         
     | 
| 
      
 18 
     | 
    
         
            +
                USPresidentsDayAfter2015,
         
     | 
| 
      
 19 
     | 
    
         
            +
                GoodFridayBefore2021NotEarlyClose,
         
     | 
| 
      
 20 
     | 
    
         
            +
                GoodFriday2010,
         
     | 
| 
      
 21 
     | 
    
         
            +
                GoodFriday2012,
         
     | 
| 
      
 22 
     | 
    
         
            +
                GoodFriday2015,
         
     | 
| 
      
 23 
     | 
    
         
            +
                GoodFriday2021,
         
     | 
| 
      
 24 
     | 
    
         
            +
                GoodFriday2022,
         
     | 
| 
      
 25 
     | 
    
         
            +
                GoodFridayAfter2022,
         
     | 
| 
      
 26 
     | 
    
         
            +
                USMemorialDay2013AndPrior,
         
     | 
| 
      
 27 
     | 
    
         
            +
                USMemorialDayAfter2013,
         
     | 
| 
      
 28 
     | 
    
         
            +
                USIndependenceDayBefore2022PreviousDay,
         
     | 
| 
      
 29 
     | 
    
         
            +
                USIndependenceDayBefore2014,
         
     | 
| 
      
 30 
     | 
    
         
            +
                USIndependenceDayAfter2014,
         
     | 
| 
      
 31 
     | 
    
         
            +
                USLaborDayStarting1887Before2014,
         
     | 
| 
      
 32 
     | 
    
         
            +
                USLaborDayStarting1887After2014,
         
     | 
| 
      
 33 
     | 
    
         
            +
                USThanksgivingBefore2014,
         
     | 
| 
      
 34 
     | 
    
         
            +
                USThanksgivingAfter2014,
         
     | 
| 
      
 35 
     | 
    
         
            +
                USThanksgivingFriday,
         
     | 
| 
      
 36 
     | 
    
         
            +
            )
         
     | 
| 
      
 37 
     | 
    
         
            +
            from pandas_market_calendars.holidays.us import (
         
     | 
| 
      
 38 
     | 
    
         
            +
                USNewYearsDay,
         
     | 
| 
      
 39 
     | 
    
         
            +
                ChristmasEveInOrAfter1993,
         
     | 
| 
      
 40 
     | 
    
         
            +
                Christmas,
         
     | 
| 
      
 41 
     | 
    
         
            +
                USJuneteenthAfter2022,
         
     | 
| 
      
 42 
     | 
    
         
            +
            )
         
     | 
| 
      
 43 
     | 
    
         
            +
            from .cme_globex_base import CMEGlobexBaseExchangeCalendar
         
     | 
| 
      
 44 
     | 
    
         
            +
             
     | 
| 
      
 45 
     | 
    
         
            +
             
     | 
| 
      
 46 
     | 
    
         
            +
            class CMEGlobexEquitiesExchangeCalendar(CMEGlobexBaseExchangeCalendar):
         
     | 
| 
      
 47 
     | 
    
         
            +
                aliases = ["CME Globex Equity"]
         
     | 
| 
      
 48 
     | 
    
         
            +
             
     | 
| 
      
 49 
     | 
    
         
            +
                regular_market_times = {
         
     | 
| 
      
 50 
     | 
    
         
            +
                    "market_open": ((None, time(17), -1),),  # offset by -1 day
         
     | 
| 
      
 51 
     | 
    
         
            +
                    "market_close": ((None, time(16)),),
         
     | 
| 
      
 52 
     | 
    
         
            +
                }
         
     | 
| 
      
 53 
     | 
    
         
            +
             
     | 
| 
      
 54 
     | 
    
         
            +
                @property
         
     | 
| 
      
 55 
     | 
    
         
            +
                def tz(self):
         
     | 
| 
      
 56 
     | 
    
         
            +
                    return ZoneInfo("America/Chicago")
         
     | 
| 
      
 57 
     | 
    
         
            +
             
     | 
| 
      
 58 
     | 
    
         
            +
                @property
         
     | 
| 
      
 59 
     | 
    
         
            +
                def name(self):
         
     | 
| 
      
 60 
     | 
    
         
            +
                    """
         
     | 
| 
      
 61 
     | 
    
         
            +
                    Name of the market
         
     | 
| 
      
 62 
     | 
    
         
            +
             
     | 
| 
      
 63 
     | 
    
         
            +
                    :return: string name
         
     | 
| 
      
 64 
     | 
    
         
            +
                    """
         
     | 
| 
      
 65 
     | 
    
         
            +
                    return "CME Globex Equities"
         
     | 
| 
      
 66 
     | 
    
         
            +
             
     | 
| 
      
 67 
     | 
    
         
            +
                @property
         
     | 
| 
      
 68 
     | 
    
         
            +
                def regular_holidays(self):
         
     | 
| 
      
 69 
     | 
    
         
            +
                    return AbstractHolidayCalendar(
         
     | 
| 
      
 70 
     | 
    
         
            +
                        rules=[
         
     | 
| 
      
 71 
     | 
    
         
            +
                            USNewYearsDay,
         
     | 
| 
      
 72 
     | 
    
         
            +
                            GoodFridayBefore2021NotEarlyClose,
         
     | 
| 
      
 73 
     | 
    
         
            +
                            GoodFriday2022,
         
     | 
| 
      
 74 
     | 
    
         
            +
                            Christmas,
         
     | 
| 
      
 75 
     | 
    
         
            +
                        ]
         
     | 
| 
      
 76 
     | 
    
         
            +
                    )
         
     | 
| 
      
 77 
     | 
    
         
            +
             
     | 
| 
      
 78 
     | 
    
         
            +
                @property
         
     | 
| 
      
 79 
     | 
    
         
            +
                def special_closes(self):
         
     | 
| 
      
 80 
     | 
    
         
            +
                    # Source https://www.cmegroup.com/tools-information/holiday-calendar.html
         
     | 
| 
      
 81 
     | 
    
         
            +
                    return [
         
     | 
| 
      
 82 
     | 
    
         
            +
                        (
         
     | 
| 
      
 83 
     | 
    
         
            +
                            time(10, 30),
         
     | 
| 
      
 84 
     | 
    
         
            +
                            AbstractHolidayCalendar(
         
     | 
| 
      
 85 
     | 
    
         
            +
                                rules=[
         
     | 
| 
      
 86 
     | 
    
         
            +
                                    USMartinLutherKingJrAfter1998Before2015,
         
     | 
| 
      
 87 
     | 
    
         
            +
                                    USPresidentsDayBefore2015,
         
     | 
| 
      
 88 
     | 
    
         
            +
                                    USMemorialDay2013AndPrior,
         
     | 
| 
      
 89 
     | 
    
         
            +
                                    USIndependenceDayBefore2014,
         
     | 
| 
      
 90 
     | 
    
         
            +
                                    USLaborDayStarting1887Before2014,
         
     | 
| 
      
 91 
     | 
    
         
            +
                                    USThanksgivingBefore2014,
         
     | 
| 
      
 92 
     | 
    
         
            +
                                ]
         
     | 
| 
      
 93 
     | 
    
         
            +
                            ),
         
     | 
| 
      
 94 
     | 
    
         
            +
                        ),
         
     | 
| 
      
 95 
     | 
    
         
            +
                        (
         
     | 
| 
      
 96 
     | 
    
         
            +
                            time(12, 15),
         
     | 
| 
      
 97 
     | 
    
         
            +
                            AbstractHolidayCalendar(
         
     | 
| 
      
 98 
     | 
    
         
            +
                                rules=[
         
     | 
| 
      
 99 
     | 
    
         
            +
                                    USIndependenceDayBefore2022PreviousDay,
         
     | 
| 
      
 100 
     | 
    
         
            +
                                    USThanksgivingFriday,
         
     | 
| 
      
 101 
     | 
    
         
            +
                                    ChristmasEveInOrAfter1993,
         
     | 
| 
      
 102 
     | 
    
         
            +
                                ]
         
     | 
| 
      
 103 
     | 
    
         
            +
                            ),
         
     | 
| 
      
 104 
     | 
    
         
            +
                        ),
         
     | 
| 
      
 105 
     | 
    
         
            +
                        (
         
     | 
| 
      
 106 
     | 
    
         
            +
                            time(12),
         
     | 
| 
      
 107 
     | 
    
         
            +
                            AbstractHolidayCalendar(
         
     | 
| 
      
 108 
     | 
    
         
            +
                                rules=[
         
     | 
| 
      
 109 
     | 
    
         
            +
                                    USMartinLutherKingJrAfter2015,
         
     | 
| 
      
 110 
     | 
    
         
            +
                                    USPresidentsDayAfter2015,
         
     | 
| 
      
 111 
     | 
    
         
            +
                                    USMemorialDayAfter2013,
         
     | 
| 
      
 112 
     | 
    
         
            +
                                    USIndependenceDayAfter2014,
         
     | 
| 
      
 113 
     | 
    
         
            +
                                    USLaborDayStarting1887After2014,
         
     | 
| 
      
 114 
     | 
    
         
            +
                                    USThanksgivingAfter2014,
         
     | 
| 
      
 115 
     | 
    
         
            +
                                    USJuneteenthAfter2022,
         
     | 
| 
      
 116 
     | 
    
         
            +
                                ]
         
     | 
| 
      
 117 
     | 
    
         
            +
                            ),
         
     | 
| 
      
 118 
     | 
    
         
            +
                        ),
         
     | 
| 
      
 119 
     | 
    
         
            +
                        (
         
     | 
| 
      
 120 
     | 
    
         
            +
                            time(8, 15),
         
     | 
| 
      
 121 
     | 
    
         
            +
                            AbstractHolidayCalendar(
         
     | 
| 
      
 122 
     | 
    
         
            +
                                rules=[
         
     | 
| 
      
 123 
     | 
    
         
            +
                                    GoodFriday2010,
         
     | 
| 
      
 124 
     | 
    
         
            +
                                    GoodFriday2012,
         
     | 
| 
      
 125 
     | 
    
         
            +
                                    GoodFriday2015,
         
     | 
| 
      
 126 
     | 
    
         
            +
                                    GoodFriday2021,
         
     | 
| 
      
 127 
     | 
    
         
            +
                                    GoodFridayAfter2022,
         
     | 
| 
      
 128 
     | 
    
         
            +
                                ]
         
     | 
| 
      
 129 
     | 
    
         
            +
                            ),
         
     | 
| 
      
 130 
     | 
    
         
            +
                        ),
         
     | 
| 
      
 131 
     | 
    
         
            +
                    ]
         
     | 
| 
         @@ -1,136 +1,136 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            from datetime import time
         
     | 
| 
       2 
     | 
    
         
            -
             
     | 
| 
       3 
     | 
    
         
            -
            from pandas.tseries.holiday import AbstractHolidayCalendar
         
     | 
| 
       4 
     | 
    
         
            -
             
     | 
| 
       5 
     | 
    
         
            -
            from pandas_market_calendars.holidays.cme import (
         
     | 
| 
       6 
     | 
    
         
            -
                USMartinLutherKingJrAfter1998Before2015,
         
     | 
| 
       7 
     | 
    
         
            -
                USMartinLutherKingJrAfter1998Before2016FridayBefore,
         
     | 
| 
       8 
     | 
    
         
            -
                USMartinLutherKingJrAfter2015,
         
     | 
| 
       9 
     | 
    
         
            -
                USPresidentsDayBefore2016FridayBefore,
         
     | 
| 
       10 
     | 
    
         
            -
                USPresidentsDayBefore2015,
         
     | 
| 
       11 
     | 
    
         
            -
                USPresidentsDayAfter2015,
         
     | 
| 
       12 
     | 
    
         
            -
                GoodFridayBefore2021NotEarlyClose,
         
     | 
| 
       13 
     | 
    
         
            -
                GoodFriday2009,
         
     | 
| 
       14 
     | 
    
         
            -
                GoodFriday2010,
         
     | 
| 
       15 
     | 
    
         
            -
                GoodFriday2012,
         
     | 
| 
       16 
     | 
    
         
            -
                GoodFriday2015,
         
     | 
| 
       17 
     | 
    
         
            -
                GoodFriday2021,
         
     | 
| 
       18 
     | 
    
         
            -
                GoodFriday2022,
         
     | 
| 
       19 
     | 
    
         
            -
                GoodFridayAfter2022,
         
     | 
| 
       20 
     | 
    
         
            -
                USMemorialDay2013AndPrior,
         
     | 
| 
       21 
     | 
    
         
            -
                USMemorialDayAfter2013,
         
     | 
| 
       22 
     | 
    
         
            -
                USMemorialDay2015AndPriorFridayBefore,
         
     | 
| 
       23 
     | 
    
         
            -
                USIndependenceDayBefore2014,
         
     | 
| 
       24 
     | 
    
         
            -
                USIndependenceDayAfter2014,
         
     | 
| 
       25 
     | 
    
         
            -
                USLaborDayStarting1887Before2014,
         
     | 
| 
       26 
     | 
    
         
            -
                USLaborDayStarting1887Before2015FridayBefore,
         
     | 
| 
       27 
     | 
    
         
            -
                USLaborDayStarting1887After2014,
         
     | 
| 
       28 
     | 
    
         
            -
                USThanksgivingBefore2014,
         
     | 
| 
       29 
     | 
    
         
            -
                USThanksgivingAfter2014,
         
     | 
| 
       30 
     | 
    
         
            -
                USThanksgivingFriday,
         
     | 
| 
       31 
     | 
    
         
            -
            )
         
     | 
| 
       32 
     | 
    
         
            -
            from pandas_market_calendars.holidays.us import (
         
     | 
| 
       33 
     | 
    
         
            -
                USNewYearsDay,
         
     | 
| 
       34 
     | 
    
         
            -
                ChristmasEveInOrAfter1993,
         
     | 
| 
       35 
     | 
    
         
            -
                Christmas,
         
     | 
| 
       36 
     | 
    
         
            -
                USJuneteenthAfter2022,
         
     | 
| 
       37 
     | 
    
         
            -
            )
         
     | 
| 
       38 
     | 
    
         
            -
            from .cme_globex_base import CMEGlobexBaseExchangeCalendar
         
     | 
| 
       39 
     | 
    
         
            -
             
     | 
| 
       40 
     | 
    
         
            -
             
     | 
| 
       41 
     | 
    
         
            -
            class CMEGlobexFixedIncomeCalendar(CMEGlobexBaseExchangeCalendar):
         
     | 
| 
       42 
     | 
    
         
            -
                aliases = ["CME Globex Fixed Income", "CME Globex Interest Rate Products"]
         
     | 
| 
       43 
     | 
    
         
            -
             
     | 
| 
       44 
     | 
    
         
            -
                regular_market_times = {
         
     | 
| 
       45 
     | 
    
         
            -
                    "market_open": ((None, time(18), -1),),
         
     | 
| 
       46 
     | 
    
         
            -
                    "market_close": ((None, time(17)),),
         
     | 
| 
       47 
     | 
    
         
            -
                }
         
     | 
| 
       48 
     | 
    
         
            -
             
     | 
| 
       49 
     | 
    
         
            -
                """ 
         
     | 
| 
       50 
     | 
    
         
            -
                Not yet implemented:
         
     | 
| 
       51 
     | 
    
         
            -
                    Christmas/New_Years
         
     | 
| 
       52 
     | 
    
         
            -
                        5am special open for a couple years (see tests)
         
     | 
| 
       53 
     | 
    
         
            -
                    
         
     | 
| 
       54 
     | 
    
         
            -
                    regular market_open/market_close changed from 17/16 to 18/17?
         
     | 
| 
       55 
     | 
    
         
            -
                """
         
     | 
| 
       56 
     | 
    
         
            -
             
     | 
| 
       57 
     | 
    
         
            -
                @property
         
     | 
| 
       58 
     | 
    
         
            -
                def name(self):
         
     | 
| 
       59 
     | 
    
         
            -
                    return "CME Globex Fixed Income"
         
     | 
| 
       60 
     | 
    
         
            -
             
     | 
| 
       61 
     | 
    
         
            -
                @property
         
     | 
| 
       62 
     | 
    
         
            -
                def regular_holidays(self):
         
     | 
| 
       63 
     | 
    
         
            -
                    return AbstractHolidayCalendar(
         
     | 
| 
       64 
     | 
    
         
            -
                        rules=[
         
     | 
| 
       65 
     | 
    
         
            -
                            USNewYearsDay,
         
     | 
| 
       66 
     | 
    
         
            -
                            GoodFridayBefore2021NotEarlyClose,
         
     | 
| 
       67 
     | 
    
         
            -
                            GoodFriday2022,
         
     | 
| 
       68 
     | 
    
         
            -
                            Christmas,
         
     | 
| 
       69 
     | 
    
         
            -
                        ]
         
     | 
| 
       70 
     | 
    
         
            -
                    )
         
     | 
| 
       71 
     | 
    
         
            -
             
     | 
| 
       72 
     | 
    
         
            -
                @property
         
     | 
| 
       73 
     | 
    
         
            -
                def special_closes_adhoc(self):
         
     | 
| 
       74 
     | 
    
         
            -
                    return [
         
     | 
| 
       75 
     | 
    
         
            -
                        (time(15, 15), ["2010-07-02", "2011-07-01"]),
         
     | 
| 
       76 
     | 
    
         
            -
                        (time(12, 15), ["2010-12-31"]),
         
     | 
| 
       77 
     | 
    
         
            -
                    ]
         
     | 
| 
       78 
     | 
    
         
            -
             
     | 
| 
       79 
     | 
    
         
            -
                @property
         
     | 
| 
       80 
     | 
    
         
            -
                def special_closes(self):
         
     | 
| 
       81 
     | 
    
         
            -
                    # Source https://www.cmegroup.com/tools-information/holiday-calendar.html
         
     | 
| 
       82 
     | 
    
         
            -
                    return [
         
     | 
| 
       83 
     | 
    
         
            -
                        (
         
     | 
| 
       84 
     | 
    
         
            -
                            time(12),
         
     | 
| 
       85 
     | 
    
         
            -
                            AbstractHolidayCalendar(
         
     | 
| 
       86 
     | 
    
         
            -
                                rules=[
         
     | 
| 
       87 
     | 
    
         
            -
                                    USMartinLutherKingJrAfter1998Before2015,
         
     | 
| 
       88 
     | 
    
         
            -
                                    USMartinLutherKingJrAfter2015,
         
     | 
| 
       89 
     | 
    
         
            -
                                    USPresidentsDayBefore2015,
         
     | 
| 
       90 
     | 
    
         
            -
                                    USPresidentsDayAfter2015,
         
     | 
| 
       91 
     | 
    
         
            -
                                    USMemorialDay2013AndPrior,
         
     | 
| 
       92 
     | 
    
         
            -
                                    USMemorialDayAfter2013,
         
     | 
| 
       93 
     | 
    
         
            -
                                    USIndependenceDayBefore2014,
         
     | 
| 
       94 
     | 
    
         
            -
                                    USIndependenceDayAfter2014,
         
     | 
| 
       95 
     | 
    
         
            -
                                    USLaborDayStarting1887Before2014,
         
     | 
| 
       96 
     | 
    
         
            -
                                    USLaborDayStarting1887After2014,
         
     | 
| 
       97 
     | 
    
         
            -
                                    USThanksgivingBefore2014,
         
     | 
| 
       98 
     | 
    
         
            -
                                    USThanksgivingAfter2014,
         
     | 
| 
       99 
     | 
    
         
            -
                                    USJuneteenthAfter2022,
         
     | 
| 
       100 
     | 
    
         
            -
                                ]
         
     | 
| 
       101 
     | 
    
         
            -
                            ),
         
     | 
| 
       102 
     | 
    
         
            -
                        ),
         
     | 
| 
       103 
     | 
    
         
            -
                        (
         
     | 
| 
       104 
     | 
    
         
            -
                            time(15, 15),
         
     | 
| 
       105 
     | 
    
         
            -
                            AbstractHolidayCalendar(
         
     | 
| 
       106 
     | 
    
         
            -
                                rules=[
         
     | 
| 
       107 
     | 
    
         
            -
                                    USMartinLutherKingJrAfter1998Before2016FridayBefore,
         
     | 
| 
       108 
     | 
    
         
            -
                                    USPresidentsDayBefore2016FridayBefore,
         
     | 
| 
       109 
     | 
    
         
            -
                                    GoodFriday2009,
         
     | 
| 
       110 
     | 
    
         
            -
                                    USMemorialDay2015AndPriorFridayBefore,
         
     | 
| 
       111 
     | 
    
         
            -
                                    USLaborDayStarting1887Before2015FridayBefore,
         
     | 
| 
       112 
     | 
    
         
            -
                                ]
         
     | 
| 
       113 
     | 
    
         
            -
                            ),
         
     | 
| 
       114 
     | 
    
         
            -
                        ),
         
     | 
| 
       115 
     | 
    
         
            -
                        (
         
     | 
| 
       116 
     | 
    
         
            -
                            time(12, 15),
         
     | 
| 
       117 
     | 
    
         
            -
                            AbstractHolidayCalendar(
         
     | 
| 
       118 
     | 
    
         
            -
                                rules=[
         
     | 
| 
       119 
     | 
    
         
            -
                                    USThanksgivingFriday,
         
     | 
| 
       120 
     | 
    
         
            -
                                    ChristmasEveInOrAfter1993,
         
     | 
| 
       121 
     | 
    
         
            -
                                ]
         
     | 
| 
       122 
     | 
    
         
            -
                            ),
         
     | 
| 
       123 
     | 
    
         
            -
                        ),
         
     | 
| 
       124 
     | 
    
         
            -
                        (
         
     | 
| 
       125 
     | 
    
         
            -
                            time(10, 15),
         
     | 
| 
       126 
     | 
    
         
            -
                            AbstractHolidayCalendar(
         
     | 
| 
       127 
     | 
    
         
            -
                                rules=[
         
     | 
| 
       128 
     | 
    
         
            -
                                    GoodFriday2010,
         
     | 
| 
       129 
     | 
    
         
            -
                                    GoodFriday2012,
         
     | 
| 
       130 
     | 
    
         
            -
                                    GoodFriday2015,
         
     | 
| 
       131 
     | 
    
         
            -
                                    GoodFriday2021,
         
     | 
| 
       132 
     | 
    
         
            -
                                    GoodFridayAfter2022,
         
     | 
| 
       133 
     | 
    
         
            -
                                ]
         
     | 
| 
       134 
     | 
    
         
            -
                            ),
         
     | 
| 
       135 
     | 
    
         
            -
                        ),
         
     | 
| 
       136 
     | 
    
         
            -
                    ]
         
     | 
| 
      
 1 
     | 
    
         
            +
            from datetime import time
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            from pandas.tseries.holiday import AbstractHolidayCalendar
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
            from pandas_market_calendars.holidays.cme import (
         
     | 
| 
      
 6 
     | 
    
         
            +
                USMartinLutherKingJrAfter1998Before2015,
         
     | 
| 
      
 7 
     | 
    
         
            +
                USMartinLutherKingJrAfter1998Before2016FridayBefore,
         
     | 
| 
      
 8 
     | 
    
         
            +
                USMartinLutherKingJrAfter2015,
         
     | 
| 
      
 9 
     | 
    
         
            +
                USPresidentsDayBefore2016FridayBefore,
         
     | 
| 
      
 10 
     | 
    
         
            +
                USPresidentsDayBefore2015,
         
     | 
| 
      
 11 
     | 
    
         
            +
                USPresidentsDayAfter2015,
         
     | 
| 
      
 12 
     | 
    
         
            +
                GoodFridayBefore2021NotEarlyClose,
         
     | 
| 
      
 13 
     | 
    
         
            +
                GoodFriday2009,
         
     | 
| 
      
 14 
     | 
    
         
            +
                GoodFriday2010,
         
     | 
| 
      
 15 
     | 
    
         
            +
                GoodFriday2012,
         
     | 
| 
      
 16 
     | 
    
         
            +
                GoodFriday2015,
         
     | 
| 
      
 17 
     | 
    
         
            +
                GoodFriday2021,
         
     | 
| 
      
 18 
     | 
    
         
            +
                GoodFriday2022,
         
     | 
| 
      
 19 
     | 
    
         
            +
                GoodFridayAfter2022,
         
     | 
| 
      
 20 
     | 
    
         
            +
                USMemorialDay2013AndPrior,
         
     | 
| 
      
 21 
     | 
    
         
            +
                USMemorialDayAfter2013,
         
     | 
| 
      
 22 
     | 
    
         
            +
                USMemorialDay2015AndPriorFridayBefore,
         
     | 
| 
      
 23 
     | 
    
         
            +
                USIndependenceDayBefore2014,
         
     | 
| 
      
 24 
     | 
    
         
            +
                USIndependenceDayAfter2014,
         
     | 
| 
      
 25 
     | 
    
         
            +
                USLaborDayStarting1887Before2014,
         
     | 
| 
      
 26 
     | 
    
         
            +
                USLaborDayStarting1887Before2015FridayBefore,
         
     | 
| 
      
 27 
     | 
    
         
            +
                USLaborDayStarting1887After2014,
         
     | 
| 
      
 28 
     | 
    
         
            +
                USThanksgivingBefore2014,
         
     | 
| 
      
 29 
     | 
    
         
            +
                USThanksgivingAfter2014,
         
     | 
| 
      
 30 
     | 
    
         
            +
                USThanksgivingFriday,
         
     | 
| 
      
 31 
     | 
    
         
            +
            )
         
     | 
| 
      
 32 
     | 
    
         
            +
            from pandas_market_calendars.holidays.us import (
         
     | 
| 
      
 33 
     | 
    
         
            +
                USNewYearsDay,
         
     | 
| 
      
 34 
     | 
    
         
            +
                ChristmasEveInOrAfter1993,
         
     | 
| 
      
 35 
     | 
    
         
            +
                Christmas,
         
     | 
| 
      
 36 
     | 
    
         
            +
                USJuneteenthAfter2022,
         
     | 
| 
      
 37 
     | 
    
         
            +
            )
         
     | 
| 
      
 38 
     | 
    
         
            +
            from .cme_globex_base import CMEGlobexBaseExchangeCalendar
         
     | 
| 
      
 39 
     | 
    
         
            +
             
     | 
| 
      
 40 
     | 
    
         
            +
             
     | 
| 
      
 41 
     | 
    
         
            +
            class CMEGlobexFixedIncomeCalendar(CMEGlobexBaseExchangeCalendar):
         
     | 
| 
      
 42 
     | 
    
         
            +
                aliases = ["CME Globex Fixed Income", "CME Globex Interest Rate Products"]
         
     | 
| 
      
 43 
     | 
    
         
            +
             
     | 
| 
      
 44 
     | 
    
         
            +
                regular_market_times = {
         
     | 
| 
      
 45 
     | 
    
         
            +
                    "market_open": ((None, time(18), -1),),
         
     | 
| 
      
 46 
     | 
    
         
            +
                    "market_close": ((None, time(17)),),
         
     | 
| 
      
 47 
     | 
    
         
            +
                }
         
     | 
| 
      
 48 
     | 
    
         
            +
             
     | 
| 
      
 49 
     | 
    
         
            +
                """ 
         
     | 
| 
      
 50 
     | 
    
         
            +
                Not yet implemented:
         
     | 
| 
      
 51 
     | 
    
         
            +
                    Christmas/New_Years
         
     | 
| 
      
 52 
     | 
    
         
            +
                        5am special open for a couple years (see tests)
         
     | 
| 
      
 53 
     | 
    
         
            +
                    
         
     | 
| 
      
 54 
     | 
    
         
            +
                    regular market_open/market_close changed from 17/16 to 18/17?
         
     | 
| 
      
 55 
     | 
    
         
            +
                """
         
     | 
| 
      
 56 
     | 
    
         
            +
             
     | 
| 
      
 57 
     | 
    
         
            +
                @property
         
     | 
| 
      
 58 
     | 
    
         
            +
                def name(self):
         
     | 
| 
      
 59 
     | 
    
         
            +
                    return "CME Globex Fixed Income"
         
     | 
| 
      
 60 
     | 
    
         
            +
             
     | 
| 
      
 61 
     | 
    
         
            +
                @property
         
     | 
| 
      
 62 
     | 
    
         
            +
                def regular_holidays(self):
         
     | 
| 
      
 63 
     | 
    
         
            +
                    return AbstractHolidayCalendar(
         
     | 
| 
      
 64 
     | 
    
         
            +
                        rules=[
         
     | 
| 
      
 65 
     | 
    
         
            +
                            USNewYearsDay,
         
     | 
| 
      
 66 
     | 
    
         
            +
                            GoodFridayBefore2021NotEarlyClose,
         
     | 
| 
      
 67 
     | 
    
         
            +
                            GoodFriday2022,
         
     | 
| 
      
 68 
     | 
    
         
            +
                            Christmas,
         
     | 
| 
      
 69 
     | 
    
         
            +
                        ]
         
     | 
| 
      
 70 
     | 
    
         
            +
                    )
         
     | 
| 
      
 71 
     | 
    
         
            +
             
     | 
| 
      
 72 
     | 
    
         
            +
                @property
         
     | 
| 
      
 73 
     | 
    
         
            +
                def special_closes_adhoc(self):
         
     | 
| 
      
 74 
     | 
    
         
            +
                    return [
         
     | 
| 
      
 75 
     | 
    
         
            +
                        (time(15, 15), ["2010-07-02", "2011-07-01"]),
         
     | 
| 
      
 76 
     | 
    
         
            +
                        (time(12, 15), ["2010-12-31"]),
         
     | 
| 
      
 77 
     | 
    
         
            +
                    ]
         
     | 
| 
      
 78 
     | 
    
         
            +
             
     | 
| 
      
 79 
     | 
    
         
            +
                @property
         
     | 
| 
      
 80 
     | 
    
         
            +
                def special_closes(self):
         
     | 
| 
      
 81 
     | 
    
         
            +
                    # Source https://www.cmegroup.com/tools-information/holiday-calendar.html
         
     | 
| 
      
 82 
     | 
    
         
            +
                    return [
         
     | 
| 
      
 83 
     | 
    
         
            +
                        (
         
     | 
| 
      
 84 
     | 
    
         
            +
                            time(12),
         
     | 
| 
      
 85 
     | 
    
         
            +
                            AbstractHolidayCalendar(
         
     | 
| 
      
 86 
     | 
    
         
            +
                                rules=[
         
     | 
| 
      
 87 
     | 
    
         
            +
                                    USMartinLutherKingJrAfter1998Before2015,
         
     | 
| 
      
 88 
     | 
    
         
            +
                                    USMartinLutherKingJrAfter2015,
         
     | 
| 
      
 89 
     | 
    
         
            +
                                    USPresidentsDayBefore2015,
         
     | 
| 
      
 90 
     | 
    
         
            +
                                    USPresidentsDayAfter2015,
         
     | 
| 
      
 91 
     | 
    
         
            +
                                    USMemorialDay2013AndPrior,
         
     | 
| 
      
 92 
     | 
    
         
            +
                                    USMemorialDayAfter2013,
         
     | 
| 
      
 93 
     | 
    
         
            +
                                    USIndependenceDayBefore2014,
         
     | 
| 
      
 94 
     | 
    
         
            +
                                    USIndependenceDayAfter2014,
         
     | 
| 
      
 95 
     | 
    
         
            +
                                    USLaborDayStarting1887Before2014,
         
     | 
| 
      
 96 
     | 
    
         
            +
                                    USLaborDayStarting1887After2014,
         
     | 
| 
      
 97 
     | 
    
         
            +
                                    USThanksgivingBefore2014,
         
     | 
| 
      
 98 
     | 
    
         
            +
                                    USThanksgivingAfter2014,
         
     | 
| 
      
 99 
     | 
    
         
            +
                                    USJuneteenthAfter2022,
         
     | 
| 
      
 100 
     | 
    
         
            +
                                ]
         
     | 
| 
      
 101 
     | 
    
         
            +
                            ),
         
     | 
| 
      
 102 
     | 
    
         
            +
                        ),
         
     | 
| 
      
 103 
     | 
    
         
            +
                        (
         
     | 
| 
      
 104 
     | 
    
         
            +
                            time(15, 15),
         
     | 
| 
      
 105 
     | 
    
         
            +
                            AbstractHolidayCalendar(
         
     | 
| 
      
 106 
     | 
    
         
            +
                                rules=[
         
     | 
| 
      
 107 
     | 
    
         
            +
                                    USMartinLutherKingJrAfter1998Before2016FridayBefore,
         
     | 
| 
      
 108 
     | 
    
         
            +
                                    USPresidentsDayBefore2016FridayBefore,
         
     | 
| 
      
 109 
     | 
    
         
            +
                                    GoodFriday2009,
         
     | 
| 
      
 110 
     | 
    
         
            +
                                    USMemorialDay2015AndPriorFridayBefore,
         
     | 
| 
      
 111 
     | 
    
         
            +
                                    USLaborDayStarting1887Before2015FridayBefore,
         
     | 
| 
      
 112 
     | 
    
         
            +
                                ]
         
     | 
| 
      
 113 
     | 
    
         
            +
                            ),
         
     | 
| 
      
 114 
     | 
    
         
            +
                        ),
         
     | 
| 
      
 115 
     | 
    
         
            +
                        (
         
     | 
| 
      
 116 
     | 
    
         
            +
                            time(12, 15),
         
     | 
| 
      
 117 
     | 
    
         
            +
                            AbstractHolidayCalendar(
         
     | 
| 
      
 118 
     | 
    
         
            +
                                rules=[
         
     | 
| 
      
 119 
     | 
    
         
            +
                                    USThanksgivingFriday,
         
     | 
| 
      
 120 
     | 
    
         
            +
                                    ChristmasEveInOrAfter1993,
         
     | 
| 
      
 121 
     | 
    
         
            +
                                ]
         
     | 
| 
      
 122 
     | 
    
         
            +
                            ),
         
     | 
| 
      
 123 
     | 
    
         
            +
                        ),
         
     | 
| 
      
 124 
     | 
    
         
            +
                        (
         
     | 
| 
      
 125 
     | 
    
         
            +
                            time(10, 15),
         
     | 
| 
      
 126 
     | 
    
         
            +
                            AbstractHolidayCalendar(
         
     | 
| 
      
 127 
     | 
    
         
            +
                                rules=[
         
     | 
| 
      
 128 
     | 
    
         
            +
                                    GoodFriday2010,
         
     | 
| 
      
 129 
     | 
    
         
            +
                                    GoodFriday2012,
         
     | 
| 
      
 130 
     | 
    
         
            +
                                    GoodFriday2015,
         
     | 
| 
      
 131 
     | 
    
         
            +
                                    GoodFriday2021,
         
     | 
| 
      
 132 
     | 
    
         
            +
                                    GoodFridayAfter2022,
         
     | 
| 
      
 133 
     | 
    
         
            +
                                ]
         
     | 
| 
      
 134 
     | 
    
         
            +
                            ),
         
     | 
| 
      
 135 
     | 
    
         
            +
                        ),
         
     | 
| 
      
 136 
     | 
    
         
            +
                    ]
         
     |