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,405 +1,417 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            #
         
     | 
| 
       2 
     | 
    
         
            -
            # Copyright 2016 Quantopian, Inc.
         
     | 
| 
       3 
     | 
    
         
            -
            #
         
     | 
| 
       4 
     | 
    
         
            -
            # Licensed under the Apache License, Version 2.0 (the "License");
         
     | 
| 
       5 
     | 
    
         
            -
            # you may not use this file except in compliance with the License.
         
     | 
| 
       6 
     | 
    
         
            -
            # You may obtain a copy of the License at
         
     | 
| 
       7 
     | 
    
         
            -
            #
         
     | 
| 
       8 
     | 
    
         
            -
            #     http://www.apache.org/licenses/LICENSE-2.0
         
     | 
| 
       9 
     | 
    
         
            -
            #
         
     | 
| 
       10 
     | 
    
         
            -
            # Unless required by applicable law or agreed to in writing, software
         
     | 
| 
       11 
     | 
    
         
            -
            # distributed under the License is distributed on an "AS IS" BASIS,
         
     | 
| 
       12 
     | 
    
         
            -
            # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
         
     | 
| 
       13 
     | 
    
         
            -
            # See the License for the specific language governing permissions and
         
     | 
| 
       14 
     | 
    
         
            -
            # limitations under the License.
         
     | 
| 
       15 
     | 
    
         
            -
             
     | 
| 
       16 
     | 
    
         
            -
            from datetime import time
         
     | 
| 
       17 
     | 
    
         
            -
            from itertools import chain
         
     | 
| 
       18 
     | 
    
         
            -
             
     | 
| 
       19 
     | 
    
         
            -
            from pandas import Timestamp
         
     | 
| 
       20 
     | 
    
         
            -
            from pandas.tseries.holiday import (
         
     | 
| 
       21 
     | 
    
         
            -
                AbstractHolidayCalendar,
         
     | 
| 
       22 
     | 
    
         
            -
                GoodFriday,
         
     | 
| 
       23 
     | 
    
         
            -
                USLaborDay,
         
     | 
| 
       24 
     | 
    
         
            -
                USPresidentsDay,
         
     | 
| 
       25 
     | 
    
         
            -
                USThanksgivingDay,
         
     | 
| 
       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 
     | 
    
         
            -
                @property
         
     | 
| 
       88 
     | 
    
         
            -
                def  
     | 
| 
       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 
     | 
    
         
            -
             
     | 
| 
       124 
     | 
    
         
            -
             
     | 
| 
       125 
     | 
    
         
            -
             
     | 
| 
       126 
     | 
    
         
            -
             
     | 
| 
       127 
     | 
    
         
            -
                 
     | 
| 
       128 
     | 
    
         
            -
             
     | 
| 
       129 
     | 
    
         
            -
             
     | 
| 
       130 
     | 
    
         
            -
             
     | 
| 
       131 
     | 
    
         
            -
             
     | 
| 
       132 
     | 
    
         
            -
             
     | 
| 
       133 
     | 
    
         
            -
                 
     | 
| 
       134 
     | 
    
         
            -
             
     | 
| 
       135 
     | 
    
         
            -
             
     | 
| 
       136 
     | 
    
         
            -
                 
     | 
| 
       137 
     | 
    
         
            -
             
     | 
| 
       138 
     | 
    
         
            -
             
     | 
| 
       139 
     | 
    
         
            -
                 
     | 
| 
       140 
     | 
    
         
            -
                     
     | 
| 
       141 
     | 
    
         
            -
             
     | 
| 
       142 
     | 
    
         
            -
             
     | 
| 
       143 
     | 
    
         
            -
             
     | 
| 
       144 
     | 
    
         
            -
             
     | 
| 
       145 
     | 
    
         
            -
             
     | 
| 
       146 
     | 
    
         
            -
             
     | 
| 
       147 
     | 
    
         
            -
             
     | 
| 
       148 
     | 
    
         
            -
             
     | 
| 
       149 
     | 
    
         
            -
             
     | 
| 
       150 
     | 
    
         
            -
             
     | 
| 
       151 
     | 
    
         
            -
             
     | 
| 
       152 
     | 
    
         
            -
                     
     | 
| 
       153 
     | 
    
         
            -
             
     | 
| 
       154 
     | 
    
         
            -
             
     | 
| 
       155 
     | 
    
         
            -
             
     | 
| 
       156 
     | 
    
         
            -
                    return  
     | 
| 
       157 
     | 
    
         
            -
             
     | 
| 
       158 
     | 
    
         
            -
             
     | 
| 
       159 
     | 
    
         
            -
             
     | 
| 
       160 
     | 
    
         
            -
             
     | 
| 
       161 
     | 
    
         
            -
             
     | 
| 
       162 
     | 
    
         
            -
             
     | 
| 
       163 
     | 
    
         
            -
             
     | 
| 
       164 
     | 
    
         
            -
             
     | 
| 
       165 
     | 
    
         
            -
             
     | 
| 
       166 
     | 
    
         
            -
             
     | 
| 
       167 
     | 
    
         
            -
             
     | 
| 
       168 
     | 
    
         
            -
             
     | 
| 
       169 
     | 
    
         
            -
             
     | 
| 
       170 
     | 
    
         
            -
             
     | 
| 
       171 
     | 
    
         
            -
             
     | 
| 
       172 
     | 
    
         
            -
             
     | 
| 
       173 
     | 
    
         
            -
             
     | 
| 
       174 
     | 
    
         
            -
             
     | 
| 
       175 
     | 
    
         
            -
             
     | 
| 
       176 
     | 
    
         
            -
             
     | 
| 
       177 
     | 
    
         
            -
             
     | 
| 
       178 
     | 
    
         
            -
             
     | 
| 
       179 
     | 
    
         
            -
                             
     | 
| 
       180 
     | 
    
         
            -
             
     | 
| 
       181 
     | 
    
         
            -
             
     | 
| 
       182 
     | 
    
         
            -
             
     | 
| 
       183 
     | 
    
         
            -
             
     | 
| 
       184 
     | 
    
         
            -
             
     | 
| 
       185 
     | 
    
         
            -
             
     | 
| 
       186 
     | 
    
         
            -
             
     | 
| 
       187 
     | 
    
         
            -
             
     | 
| 
       188 
     | 
    
         
            -
             
     | 
| 
       189 
     | 
    
         
            -
             
     | 
| 
       190 
     | 
    
         
            -
             
     | 
| 
       191 
     | 
    
         
            -
             
     | 
| 
       192 
     | 
    
         
            -
             
     | 
| 
       193 
     | 
    
         
            -
             
     | 
| 
       194 
     | 
    
         
            -
             
     | 
| 
       195 
     | 
    
         
            -
             
     | 
| 
       196 
     | 
    
         
            -
             
     | 
| 
       197 
     | 
    
         
            -
             
     | 
| 
       198 
     | 
    
         
            -
             
     | 
| 
       199 
     | 
    
         
            -
             
     | 
| 
       200 
     | 
    
         
            -
             
     | 
| 
       201 
     | 
    
         
            -
             
     | 
| 
       202 
     | 
    
         
            -
             
     | 
| 
       203 
     | 
    
         
            -
             
     | 
| 
       204 
     | 
    
         
            -
             
     | 
| 
       205 
     | 
    
         
            -
                " 
     | 
| 
       206 
     | 
    
         
            -
                " 
     | 
| 
       207 
     | 
    
         
            -
                " 
     | 
| 
       208 
     | 
    
         
            -
                " 
     | 
| 
       209 
     | 
    
         
            -
                " 
     | 
| 
       210 
     | 
    
         
            -
                " 
     | 
| 
       211 
     | 
    
         
            -
                " 
     | 
| 
       212 
     | 
    
         
            -
                " 
     | 
| 
       213 
     | 
    
         
            -
                " 
     | 
| 
       214 
     | 
    
         
            -
                " 
     | 
| 
       215 
     | 
    
         
            -
                " 
     | 
| 
       216 
     | 
    
         
            -
                " 
     | 
| 
       217 
     | 
    
         
            -
                " 
     | 
| 
       218 
     | 
    
         
            -
                " 
     | 
| 
       219 
     | 
    
         
            -
                " 
     | 
| 
       220 
     | 
    
         
            -
                " 
     | 
| 
       221 
     | 
    
         
            -
                " 
     | 
| 
       222 
     | 
    
         
            -
                " 
     | 
| 
       223 
     | 
    
         
            -
                " 
     | 
| 
       224 
     | 
    
         
            -
                " 
     | 
| 
       225 
     | 
    
         
            -
                " 
     | 
| 
       226 
     | 
    
         
            -
                " 
     | 
| 
       227 
     | 
    
         
            -
                " 
     | 
| 
       228 
     | 
    
         
            -
                " 
     | 
| 
       229 
     | 
    
         
            -
                " 
     | 
| 
       230 
     | 
    
         
            -
                " 
     | 
| 
       231 
     | 
    
         
            -
                " 
     | 
| 
       232 
     | 
    
         
            -
                " 
     | 
| 
       233 
     | 
    
         
            -
                " 
     | 
| 
       234 
     | 
    
         
            -
                " 
     | 
| 
       235 
     | 
    
         
            -
                " 
     | 
| 
       236 
     | 
    
         
            -
                " 
     | 
| 
       237 
     | 
    
         
            -
                " 
     | 
| 
       238 
     | 
    
         
            -
                " 
     | 
| 
       239 
     | 
    
         
            -
                " 
     | 
| 
       240 
     | 
    
         
            -
                " 
     | 
| 
       241 
     | 
    
         
            -
                " 
     | 
| 
       242 
     | 
    
         
            -
                " 
     | 
| 
       243 
     | 
    
         
            -
                " 
     | 
| 
       244 
     | 
    
         
            -
                " 
     | 
| 
       245 
     | 
    
         
            -
                " 
     | 
| 
       246 
     | 
    
         
            -
                " 
     | 
| 
       247 
     | 
    
         
            -
                " 
     | 
| 
       248 
     | 
    
         
            -
                " 
     | 
| 
       249 
     | 
    
         
            -
                " 
     | 
| 
       250 
     | 
    
         
            -
                " 
     | 
| 
       251 
     | 
    
         
            -
                " 
     | 
| 
       252 
     | 
    
         
            -
                " 
     | 
| 
       253 
     | 
    
         
            -
                " 
     | 
| 
       254 
     | 
    
         
            -
                " 
     | 
| 
       255 
     | 
    
         
            -
                " 
     | 
| 
       256 
     | 
    
         
            -
                " 
     | 
| 
       257 
     | 
    
         
            -
                " 
     | 
| 
       258 
     | 
    
         
            -
                " 
     | 
| 
       259 
     | 
    
         
            -
                " 
     | 
| 
       260 
     | 
    
         
            -
                " 
     | 
| 
       261 
     | 
    
         
            -
                " 
     | 
| 
       262 
     | 
    
         
            -
                " 
     | 
| 
       263 
     | 
    
         
            -
                " 
     | 
| 
       264 
     | 
    
         
            -
                " 
     | 
| 
       265 
     | 
    
         
            -
                " 
     | 
| 
       266 
     | 
    
         
            -
                " 
     | 
| 
       267 
     | 
    
         
            -
                " 
     | 
| 
       268 
     | 
    
         
            -
                " 
     | 
| 
       269 
     | 
    
         
            -
                " 
     | 
| 
       270 
     | 
    
         
            -
                " 
     | 
| 
       271 
     | 
    
         
            -
                " 
     | 
| 
       272 
     | 
    
         
            -
                " 
     | 
| 
       273 
     | 
    
         
            -
                " 
     | 
| 
       274 
     | 
    
         
            -
                " 
     | 
| 
       275 
     | 
    
         
            -
                " 
     | 
| 
       276 
     | 
    
         
            -
                " 
     | 
| 
       277 
     | 
    
         
            -
                " 
     | 
| 
       278 
     | 
    
         
            -
                " 
     | 
| 
       279 
     | 
    
         
            -
                " 
     | 
| 
       280 
     | 
    
         
            -
                " 
     | 
| 
       281 
     | 
    
         
            -
                " 
     | 
| 
       282 
     | 
    
         
            -
                " 
     | 
| 
       283 
     | 
    
         
            -
                " 
     | 
| 
       284 
     | 
    
         
            -
                " 
     | 
| 
       285 
     | 
    
         
            -
                " 
     | 
| 
       286 
     | 
    
         
            -
                " 
     | 
| 
       287 
     | 
    
         
            -
                " 
     | 
| 
       288 
     | 
    
         
            -
                " 
     | 
| 
       289 
     | 
    
         
            -
                " 
     | 
| 
       290 
     | 
    
         
            -
                " 
     | 
| 
       291 
     | 
    
         
            -
                " 
     | 
| 
       292 
     | 
    
         
            -
                " 
     | 
| 
       293 
     | 
    
         
            -
                " 
     | 
| 
       294 
     | 
    
         
            -
             
     | 
| 
       295 
     | 
    
         
            -
             
     | 
| 
       296 
     | 
    
         
            -
             
     | 
| 
       297 
     | 
    
         
            -
             
     | 
| 
       298 
     | 
    
         
            -
             
     | 
| 
       299 
     | 
    
         
            -
                " 
     | 
| 
       300 
     | 
    
         
            -
                " 
     | 
| 
       301 
     | 
    
         
            -
                " 
     | 
| 
       302 
     | 
    
         
            -
                " 
     | 
| 
       303 
     | 
    
         
            -
                " 
     | 
| 
       304 
     | 
    
         
            -
                " 
     | 
| 
       305 
     | 
    
         
            -
                " 
     | 
| 
       306 
     | 
    
         
            -
             
     | 
| 
       307 
     | 
    
         
            -
             
     | 
| 
       308 
     | 
    
         
            -
             
     | 
| 
       309 
     | 
    
         
            -
             
     | 
| 
       310 
     | 
    
         
            -
             
     | 
| 
       311 
     | 
    
         
            -
                " 
     | 
| 
       312 
     | 
    
         
            -
                " 
     | 
| 
       313 
     | 
    
         
            -
                " 
     | 
| 
       314 
     | 
    
         
            -
                " 
     | 
| 
       315 
     | 
    
         
            -
                " 
     | 
| 
       316 
     | 
    
         
            -
                " 
     | 
| 
       317 
     | 
    
         
            -
                " 
     | 
| 
       318 
     | 
    
         
            -
                " 
     | 
| 
       319 
     | 
    
         
            -
                " 
     | 
| 
       320 
     | 
    
         
            -
                " 
     | 
| 
       321 
     | 
    
         
            -
                " 
     | 
| 
       322 
     | 
    
         
            -
                " 
     | 
| 
       323 
     | 
    
         
            -
                " 
     | 
| 
       324 
     | 
    
         
            -
                " 
     | 
| 
       325 
     | 
    
         
            -
                " 
     | 
| 
       326 
     | 
    
         
            -
                " 
     | 
| 
       327 
     | 
    
         
            -
                " 
     | 
| 
       328 
     | 
    
         
            -
             
     | 
| 
       329 
     | 
    
         
            -
             
     | 
| 
       330 
     | 
    
         
            -
             
     | 
| 
       331 
     | 
    
         
            -
             
     | 
| 
       332 
     | 
    
         
            -
             
     | 
| 
       333 
     | 
    
         
            -
             
     | 
| 
       334 
     | 
    
         
            -
                "" 
     | 
| 
       335 
     | 
    
         
            -
                 
     | 
| 
       336 
     | 
    
         
            -
             
     | 
| 
       337 
     | 
    
         
            -
                 
     | 
| 
       338 
     | 
    
         
            -
                 
     | 
| 
       339 
     | 
    
         
            -
                "" 
     | 
| 
       340 
     | 
    
         
            -
             
     | 
| 
       341 
     | 
    
         
            -
             
     | 
| 
       342 
     | 
    
         
            -
             
     | 
| 
       343 
     | 
    
         
            -
             
     | 
| 
       344 
     | 
    
         
            -
             
     | 
| 
       345 
     | 
    
         
            -
             
     | 
| 
       346 
     | 
    
         
            -
             
     | 
| 
       347 
     | 
    
         
            -
             
     | 
| 
       348 
     | 
    
         
            -
             
     | 
| 
       349 
     | 
    
         
            -
                 
     | 
| 
       350 
     | 
    
         
            -
             
     | 
| 
       351 
     | 
    
         
            -
             
     | 
| 
       352 
     | 
    
         
            -
             
     | 
| 
       353 
     | 
    
         
            -
             
     | 
| 
       354 
     | 
    
         
            -
             
     | 
| 
       355 
     | 
    
         
            -
             
     | 
| 
       356 
     | 
    
         
            -
                     
     | 
| 
       357 
     | 
    
         
            -
             
     | 
| 
       358 
     | 
    
         
            -
             
     | 
| 
       359 
     | 
    
         
            -
             
     | 
| 
       360 
     | 
    
         
            -
             
     | 
| 
       361 
     | 
    
         
            -
             
     | 
| 
       362 
     | 
    
         
            -
             
     | 
| 
       363 
     | 
    
         
            -
             
     | 
| 
       364 
     | 
    
         
            -
             
     | 
| 
       365 
     | 
    
         
            -
             
     | 
| 
       366 
     | 
    
         
            -
             
     | 
| 
       367 
     | 
    
         
            -
             
     | 
| 
       368 
     | 
    
         
            -
             
     | 
| 
       369 
     | 
    
         
            -
             
     | 
| 
       370 
     | 
    
         
            -
             
     | 
| 
       371 
     | 
    
         
            -
                 
     | 
| 
       372 
     | 
    
         
            -
             
     | 
| 
       373 
     | 
    
         
            -
             
     | 
| 
       374 
     | 
    
         
            -
             
     | 
| 
       375 
     | 
    
         
            -
                 
     | 
| 
       376 
     | 
    
         
            -
             
     | 
| 
       377 
     | 
    
         
            -
             
     | 
| 
       378 
     | 
    
         
            -
             
     | 
| 
       379 
     | 
    
         
            -
                             
     | 
| 
       380 
     | 
    
         
            -
             
     | 
| 
       381 
     | 
    
         
            -
             
     | 
| 
       382 
     | 
    
         
            -
             
     | 
| 
       383 
     | 
    
         
            -
             
     | 
| 
       384 
     | 
    
         
            -
             
     | 
| 
       385 
     | 
    
         
            -
             
     | 
| 
       386 
     | 
    
         
            -
             
     | 
| 
       387 
     | 
    
         
            -
             
     | 
| 
       388 
     | 
    
         
            -
             
     | 
| 
       389 
     | 
    
         
            -
             
     | 
| 
       390 
     | 
    
         
            -
                         
     | 
| 
       391 
     | 
    
         
            -
             
     | 
| 
       392 
     | 
    
         
            -
                             
     | 
| 
       393 
     | 
    
         
            -
             
     | 
| 
       394 
     | 
    
         
            -
             
     | 
| 
       395 
     | 
    
         
            -
                                     
     | 
| 
       396 
     | 
    
         
            -
                                     
     | 
| 
       397 
     | 
    
         
            -
                                     
     | 
| 
       398 
     | 
    
         
            -
             
     | 
| 
       399 
     | 
    
         
            -
             
     | 
| 
       400 
     | 
    
         
            -
             
     | 
| 
       401 
     | 
    
         
            -
             
     | 
| 
       402 
     | 
    
         
            -
             
     | 
| 
       403 
     | 
    
         
            -
             
     | 
| 
       404 
     | 
    
         
            -
             
     | 
| 
       405 
     | 
    
         
            -
             
     | 
| 
      
 1 
     | 
    
         
            +
            #
         
     | 
| 
      
 2 
     | 
    
         
            +
            # Copyright 2016 Quantopian, Inc.
         
     | 
| 
      
 3 
     | 
    
         
            +
            #
         
     | 
| 
      
 4 
     | 
    
         
            +
            # Licensed under the Apache License, Version 2.0 (the "License");
         
     | 
| 
      
 5 
     | 
    
         
            +
            # you may not use this file except in compliance with the License.
         
     | 
| 
      
 6 
     | 
    
         
            +
            # You may obtain a copy of the License at
         
     | 
| 
      
 7 
     | 
    
         
            +
            #
         
     | 
| 
      
 8 
     | 
    
         
            +
            #     http://www.apache.org/licenses/LICENSE-2.0
         
     | 
| 
      
 9 
     | 
    
         
            +
            #
         
     | 
| 
      
 10 
     | 
    
         
            +
            # Unless required by applicable law or agreed to in writing, software
         
     | 
| 
      
 11 
     | 
    
         
            +
            # distributed under the License is distributed on an "AS IS" BASIS,
         
     | 
| 
      
 12 
     | 
    
         
            +
            # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
         
     | 
| 
      
 13 
     | 
    
         
            +
            # See the License for the specific language governing permissions and
         
     | 
| 
      
 14 
     | 
    
         
            +
            # limitations under the License.
         
     | 
| 
      
 15 
     | 
    
         
            +
             
     | 
| 
      
 16 
     | 
    
         
            +
            from datetime import time
         
     | 
| 
      
 17 
     | 
    
         
            +
            from itertools import chain
         
     | 
| 
      
 18 
     | 
    
         
            +
             
     | 
| 
      
 19 
     | 
    
         
            +
            from pandas import Timestamp
         
     | 
| 
      
 20 
     | 
    
         
            +
            from pandas.tseries.holiday import (
         
     | 
| 
      
 21 
     | 
    
         
            +
                AbstractHolidayCalendar,
         
     | 
| 
      
 22 
     | 
    
         
            +
                GoodFriday,
         
     | 
| 
      
 23 
     | 
    
         
            +
                USLaborDay,
         
     | 
| 
      
 24 
     | 
    
         
            +
                USPresidentsDay,
         
     | 
| 
      
 25 
     | 
    
         
            +
                USThanksgivingDay,
         
     | 
| 
      
 26 
     | 
    
         
            +
            )
         
     | 
| 
      
 27 
     | 
    
         
            +
            import sys
         
     | 
| 
      
 28 
     | 
    
         
            +
             
     | 
| 
      
 29 
     | 
    
         
            +
            # check python versiOn aNd import accordingly
         
     | 
| 
      
 30 
     | 
    
         
            +
            if sys.version_info >= (3, 9):
         
     | 
| 
      
 31 
     | 
    
         
            +
                # For Python 3.9 and later, import directly
         
     | 
| 
      
 32 
     | 
    
         
            +
                from zoneinfo import ZoneInfo
         
     | 
| 
      
 33 
     | 
    
         
            +
            else:
         
     | 
| 
      
 34 
     | 
    
         
            +
                # For Python 3.8 and earlier, import from backports
         
     | 
| 
      
 35 
     | 
    
         
            +
                from backports.zoneinfo import ZoneInfo
         
     | 
| 
      
 36 
     | 
    
         
            +
             
     | 
| 
      
 37 
     | 
    
         
            +
            from pandas_market_calendars.holidays.us import (
         
     | 
| 
      
 38 
     | 
    
         
            +
                Christmas,
         
     | 
| 
      
 39 
     | 
    
         
            +
                ChristmasEveBefore1993,
         
     | 
| 
      
 40 
     | 
    
         
            +
                ChristmasEveInOrAfter1993,
         
     | 
| 
      
 41 
     | 
    
         
            +
                USBlackFridayInOrAfter1993,
         
     | 
| 
      
 42 
     | 
    
         
            +
                USJuneteenthAfter2022,
         
     | 
| 
      
 43 
     | 
    
         
            +
                USIndependenceDay,
         
     | 
| 
      
 44 
     | 
    
         
            +
                USMartinLutherKingJrAfter1998,
         
     | 
| 
      
 45 
     | 
    
         
            +
                USMemorialDay,
         
     | 
| 
      
 46 
     | 
    
         
            +
                USNationalDaysofMourning,
         
     | 
| 
      
 47 
     | 
    
         
            +
                USNewYearsDay,
         
     | 
| 
      
 48 
     | 
    
         
            +
            )
         
     | 
| 
      
 49 
     | 
    
         
            +
            from pandas_market_calendars.market_calendar import MarketCalendar
         
     | 
| 
      
 50 
     | 
    
         
            +
            from pandas_market_calendars.holidays.cme import (
         
     | 
| 
      
 51 
     | 
    
         
            +
                USIndependenceDayBefore2022PreviousDay,
         
     | 
| 
      
 52 
     | 
    
         
            +
            )
         
     | 
| 
      
 53 
     | 
    
         
            +
             
     | 
| 
      
 54 
     | 
    
         
            +
             
     | 
| 
      
 55 
     | 
    
         
            +
            # Useful resources for making changes to this file: http://www.cmegroup.com/tools-information/holiday-calendar.html
         
     | 
| 
      
 56 
     | 
    
         
            +
            # The CME has different holiday rules depending on the type of instrument.
         
     | 
| 
      
 57 
     | 
    
         
            +
            # For example, http://www.cmegroup.com/tools-information/holiday-calendar/files/2016-4th-of-july-holiday-schedule.pdf # noqa
         
     | 
| 
      
 58 
     | 
    
         
            +
            # shows that Equity, Interest Rate, FX, Energy, Metals & DME Products close at 1200 CT on July 4, 2016, while Grain,
         
     | 
| 
      
 59 
     | 
    
         
            +
            # Oilseed & MGEX Products and Livestock, Dairy & Lumber products are completely closed.
         
     | 
| 
      
 60 
     | 
    
         
            +
             
     | 
| 
      
 61 
     | 
    
         
            +
             
     | 
| 
      
 62 
     | 
    
         
            +
            class CMEEquityExchangeCalendar(MarketCalendar):
         
     | 
| 
      
 63 
     | 
    
         
            +
                """
         
     | 
| 
      
 64 
     | 
    
         
            +
                Exchange calendar for CME for Equity products
         
     | 
| 
      
 65 
     | 
    
         
            +
             
     | 
| 
      
 66 
     | 
    
         
            +
                Open Time: 6:00 PM, America/New_York / 5:00 PM Chicago
         
     | 
| 
      
 67 
     | 
    
         
            +
                Close Time: 5:00 PM, America/New_York / 4:00 PM Chicago
         
     | 
| 
      
 68 
     | 
    
         
            +
                Break: 4:15 - 4:30pm America/New_York / 3:15 - 3:30 PM Chicago
         
     | 
| 
      
 69 
     | 
    
         
            +
                """
         
     | 
| 
      
 70 
     | 
    
         
            +
             
     | 
| 
      
 71 
     | 
    
         
            +
                aliases = ["CME_Equity", "CBOT_Equity"]
         
     | 
| 
      
 72 
     | 
    
         
            +
                regular_market_times = {
         
     | 
| 
      
 73 
     | 
    
         
            +
                    "market_open": ((None, time(17), -1),),  # offset by -1 day
         
     | 
| 
      
 74 
     | 
    
         
            +
                    "market_close": ((None, time(16)),),
         
     | 
| 
      
 75 
     | 
    
         
            +
                    "break_start": ((None, time(15, 15)),),
         
     | 
| 
      
 76 
     | 
    
         
            +
                    "break_end": ((None, time(15, 30)),),
         
     | 
| 
      
 77 
     | 
    
         
            +
                }
         
     | 
| 
      
 78 
     | 
    
         
            +
             
     | 
| 
      
 79 
     | 
    
         
            +
                @property
         
     | 
| 
      
 80 
     | 
    
         
            +
                def name(self):
         
     | 
| 
      
 81 
     | 
    
         
            +
                    return "CME_Equity"
         
     | 
| 
      
 82 
     | 
    
         
            +
             
     | 
| 
      
 83 
     | 
    
         
            +
                @property
         
     | 
| 
      
 84 
     | 
    
         
            +
                def tz(self):
         
     | 
| 
      
 85 
     | 
    
         
            +
                    return ZoneInfo("America/Chicago")
         
     | 
| 
      
 86 
     | 
    
         
            +
             
     | 
| 
      
 87 
     | 
    
         
            +
                @property
         
     | 
| 
      
 88 
     | 
    
         
            +
                def regular_holidays(self):
         
     | 
| 
      
 89 
     | 
    
         
            +
                    # Many days that are holidays for the NYSE are an early close day for CME
         
     | 
| 
      
 90 
     | 
    
         
            +
                    return AbstractHolidayCalendar(
         
     | 
| 
      
 91 
     | 
    
         
            +
                        rules=[
         
     | 
| 
      
 92 
     | 
    
         
            +
                            USNewYearsDay,
         
     | 
| 
      
 93 
     | 
    
         
            +
                            GoodFriday,
         
     | 
| 
      
 94 
     | 
    
         
            +
                            Christmas,
         
     | 
| 
      
 95 
     | 
    
         
            +
                        ]
         
     | 
| 
      
 96 
     | 
    
         
            +
                    )
         
     | 
| 
      
 97 
     | 
    
         
            +
             
     | 
| 
      
 98 
     | 
    
         
            +
                @property
         
     | 
| 
      
 99 
     | 
    
         
            +
                def adhoc_holidays(self):
         
     | 
| 
      
 100 
     | 
    
         
            +
                    return USNationalDaysofMourning
         
     | 
| 
      
 101 
     | 
    
         
            +
             
     | 
| 
      
 102 
     | 
    
         
            +
                @property
         
     | 
| 
      
 103 
     | 
    
         
            +
                def special_closes(self):
         
     | 
| 
      
 104 
     | 
    
         
            +
                    return [
         
     | 
| 
      
 105 
     | 
    
         
            +
                        (
         
     | 
| 
      
 106 
     | 
    
         
            +
                            time(12),
         
     | 
| 
      
 107 
     | 
    
         
            +
                            AbstractHolidayCalendar(
         
     | 
| 
      
 108 
     | 
    
         
            +
                                rules=[
         
     | 
| 
      
 109 
     | 
    
         
            +
                                    USMartinLutherKingJrAfter1998,
         
     | 
| 
      
 110 
     | 
    
         
            +
                                    USPresidentsDay,
         
     | 
| 
      
 111 
     | 
    
         
            +
                                    USMemorialDay,
         
     | 
| 
      
 112 
     | 
    
         
            +
                                    USLaborDay,
         
     | 
| 
      
 113 
     | 
    
         
            +
                                    USJuneteenthAfter2022,
         
     | 
| 
      
 114 
     | 
    
         
            +
                                    USIndependenceDay,
         
     | 
| 
      
 115 
     | 
    
         
            +
                                    USIndependenceDayBefore2022PreviousDay,
         
     | 
| 
      
 116 
     | 
    
         
            +
                                    USThanksgivingDay,
         
     | 
| 
      
 117 
     | 
    
         
            +
                                    USBlackFridayInOrAfter1993,
         
     | 
| 
      
 118 
     | 
    
         
            +
                                    ChristmasEveBefore1993,
         
     | 
| 
      
 119 
     | 
    
         
            +
                                    ChristmasEveInOrAfter1993,
         
     | 
| 
      
 120 
     | 
    
         
            +
                                ]
         
     | 
| 
      
 121 
     | 
    
         
            +
                            ),
         
     | 
| 
      
 122 
     | 
    
         
            +
                        )
         
     | 
| 
      
 123 
     | 
    
         
            +
                    ]
         
     | 
| 
      
 124 
     | 
    
         
            +
             
     | 
| 
      
 125 
     | 
    
         
            +
             
     | 
| 
      
 126 
     | 
    
         
            +
            class CMEAgricultureExchangeCalendar(MarketCalendar):
         
     | 
| 
      
 127 
     | 
    
         
            +
                """
         
     | 
| 
      
 128 
     | 
    
         
            +
                Exchange calendar for CME for Agriculture products
         
     | 
| 
      
 129 
     | 
    
         
            +
             
     | 
| 
      
 130 
     | 
    
         
            +
                Open Time: 5:00 PM, America/Chicago
         
     | 
| 
      
 131 
     | 
    
         
            +
                Close Time: 5:00 PM, America/Chicago
         
     | 
| 
      
 132 
     | 
    
         
            +
             
     | 
| 
      
 133 
     | 
    
         
            +
                Regularly-Observed Holidays:
         
     | 
| 
      
 134 
     | 
    
         
            +
                - New Years Day
         
     | 
| 
      
 135 
     | 
    
         
            +
                - Good Friday
         
     | 
| 
      
 136 
     | 
    
         
            +
                - Christmas
         
     | 
| 
      
 137 
     | 
    
         
            +
                """
         
     | 
| 
      
 138 
     | 
    
         
            +
             
     | 
| 
      
 139 
     | 
    
         
            +
                aliases = [
         
     | 
| 
      
 140 
     | 
    
         
            +
                    "CME_Agriculture",
         
     | 
| 
      
 141 
     | 
    
         
            +
                    "CBOT_Agriculture",
         
     | 
| 
      
 142 
     | 
    
         
            +
                    "COMEX_Agriculture",
         
     | 
| 
      
 143 
     | 
    
         
            +
                    "NYMEX_Agriculture",
         
     | 
| 
      
 144 
     | 
    
         
            +
                ]
         
     | 
| 
      
 145 
     | 
    
         
            +
                regular_market_times = {
         
     | 
| 
      
 146 
     | 
    
         
            +
                    "market_open": ((None, time(17, 1), -1),),  # offset by -1 day
         
     | 
| 
      
 147 
     | 
    
         
            +
                    "market_close": ((None, time(17)),),
         
     | 
| 
      
 148 
     | 
    
         
            +
                }
         
     | 
| 
      
 149 
     | 
    
         
            +
             
     | 
| 
      
 150 
     | 
    
         
            +
                @property
         
     | 
| 
      
 151 
     | 
    
         
            +
                def name(self):
         
     | 
| 
      
 152 
     | 
    
         
            +
                    return "CME_Agriculture"
         
     | 
| 
      
 153 
     | 
    
         
            +
             
     | 
| 
      
 154 
     | 
    
         
            +
                @property
         
     | 
| 
      
 155 
     | 
    
         
            +
                def tz(self):
         
     | 
| 
      
 156 
     | 
    
         
            +
                    return ZoneInfo("America/Chicago")
         
     | 
| 
      
 157 
     | 
    
         
            +
             
     | 
| 
      
 158 
     | 
    
         
            +
                @property
         
     | 
| 
      
 159 
     | 
    
         
            +
                def regular_holidays(self):
         
     | 
| 
      
 160 
     | 
    
         
            +
                    # Ignore gap between 13:20 CST and 14:30 CST for regular trading hours
         
     | 
| 
      
 161 
     | 
    
         
            +
                    #
         
     | 
| 
      
 162 
     | 
    
         
            +
                    # The CME has different holiday rules depending on the type of
         
     | 
| 
      
 163 
     | 
    
         
            +
                    # instrument. For example, http://www.cmegroup.com/tools-information/holiday-calendar/files/2016-4th-of-july-holiday-schedule.pdf # noqa
         
     | 
| 
      
 164 
     | 
    
         
            +
                    # shows that Equity, Interest Rate, FX, Energy, Metals & DME Products
         
     | 
| 
      
 165 
     | 
    
         
            +
                    # close at 1200 CT on July 4, 2016, while Grain, Oilseed & MGEX
         
     | 
| 
      
 166 
     | 
    
         
            +
                    # Products and Livestock, Dairy & Lumber products are completely
         
     | 
| 
      
 167 
     | 
    
         
            +
                    # closed.
         
     | 
| 
      
 168 
     | 
    
         
            +
                    return AbstractHolidayCalendar(
         
     | 
| 
      
 169 
     | 
    
         
            +
                        rules=[
         
     | 
| 
      
 170 
     | 
    
         
            +
                            USNewYearsDay,
         
     | 
| 
      
 171 
     | 
    
         
            +
                            USMartinLutherKingJrAfter1998,
         
     | 
| 
      
 172 
     | 
    
         
            +
                            USPresidentsDay,
         
     | 
| 
      
 173 
     | 
    
         
            +
                            GoodFriday,
         
     | 
| 
      
 174 
     | 
    
         
            +
                            USMemorialDay,
         
     | 
| 
      
 175 
     | 
    
         
            +
                            USJuneteenthAfter2022,
         
     | 
| 
      
 176 
     | 
    
         
            +
                            USIndependenceDay,
         
     | 
| 
      
 177 
     | 
    
         
            +
                            USLaborDay,
         
     | 
| 
      
 178 
     | 
    
         
            +
                            USThanksgivingDay,
         
     | 
| 
      
 179 
     | 
    
         
            +
                            Christmas,
         
     | 
| 
      
 180 
     | 
    
         
            +
                        ]
         
     | 
| 
      
 181 
     | 
    
         
            +
                    )
         
     | 
| 
      
 182 
     | 
    
         
            +
             
     | 
| 
      
 183 
     | 
    
         
            +
                @property
         
     | 
| 
      
 184 
     | 
    
         
            +
                def adhoc_holidays(self):
         
     | 
| 
      
 185 
     | 
    
         
            +
                    return USNationalDaysofMourning
         
     | 
| 
      
 186 
     | 
    
         
            +
             
     | 
| 
      
 187 
     | 
    
         
            +
                @property
         
     | 
| 
      
 188 
     | 
    
         
            +
                def special_closes(self):
         
     | 
| 
      
 189 
     | 
    
         
            +
                    return [
         
     | 
| 
      
 190 
     | 
    
         
            +
                        (
         
     | 
| 
      
 191 
     | 
    
         
            +
                            time(12),
         
     | 
| 
      
 192 
     | 
    
         
            +
                            AbstractHolidayCalendar(
         
     | 
| 
      
 193 
     | 
    
         
            +
                                rules=[
         
     | 
| 
      
 194 
     | 
    
         
            +
                                    USBlackFridayInOrAfter1993,
         
     | 
| 
      
 195 
     | 
    
         
            +
                                    ChristmasEveBefore1993,
         
     | 
| 
      
 196 
     | 
    
         
            +
                                    ChristmasEveInOrAfter1993,
         
     | 
| 
      
 197 
     | 
    
         
            +
                                ]
         
     | 
| 
      
 198 
     | 
    
         
            +
                            ),
         
     | 
| 
      
 199 
     | 
    
         
            +
                        )
         
     | 
| 
      
 200 
     | 
    
         
            +
                    ]
         
     | 
| 
      
 201 
     | 
    
         
            +
             
     | 
| 
      
 202 
     | 
    
         
            +
             
     | 
| 
      
 203 
     | 
    
         
            +
            # For the bond market Good Friday that coincides with the release of NFP on the first friday of the month is an open day
         
     | 
| 
      
 204 
     | 
    
         
            +
            goodFridayClosed = [
         
     | 
| 
      
 205 
     | 
    
         
            +
                "1970-03-27",
         
     | 
| 
      
 206 
     | 
    
         
            +
                "1971-04-09",
         
     | 
| 
      
 207 
     | 
    
         
            +
                "1972-03-31",
         
     | 
| 
      
 208 
     | 
    
         
            +
                "1973-04-20",
         
     | 
| 
      
 209 
     | 
    
         
            +
                "1974-04-12",
         
     | 
| 
      
 210 
     | 
    
         
            +
                "1975-03-28",
         
     | 
| 
      
 211 
     | 
    
         
            +
                "1976-04-16",
         
     | 
| 
      
 212 
     | 
    
         
            +
                "1977-04-08",
         
     | 
| 
      
 213 
     | 
    
         
            +
                "1978-03-24",
         
     | 
| 
      
 214 
     | 
    
         
            +
                "1979-04-13",
         
     | 
| 
      
 215 
     | 
    
         
            +
                "1981-04-17",
         
     | 
| 
      
 216 
     | 
    
         
            +
                "1982-04-09",
         
     | 
| 
      
 217 
     | 
    
         
            +
                "1984-04-20",
         
     | 
| 
      
 218 
     | 
    
         
            +
                "1986-03-28",
         
     | 
| 
      
 219 
     | 
    
         
            +
                "1987-04-17",
         
     | 
| 
      
 220 
     | 
    
         
            +
                "1989-03-24",
         
     | 
| 
      
 221 
     | 
    
         
            +
                "1990-04-13",
         
     | 
| 
      
 222 
     | 
    
         
            +
                "1991-03-29",
         
     | 
| 
      
 223 
     | 
    
         
            +
                "1992-04-17",
         
     | 
| 
      
 224 
     | 
    
         
            +
                "1993-04-09",
         
     | 
| 
      
 225 
     | 
    
         
            +
                "1995-04-14",
         
     | 
| 
      
 226 
     | 
    
         
            +
                "1997-03-28",
         
     | 
| 
      
 227 
     | 
    
         
            +
                "1998-04-10",
         
     | 
| 
      
 228 
     | 
    
         
            +
                "2000-04-21",
         
     | 
| 
      
 229 
     | 
    
         
            +
                "2001-04-13",
         
     | 
| 
      
 230 
     | 
    
         
            +
                "2002-03-29",
         
     | 
| 
      
 231 
     | 
    
         
            +
                "2003-04-18",
         
     | 
| 
      
 232 
     | 
    
         
            +
                "2004-04-09",
         
     | 
| 
      
 233 
     | 
    
         
            +
                "2005-03-25",
         
     | 
| 
      
 234 
     | 
    
         
            +
                "2006-04-14",
         
     | 
| 
      
 235 
     | 
    
         
            +
                "2008-03-21",
         
     | 
| 
      
 236 
     | 
    
         
            +
                "2009-04-10",
         
     | 
| 
      
 237 
     | 
    
         
            +
                "2011-04-22",
         
     | 
| 
      
 238 
     | 
    
         
            +
                "2013-03-29",
         
     | 
| 
      
 239 
     | 
    
         
            +
                "2014-04-18",
         
     | 
| 
      
 240 
     | 
    
         
            +
                "2016-03-25",
         
     | 
| 
      
 241 
     | 
    
         
            +
                "2017-04-14",
         
     | 
| 
      
 242 
     | 
    
         
            +
                "2018-03-30",
         
     | 
| 
      
 243 
     | 
    
         
            +
                "2019-04-19",
         
     | 
| 
      
 244 
     | 
    
         
            +
                "2020-04-10",
         
     | 
| 
      
 245 
     | 
    
         
            +
                "2022-04-15",
         
     | 
| 
      
 246 
     | 
    
         
            +
                "2024-03-29",
         
     | 
| 
      
 247 
     | 
    
         
            +
                "2025-04-18",
         
     | 
| 
      
 248 
     | 
    
         
            +
                "2027-03-26",
         
     | 
| 
      
 249 
     | 
    
         
            +
                "2028-04-14",
         
     | 
| 
      
 250 
     | 
    
         
            +
                "2029-03-30",
         
     | 
| 
      
 251 
     | 
    
         
            +
                "2030-04-19",
         
     | 
| 
      
 252 
     | 
    
         
            +
                "2031-04-11",
         
     | 
| 
      
 253 
     | 
    
         
            +
                "2032-03-26",
         
     | 
| 
      
 254 
     | 
    
         
            +
                "2033-04-15",
         
     | 
| 
      
 255 
     | 
    
         
            +
                "2035-03-23",
         
     | 
| 
      
 256 
     | 
    
         
            +
                "2036-04-11",
         
     | 
| 
      
 257 
     | 
    
         
            +
                "2038-04-23",
         
     | 
| 
      
 258 
     | 
    
         
            +
                "2039-04-08",
         
     | 
| 
      
 259 
     | 
    
         
            +
                "2040-03-30",
         
     | 
| 
      
 260 
     | 
    
         
            +
                "2041-04-19",
         
     | 
| 
      
 261 
     | 
    
         
            +
                "2043-03-27",
         
     | 
| 
      
 262 
     | 
    
         
            +
                "2044-04-15",
         
     | 
| 
      
 263 
     | 
    
         
            +
                "2046-03-23",
         
     | 
| 
      
 264 
     | 
    
         
            +
                "2047-04-12",
         
     | 
| 
      
 265 
     | 
    
         
            +
                "2049-04-16",
         
     | 
| 
      
 266 
     | 
    
         
            +
                "2050-04-08",
         
     | 
| 
      
 267 
     | 
    
         
            +
                "2051-03-31",
         
     | 
| 
      
 268 
     | 
    
         
            +
                "2052-04-19",
         
     | 
| 
      
 269 
     | 
    
         
            +
                "2054-03-27",
         
     | 
| 
      
 270 
     | 
    
         
            +
                "2055-04-16",
         
     | 
| 
      
 271 
     | 
    
         
            +
                "2056-03-31",
         
     | 
| 
      
 272 
     | 
    
         
            +
                "2057-04-20",
         
     | 
| 
      
 273 
     | 
    
         
            +
                "2058-04-12",
         
     | 
| 
      
 274 
     | 
    
         
            +
                "2059-03-28",
         
     | 
| 
      
 275 
     | 
    
         
            +
                "2060-04-16",
         
     | 
| 
      
 276 
     | 
    
         
            +
                "2061-04-08",
         
     | 
| 
      
 277 
     | 
    
         
            +
                "2062-03-24",
         
     | 
| 
      
 278 
     | 
    
         
            +
                "2063-04-13",
         
     | 
| 
      
 279 
     | 
    
         
            +
                "2065-03-27",
         
     | 
| 
      
 280 
     | 
    
         
            +
                "2066-04-09",
         
     | 
| 
      
 281 
     | 
    
         
            +
                "2068-04-20",
         
     | 
| 
      
 282 
     | 
    
         
            +
                "2069-04-12",
         
     | 
| 
      
 283 
     | 
    
         
            +
                "2070-03-28",
         
     | 
| 
      
 284 
     | 
    
         
            +
                "2071-04-17",
         
     | 
| 
      
 285 
     | 
    
         
            +
                "2072-04-08",
         
     | 
| 
      
 286 
     | 
    
         
            +
                "2073-03-24",
         
     | 
| 
      
 287 
     | 
    
         
            +
                "2074-04-13",
         
     | 
| 
      
 288 
     | 
    
         
            +
                "2076-04-17",
         
     | 
| 
      
 289 
     | 
    
         
            +
                "2077-04-09",
         
     | 
| 
      
 290 
     | 
    
         
            +
                "2079-04-21",
         
     | 
| 
      
 291 
     | 
    
         
            +
                "2081-03-28",
         
     | 
| 
      
 292 
     | 
    
         
            +
                "2082-04-17",
         
     | 
| 
      
 293 
     | 
    
         
            +
                "2084-03-24",
         
     | 
| 
      
 294 
     | 
    
         
            +
                "2085-04-13",
         
     | 
| 
      
 295 
     | 
    
         
            +
                "2086-03-29",
         
     | 
| 
      
 296 
     | 
    
         
            +
                "2087-04-18",
         
     | 
| 
      
 297 
     | 
    
         
            +
                "2088-04-09",
         
     | 
| 
      
 298 
     | 
    
         
            +
                "2090-04-14",
         
     | 
| 
      
 299 
     | 
    
         
            +
                "2092-03-28",
         
     | 
| 
      
 300 
     | 
    
         
            +
                "2093-04-10",
         
     | 
| 
      
 301 
     | 
    
         
            +
                "2095-04-22",
         
     | 
| 
      
 302 
     | 
    
         
            +
                "2096-04-13",
         
     | 
| 
      
 303 
     | 
    
         
            +
                "2097-03-29",
         
     | 
| 
      
 304 
     | 
    
         
            +
                "2098-04-18",
         
     | 
| 
      
 305 
     | 
    
         
            +
                "2099-04-10",
         
     | 
| 
      
 306 
     | 
    
         
            +
            ]
         
     | 
| 
      
 307 
     | 
    
         
            +
             
     | 
| 
      
 308 
     | 
    
         
            +
            BondsGoodFridayClosed = [Timestamp(x, tz="UTC") for x in goodFridayClosed]
         
     | 
| 
      
 309 
     | 
    
         
            +
             
     | 
| 
      
 310 
     | 
    
         
            +
            goodFridayOpen = [
         
     | 
| 
      
 311 
     | 
    
         
            +
                "1980-04-04",
         
     | 
| 
      
 312 
     | 
    
         
            +
                "1983-04-01",
         
     | 
| 
      
 313 
     | 
    
         
            +
                "1985-04-05",
         
     | 
| 
      
 314 
     | 
    
         
            +
                "1988-04-01",
         
     | 
| 
      
 315 
     | 
    
         
            +
                "1994-04-01",
         
     | 
| 
      
 316 
     | 
    
         
            +
                "1996-04-05",
         
     | 
| 
      
 317 
     | 
    
         
            +
                "1999-04-02",
         
     | 
| 
      
 318 
     | 
    
         
            +
                "2007-04-06",
         
     | 
| 
      
 319 
     | 
    
         
            +
                "2010-04-02",
         
     | 
| 
      
 320 
     | 
    
         
            +
                "2012-04-06",
         
     | 
| 
      
 321 
     | 
    
         
            +
                "2015-04-03",
         
     | 
| 
      
 322 
     | 
    
         
            +
                "2021-04-02",
         
     | 
| 
      
 323 
     | 
    
         
            +
                "2023-04-07",
         
     | 
| 
      
 324 
     | 
    
         
            +
                "2026-04-03",
         
     | 
| 
      
 325 
     | 
    
         
            +
                "2034-04-07",
         
     | 
| 
      
 326 
     | 
    
         
            +
                "2037-04-03",
         
     | 
| 
      
 327 
     | 
    
         
            +
                "2042-04-04",
         
     | 
| 
      
 328 
     | 
    
         
            +
                "2045-04-07",
         
     | 
| 
      
 329 
     | 
    
         
            +
                "2048-04-03",
         
     | 
| 
      
 330 
     | 
    
         
            +
                "2053-04-04",
         
     | 
| 
      
 331 
     | 
    
         
            +
                "2064-04-04",
         
     | 
| 
      
 332 
     | 
    
         
            +
                "2067-04-01",
         
     | 
| 
      
 333 
     | 
    
         
            +
                "2075-04-05",
         
     | 
| 
      
 334 
     | 
    
         
            +
                "2078-04-01",
         
     | 
| 
      
 335 
     | 
    
         
            +
                "2080-04-05",
         
     | 
| 
      
 336 
     | 
    
         
            +
                "2083-04-02",
         
     | 
| 
      
 337 
     | 
    
         
            +
                "2089-04-01",
         
     | 
| 
      
 338 
     | 
    
         
            +
                "2091-04-06",
         
     | 
| 
      
 339 
     | 
    
         
            +
                "2094-04-02",
         
     | 
| 
      
 340 
     | 
    
         
            +
            ]
         
     | 
| 
      
 341 
     | 
    
         
            +
             
     | 
| 
      
 342 
     | 
    
         
            +
            BondsGoodFridayOpen = [Timestamp(x, tz="UTC") for x in goodFridayOpen]
         
     | 
| 
      
 343 
     | 
    
         
            +
             
     | 
| 
      
 344 
     | 
    
         
            +
             
     | 
| 
      
 345 
     | 
    
         
            +
            class CMEBondExchangeCalendar(MarketCalendar):
         
     | 
| 
      
 346 
     | 
    
         
            +
                """
         
     | 
| 
      
 347 
     | 
    
         
            +
                Exchange calendar for CME for Interest Rate and Bond products
         
     | 
| 
      
 348 
     | 
    
         
            +
             
     | 
| 
      
 349 
     | 
    
         
            +
                The Holiday calendar is different between the open outcry trading floor hours and GLOBEX electronic trading hours.
         
     | 
| 
      
 350 
     | 
    
         
            +
                This calendar attempts to be accurate for the GLOBEX holidays and hours from approx 2010 onward.
         
     | 
| 
      
 351 
     | 
    
         
            +
                """
         
     | 
| 
      
 352 
     | 
    
         
            +
             
     | 
| 
      
 353 
     | 
    
         
            +
                aliases = [
         
     | 
| 
      
 354 
     | 
    
         
            +
                    "CME_Rate",
         
     | 
| 
      
 355 
     | 
    
         
            +
                    "CBOT_Rate",
         
     | 
| 
      
 356 
     | 
    
         
            +
                    "CME_InterestRate",
         
     | 
| 
      
 357 
     | 
    
         
            +
                    "CBOT_InterestRate",
         
     | 
| 
      
 358 
     | 
    
         
            +
                    "CME_Bond",
         
     | 
| 
      
 359 
     | 
    
         
            +
                    "CBOT_Bond",
         
     | 
| 
      
 360 
     | 
    
         
            +
                ]
         
     | 
| 
      
 361 
     | 
    
         
            +
                regular_market_times = {
         
     | 
| 
      
 362 
     | 
    
         
            +
                    "market_open": ((None, time(17), -1),),  # offset by -1 day
         
     | 
| 
      
 363 
     | 
    
         
            +
                    "market_close": ((None, time(16)),),
         
     | 
| 
      
 364 
     | 
    
         
            +
                }
         
     | 
| 
      
 365 
     | 
    
         
            +
             
     | 
| 
      
 366 
     | 
    
         
            +
                @property
         
     | 
| 
      
 367 
     | 
    
         
            +
                def name(self):
         
     | 
| 
      
 368 
     | 
    
         
            +
                    return "CME_Bond"
         
     | 
| 
      
 369 
     | 
    
         
            +
             
     | 
| 
      
 370 
     | 
    
         
            +
                @property
         
     | 
| 
      
 371 
     | 
    
         
            +
                def tz(self):
         
     | 
| 
      
 372 
     | 
    
         
            +
                    return ZoneInfo("America/Chicago")
         
     | 
| 
      
 373 
     | 
    
         
            +
             
     | 
| 
      
 374 
     | 
    
         
            +
                @property
         
     | 
| 
      
 375 
     | 
    
         
            +
                def regular_holidays(self):
         
     | 
| 
      
 376 
     | 
    
         
            +
                    return AbstractHolidayCalendar(
         
     | 
| 
      
 377 
     | 
    
         
            +
                        rules=[
         
     | 
| 
      
 378 
     | 
    
         
            +
                            USNewYearsDay,
         
     | 
| 
      
 379 
     | 
    
         
            +
                            Christmas,
         
     | 
| 
      
 380 
     | 
    
         
            +
                        ]
         
     | 
| 
      
 381 
     | 
    
         
            +
                    )
         
     | 
| 
      
 382 
     | 
    
         
            +
             
     | 
| 
      
 383 
     | 
    
         
            +
                @property
         
     | 
| 
      
 384 
     | 
    
         
            +
                def adhoc_holidays(self):
         
     | 
| 
      
 385 
     | 
    
         
            +
                    return list(chain(USNationalDaysofMourning, BondsGoodFridayClosed))
         
     | 
| 
      
 386 
     | 
    
         
            +
             
     | 
| 
      
 387 
     | 
    
         
            +
                @property
         
     | 
| 
      
 388 
     | 
    
         
            +
                def special_closes(self):
         
     | 
| 
      
 389 
     | 
    
         
            +
                    return [
         
     | 
| 
      
 390 
     | 
    
         
            +
                        (
         
     | 
| 
      
 391 
     | 
    
         
            +
                            time(12),
         
     | 
| 
      
 392 
     | 
    
         
            +
                            AbstractHolidayCalendar(
         
     | 
| 
      
 393 
     | 
    
         
            +
                                rules=[
         
     | 
| 
      
 394 
     | 
    
         
            +
                                    USMartinLutherKingJrAfter1998,
         
     | 
| 
      
 395 
     | 
    
         
            +
                                    USPresidentsDay,
         
     | 
| 
      
 396 
     | 
    
         
            +
                                    USMemorialDay,
         
     | 
| 
      
 397 
     | 
    
         
            +
                                    USIndependenceDay,
         
     | 
| 
      
 398 
     | 
    
         
            +
                                    USLaborDay,
         
     | 
| 
      
 399 
     | 
    
         
            +
                                    USThanksgivingDay,
         
     | 
| 
      
 400 
     | 
    
         
            +
                                ]
         
     | 
| 
      
 401 
     | 
    
         
            +
                            ),
         
     | 
| 
      
 402 
     | 
    
         
            +
                        ),
         
     | 
| 
      
 403 
     | 
    
         
            +
                        (
         
     | 
| 
      
 404 
     | 
    
         
            +
                            time(12, 15),
         
     | 
| 
      
 405 
     | 
    
         
            +
                            AbstractHolidayCalendar(
         
     | 
| 
      
 406 
     | 
    
         
            +
                                rules=[
         
     | 
| 
      
 407 
     | 
    
         
            +
                                    USBlackFridayInOrAfter1993,
         
     | 
| 
      
 408 
     | 
    
         
            +
                                    ChristmasEveBefore1993,
         
     | 
| 
      
 409 
     | 
    
         
            +
                                    ChristmasEveInOrAfter1993,
         
     | 
| 
      
 410 
     | 
    
         
            +
                                ]
         
     | 
| 
      
 411 
     | 
    
         
            +
                            ),
         
     | 
| 
      
 412 
     | 
    
         
            +
                        ),
         
     | 
| 
      
 413 
     | 
    
         
            +
                    ]
         
     | 
| 
      
 414 
     | 
    
         
            +
             
     | 
| 
      
 415 
     | 
    
         
            +
                @property
         
     | 
| 
      
 416 
     | 
    
         
            +
                def special_closes_adhoc(self):
         
     | 
| 
      
 417 
     | 
    
         
            +
                    return [(time(10, tzinfo=self.tz), BondsGoodFridayOpen)]
         
     |