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,383 +1,391 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            from datetime import time
         
     | 
| 
       2 
     | 
    
         
            -
            import functools
         
     | 
| 
       3 
     | 
    
         
            -
             
     | 
| 
       4 
     | 
    
         
            -
            import pandas as pd
         
     | 
| 
       5 
     | 
    
         
            -
            from pandas.tseries.holiday import AbstractHolidayCalendar
         
     | 
| 
       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 
     | 
    
         
            -
            # US
         
     | 
| 
       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 
     | 
    
         
            -
                @property
         
     | 
| 
       121 
     | 
    
         
            -
                def  
     | 
| 
       122 
     | 
    
         
            -
                    return  
     | 
| 
       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 
     | 
    
         
            -
             
     | 
| 
       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 
     | 
    
         
            -
                @property
         
     | 
| 
       244 
     | 
    
         
            -
                def  
     | 
| 
       245 
     | 
    
         
            -
                    return  
     | 
| 
       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 
     | 
    
         
            -
                @property
         
     | 
| 
       333 
     | 
    
         
            -
                def  
     | 
| 
       334 
     | 
    
         
            -
                    return  
     | 
| 
       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 
     | 
    
         
            -
             
     | 
| 
      
 1 
     | 
    
         
            +
            from datetime import time
         
     | 
| 
      
 2 
     | 
    
         
            +
            import functools
         
     | 
| 
      
 3 
     | 
    
         
            +
             
     | 
| 
      
 4 
     | 
    
         
            +
            import pandas as pd
         
     | 
| 
      
 5 
     | 
    
         
            +
            from pandas.tseries.holiday import AbstractHolidayCalendar
         
     | 
| 
      
 6 
     | 
    
         
            +
            import sys
         
     | 
| 
      
 7 
     | 
    
         
            +
             
     | 
| 
      
 8 
     | 
    
         
            +
            # check python versiOn aNd import accordingly
         
     | 
| 
      
 9 
     | 
    
         
            +
            if sys.version_info >= (3, 9):
         
     | 
| 
      
 10 
     | 
    
         
            +
                # For Python 3.9 and later, import directly
         
     | 
| 
      
 11 
     | 
    
         
            +
                from zoneinfo import ZoneInfo
         
     | 
| 
      
 12 
     | 
    
         
            +
            else:
         
     | 
| 
      
 13 
     | 
    
         
            +
                # For Python 3.8 and earlier, import from backports
         
     | 
| 
      
 14 
     | 
    
         
            +
                from backports.zoneinfo import ZoneInfo
         
     | 
| 
      
 15 
     | 
    
         
            +
            from itertools import chain
         
     | 
| 
      
 16 
     | 
    
         
            +
             
     | 
| 
      
 17 
     | 
    
         
            +
            ########################################################################################################################
         
     | 
| 
      
 18 
     | 
    
         
            +
            # SIFMA Financial Markets Calendar for US, UK, JP
         
     | 
| 
      
 19 
     | 
    
         
            +
            #
         
     | 
| 
      
 20 
     | 
    
         
            +
            # https://www.sifma.com/
         
     | 
| 
      
 21 
     | 
    
         
            +
            #
         
     | 
| 
      
 22 
     | 
    
         
            +
            # US: SIFMAUSExchangeCalendar() ['SIFMAUS', 'SIFMA_US', "Capital_Markets_US", "Financial_Markets_US", "Bond_Markets_US"]
         
     | 
| 
      
 23 
     | 
    
         
            +
            # UK: SIFMAUKExchangeCalendar() ['SIFMAUK', 'SIFMA_UK', "Capital_Markets_UK", "Financial_Markets_UK", "Bond_Markets_UK"]
         
     | 
| 
      
 24 
     | 
    
         
            +
            # JP: SIFMAJPExchangeCalendar() ['SIFMAJP', 'SIFMA_JP', "Capital_Markets_JP", "Financial_Markets_JP", "Bond_Markets_JP"]
         
     | 
| 
      
 25 
     | 
    
         
            +
            #
         
     | 
| 
      
 26 
     | 
    
         
            +
            # Trading Hours:
         
     | 
| 
      
 27 
     | 
    
         
            +
            # US: 7:00 to 17:30
         
     | 
| 
      
 28 
     | 
    
         
            +
            # UK: 8:00 to 17:00
         
     | 
| 
      
 29 
     | 
    
         
            +
            # JP: 8:30 to 18:30
         
     | 
| 
      
 30 
     | 
    
         
            +
            ########################################################################################################################
         
     | 
| 
      
 31 
     | 
    
         
            +
             
     | 
| 
      
 32 
     | 
    
         
            +
             
     | 
| 
      
 33 
     | 
    
         
            +
            from pandas_market_calendars.holidays.sifma import (
         
     | 
| 
      
 34 
     | 
    
         
            +
                # US Holidays
         
     | 
| 
      
 35 
     | 
    
         
            +
                USNewYearsDay,  # Not observed if a Saturday
         
     | 
| 
      
 36 
     | 
    
         
            +
                USNewYearsEve2pmEarlyClose,
         
     | 
| 
      
 37 
     | 
    
         
            +
                MartinLutherKingJr,
         
     | 
| 
      
 38 
     | 
    
         
            +
                USPresidentsDay,
         
     | 
| 
      
 39 
     | 
    
         
            +
                # --- Good Friday Rules --- #
         
     | 
| 
      
 40 
     | 
    
         
            +
                is_first_friday,
         
     | 
| 
      
 41 
     | 
    
         
            +
                GoodFridayThru2020,
         
     | 
| 
      
 42 
     | 
    
         
            +
                DayBeforeGoodFriday2pmEarlyCloseThru2020,
         
     | 
| 
      
 43 
     | 
    
         
            +
                GoodFridayPotentialPost2020,  # Potential dates, filtered later
         
     | 
| 
      
 44 
     | 
    
         
            +
                DayBeforeGoodFridayPotentialPost2020,  # Potential dates, filtered later
         
     | 
| 
      
 45 
     | 
    
         
            +
                # --- End Good Friday Rules --- #
         
     | 
| 
      
 46 
     | 
    
         
            +
                DayBeforeUSMemorialDay2pmEarlyClose,
         
     | 
| 
      
 47 
     | 
    
         
            +
                USMemorialDay,
         
     | 
| 
      
 48 
     | 
    
         
            +
                USJuneteenthAfter2022,
         
     | 
| 
      
 49 
     | 
    
         
            +
                USIndependenceDay,
         
     | 
| 
      
 50 
     | 
    
         
            +
                DayBeforeUSIndependenceDay2pmEarlyClose,
         
     | 
| 
      
 51 
     | 
    
         
            +
                ThursdayBeforeUSIndependenceDay2pmEarlyClose,
         
     | 
| 
      
 52 
     | 
    
         
            +
                USLaborDay,
         
     | 
| 
      
 53 
     | 
    
         
            +
                USColumbusDay,
         
     | 
| 
      
 54 
     | 
    
         
            +
                USVeteransDay,
         
     | 
| 
      
 55 
     | 
    
         
            +
                USThanksgivingDay,
         
     | 
| 
      
 56 
     | 
    
         
            +
                DayAfterThanksgiving2pmEarlyClose,
         
     | 
| 
      
 57 
     | 
    
         
            +
                Christmas,
         
     | 
| 
      
 58 
     | 
    
         
            +
                ChristmasEve2pmEarlyClose,
         
     | 
| 
      
 59 
     | 
    
         
            +
                ChristmasEveThursday2pmEarlyClose,
         
     | 
| 
      
 60 
     | 
    
         
            +
                # UK Specific Holidays
         
     | 
| 
      
 61 
     | 
    
         
            +
                UKNewYearsDay,  # Saturdays observed on Monday
         
     | 
| 
      
 62 
     | 
    
         
            +
                UKGoodFriday,
         
     | 
| 
      
 63 
     | 
    
         
            +
                UKEasterMonday,
         
     | 
| 
      
 64 
     | 
    
         
            +
                UKMayDay,
         
     | 
| 
      
 65 
     | 
    
         
            +
                UKSpringBankAdHoc,  # Usually follows US Memorial Day but not always
         
     | 
| 
      
 66 
     | 
    
         
            +
                UKSummerBank,
         
     | 
| 
      
 67 
     | 
    
         
            +
                UKChristmas,
         
     | 
| 
      
 68 
     | 
    
         
            +
                UKChristmaEve,
         
     | 
| 
      
 69 
     | 
    
         
            +
                UKWeekendChristmas,  # Observed Tuesday when Boxing Day is on Monday
         
     | 
| 
      
 70 
     | 
    
         
            +
                UKBoxingDay,
         
     | 
| 
      
 71 
     | 
    
         
            +
                UKWeekendBoxingDay,
         
     | 
| 
      
 72 
     | 
    
         
            +
                UKPlatinumJubilee2022,
         
     | 
| 
      
 73 
     | 
    
         
            +
            )
         
     | 
| 
      
 74 
     | 
    
         
            +
            from pandas_market_calendars.market_calendar import MarketCalendar
         
     | 
| 
      
 75 
     | 
    
         
            +
             
     | 
| 
      
 76 
     | 
    
         
            +
             
     | 
| 
      
 77 
     | 
    
         
            +
            ########################################################################################################################
         
     | 
| 
      
 78 
     | 
    
         
            +
            # SIFMA Financial Markets Calendar for US, UK, JP
         
     | 
| 
      
 79 
     | 
    
         
            +
            #
         
     | 
| 
      
 80 
     | 
    
         
            +
            # https://www.sifma.com/
         
     | 
| 
      
 81 
     | 
    
         
            +
            #
         
     | 
| 
      
 82 
     | 
    
         
            +
            # US: SIFMAUSExchangeCalendar() ['SIFMAUS', 'SIFMA_US', "Capital_Markets_US", "Financial_Markets_US", "Bond_Markets_US"]
         
     | 
| 
      
 83 
     | 
    
         
            +
            # UK: SIFMAUKExchangeCalendar() ['SIFMAUK', 'SIFMA_UK', "Capital_Markets_UK", "Financial_Markets_UK", "Bond_Markets_UK"]
         
     | 
| 
      
 84 
     | 
    
         
            +
            # JP: SIFMAJPExchangeCalendar() ['SIFMAJP', 'SIFMA_JP', "Capital_Markets_JP", "Financial_Markets_JP", "Bond_Markets_JP"]
         
     | 
| 
      
 85 
     | 
    
         
            +
            #
         
     | 
| 
      
 86 
     | 
    
         
            +
            # Trading Hours:
         
     | 
| 
      
 87 
     | 
    
         
            +
            # US: 7:00 to 17:30
         
     | 
| 
      
 88 
     | 
    
         
            +
            # UK: 8:00 to 17:00
         
     | 
| 
      
 89 
     | 
    
         
            +
            # JP: 8:30 to 18:30
         
     | 
| 
      
 90 
     | 
    
         
            +
            ########################################################################################################################
         
     | 
| 
      
 91 
     | 
    
         
            +
             
     | 
| 
      
 92 
     | 
    
         
            +
            # AbstractHolidayCalendar.start_date = '1998-01-01'
         
     | 
| 
      
 93 
     | 
    
         
            +
             
     | 
| 
      
 94 
     | 
    
         
            +
            ############################################################
         
     | 
| 
      
 95 
     | 
    
         
            +
            # US
         
     | 
| 
      
 96 
     | 
    
         
            +
            ############################################################
         
     | 
| 
      
 97 
     | 
    
         
            +
             
     | 
| 
      
 98 
     | 
    
         
            +
             
     | 
| 
      
 99 
     | 
    
         
            +
            class SIFMAUSExchangeCalendar(MarketCalendar):
         
     | 
| 
      
 100 
     | 
    
         
            +
                """
         
     | 
| 
      
 101 
     | 
    
         
            +
                Exchange calendar for SIFMA United States
         
     | 
| 
      
 102 
     | 
    
         
            +
             
     | 
| 
      
 103 
     | 
    
         
            +
                https://www.sifma.org/resources/general/holiday-schedule/#US
         
     | 
| 
      
 104 
     | 
    
         
            +
             
     | 
| 
      
 105 
     | 
    
         
            +
                """
         
     | 
| 
      
 106 
     | 
    
         
            +
             
     | 
| 
      
 107 
     | 
    
         
            +
                aliases = [
         
     | 
| 
      
 108 
     | 
    
         
            +
                    "SIFMAUS",
         
     | 
| 
      
 109 
     | 
    
         
            +
                    "SIFMA_US",
         
     | 
| 
      
 110 
     | 
    
         
            +
                    "Capital_Markets_US",
         
     | 
| 
      
 111 
     | 
    
         
            +
                    "Financial_Markets_US",
         
     | 
| 
      
 112 
     | 
    
         
            +
                    "Bond_Markets_US",
         
     | 
| 
      
 113 
     | 
    
         
            +
                ]
         
     | 
| 
      
 114 
     | 
    
         
            +
             
     | 
| 
      
 115 
     | 
    
         
            +
                regular_market_times = {
         
     | 
| 
      
 116 
     | 
    
         
            +
                    "market_open": ((None, time(7)),),
         
     | 
| 
      
 117 
     | 
    
         
            +
                    "market_close": ((None, time(17, 30)),),
         
     | 
| 
      
 118 
     | 
    
         
            +
                }
         
     | 
| 
      
 119 
     | 
    
         
            +
             
     | 
| 
      
 120 
     | 
    
         
            +
                @property
         
     | 
| 
      
 121 
     | 
    
         
            +
                def name(self):
         
     | 
| 
      
 122 
     | 
    
         
            +
                    return "SIFMA_US"
         
     | 
| 
      
 123 
     | 
    
         
            +
             
     | 
| 
      
 124 
     | 
    
         
            +
                @property
         
     | 
| 
      
 125 
     | 
    
         
            +
                def full_name(self):
         
     | 
| 
      
 126 
     | 
    
         
            +
                    return "Securities Industry and Financial Markets Association"
         
     | 
| 
      
 127 
     | 
    
         
            +
             
     | 
| 
      
 128 
     | 
    
         
            +
                @property
         
     | 
| 
      
 129 
     | 
    
         
            +
                def tz(self):
         
     | 
| 
      
 130 
     | 
    
         
            +
                    return ZoneInfo("America/New_York")
         
     | 
| 
      
 131 
     | 
    
         
            +
             
     | 
| 
      
 132 
     | 
    
         
            +
                # Helper method to calculate and cache dynamic dates
         
     | 
| 
      
 133 
     | 
    
         
            +
                @functools.lru_cache()
         
     | 
| 
      
 134 
     | 
    
         
            +
                def _get_dynamic_gf_rules(self):
         
     | 
| 
      
 135 
     | 
    
         
            +
                    # Calculate rules for a wide fixed range to avoid arbitrary cutoffs
         
     | 
| 
      
 136 
     | 
    
         
            +
                    # while preventing infinite generation. 1970-2100 is a reasonable range.
         
     | 
| 
      
 137 
     | 
    
         
            +
                    calc_start = pd.Timestamp("1970-01-01")
         
     | 
| 
      
 138 
     | 
    
         
            +
                    calc_end = pd.Timestamp("2100-12-31")
         
     | 
| 
      
 139 
     | 
    
         
            +
             
     | 
| 
      
 140 
     | 
    
         
            +
                    # Filter potential dates based on the start_date of the underlying Holiday rules
         
     | 
| 
      
 141 
     | 
    
         
            +
                    gf_rule_start = GoodFridayPotentialPost2020.start_date
         
     | 
| 
      
 142 
     | 
    
         
            +
                    thurs_rule_start = DayBeforeGoodFridayPotentialPost2020.start_date
         
     | 
| 
      
 143 
     | 
    
         
            +
             
     | 
| 
      
 144 
     | 
    
         
            +
                    # Ensure calculation range respects the rule start dates
         
     | 
| 
      
 145 
     | 
    
         
            +
                    effective_gf_start = max(calc_start, gf_rule_start) if gf_rule_start else calc_start
         
     | 
| 
      
 146 
     | 
    
         
            +
                    effective_thurs_start = max(calc_start, thurs_rule_start) if thurs_rule_start else calc_start
         
     | 
| 
      
 147 
     | 
    
         
            +
             
     | 
| 
      
 148 
     | 
    
         
            +
                    potential_gf_dates = GoodFridayPotentialPost2020.dates(effective_gf_start, calc_end)
         
     | 
| 
      
 149 
     | 
    
         
            +
                    gf_full_holidays = [d for d in potential_gf_dates if not is_first_friday(d)]
         
     | 
| 
      
 150 
     | 
    
         
            +
                    gf_12pm_early_closes = [d for d in potential_gf_dates if is_first_friday(d)]
         
     | 
| 
      
 151 
     | 
    
         
            +
             
     | 
| 
      
 152 
     | 
    
         
            +
                    potential_thurs_dates = DayBeforeGoodFridayPotentialPost2020.dates(effective_thurs_start, calc_end)
         
     | 
| 
      
 153 
     | 
    
         
            +
                    thurs_before_gf_2pm_early_closes = [
         
     | 
| 
      
 154 
     | 
    
         
            +
                        thurs for thurs in potential_thurs_dates if not is_first_friday(thurs + pd.Timedelta(days=1))
         
     | 
| 
      
 155 
     | 
    
         
            +
                    ]
         
     | 
| 
      
 156 
     | 
    
         
            +
                    return gf_full_holidays, gf_12pm_early_closes, thurs_before_gf_2pm_early_closes
         
     | 
| 
      
 157 
     | 
    
         
            +
             
     | 
| 
      
 158 
     | 
    
         
            +
                @property
         
     | 
| 
      
 159 
     | 
    
         
            +
                def regular_holidays(self):
         
     | 
| 
      
 160 
     | 
    
         
            +
                    return AbstractHolidayCalendar(
         
     | 
| 
      
 161 
     | 
    
         
            +
                        rules=[
         
     | 
| 
      
 162 
     | 
    
         
            +
                            USNewYearsDay,
         
     | 
| 
      
 163 
     | 
    
         
            +
                            MartinLutherKingJr,
         
     | 
| 
      
 164 
     | 
    
         
            +
                            USPresidentsDay,
         
     | 
| 
      
 165 
     | 
    
         
            +
                            GoodFridayThru2020,
         
     | 
| 
      
 166 
     | 
    
         
            +
                            USMemorialDay,
         
     | 
| 
      
 167 
     | 
    
         
            +
                            USJuneteenthAfter2022,
         
     | 
| 
      
 168 
     | 
    
         
            +
                            USIndependenceDay,
         
     | 
| 
      
 169 
     | 
    
         
            +
                            USLaborDay,
         
     | 
| 
      
 170 
     | 
    
         
            +
                            USColumbusDay,
         
     | 
| 
      
 171 
     | 
    
         
            +
                            USVeteransDay,
         
     | 
| 
      
 172 
     | 
    
         
            +
                            USThanksgivingDay,
         
     | 
| 
      
 173 
     | 
    
         
            +
                            Christmas,
         
     | 
| 
      
 174 
     | 
    
         
            +
                        ]
         
     | 
| 
      
 175 
     | 
    
         
            +
                    )
         
     | 
| 
      
 176 
     | 
    
         
            +
             
     | 
| 
      
 177 
     | 
    
         
            +
                @property
         
     | 
| 
      
 178 
     | 
    
         
            +
                def adhoc_holidays(self):
         
     | 
| 
      
 179 
     | 
    
         
            +
                    gf_full_holidays, _, _ = self._get_dynamic_gf_rules()
         
     | 
| 
      
 180 
     | 
    
         
            +
                    return gf_full_holidays
         
     | 
| 
      
 181 
     | 
    
         
            +
             
     | 
| 
      
 182 
     | 
    
         
            +
                @property
         
     | 
| 
      
 183 
     | 
    
         
            +
                def special_closes(self):
         
     | 
| 
      
 184 
     | 
    
         
            +
                    return [
         
     | 
| 
      
 185 
     | 
    
         
            +
                        (
         
     | 
| 
      
 186 
     | 
    
         
            +
                            time(14),
         
     | 
| 
      
 187 
     | 
    
         
            +
                            AbstractHolidayCalendar(
         
     | 
| 
      
 188 
     | 
    
         
            +
                                rules=[
         
     | 
| 
      
 189 
     | 
    
         
            +
                                    DayBeforeGoodFriday2pmEarlyCloseThru2020,
         
     | 
| 
      
 190 
     | 
    
         
            +
                                    DayBeforeUSMemorialDay2pmEarlyClose,
         
     | 
| 
      
 191 
     | 
    
         
            +
                                    DayBeforeUSIndependenceDay2pmEarlyClose,
         
     | 
| 
      
 192 
     | 
    
         
            +
                                    ThursdayBeforeUSIndependenceDay2pmEarlyClose,
         
     | 
| 
      
 193 
     | 
    
         
            +
                                    DayAfterThanksgiving2pmEarlyClose,
         
     | 
| 
      
 194 
     | 
    
         
            +
                                    ChristmasEve2pmEarlyClose,
         
     | 
| 
      
 195 
     | 
    
         
            +
                                    ChristmasEveThursday2pmEarlyClose,
         
     | 
| 
      
 196 
     | 
    
         
            +
                                    USNewYearsEve2pmEarlyClose,
         
     | 
| 
      
 197 
     | 
    
         
            +
                                ]
         
     | 
| 
      
 198 
     | 
    
         
            +
                            ),
         
     | 
| 
      
 199 
     | 
    
         
            +
                        )
         
     | 
| 
      
 200 
     | 
    
         
            +
                    ]
         
     | 
| 
      
 201 
     | 
    
         
            +
             
     | 
| 
      
 202 
     | 
    
         
            +
                @property
         
     | 
| 
      
 203 
     | 
    
         
            +
                def special_closes_adhoc(self):
         
     | 
| 
      
 204 
     | 
    
         
            +
                    _, gf_12pm_early_closes, thurs_before_gf_2pm_early_closes = self._get_dynamic_gf_rules()
         
     | 
| 
      
 205 
     | 
    
         
            +
                    return [
         
     | 
| 
      
 206 
     | 
    
         
            +
                        (
         
     | 
| 
      
 207 
     | 
    
         
            +
                            time(12),  # SIFMA rule specifies 12:00 PM ET
         
     | 
| 
      
 208 
     | 
    
         
            +
                            gf_12pm_early_closes,
         
     | 
| 
      
 209 
     | 
    
         
            +
                        ),
         
     | 
| 
      
 210 
     | 
    
         
            +
                        (
         
     | 
| 
      
 211 
     | 
    
         
            +
                            time(14),  # SIFMA rule specifies 2:00 PM ET
         
     | 
| 
      
 212 
     | 
    
         
            +
                            thurs_before_gf_2pm_early_closes,
         
     | 
| 
      
 213 
     | 
    
         
            +
                        ),
         
     | 
| 
      
 214 
     | 
    
         
            +
                    ]
         
     | 
| 
      
 215 
     | 
    
         
            +
             
     | 
| 
      
 216 
     | 
    
         
            +
             
     | 
| 
      
 217 
     | 
    
         
            +
            ############################################################
         
     | 
| 
      
 218 
     | 
    
         
            +
            # UK
         
     | 
| 
      
 219 
     | 
    
         
            +
            ############################################################
         
     | 
| 
      
 220 
     | 
    
         
            +
             
     | 
| 
      
 221 
     | 
    
         
            +
             
     | 
| 
      
 222 
     | 
    
         
            +
            class SIFMAUKExchangeCalendar(MarketCalendar):
         
     | 
| 
      
 223 
     | 
    
         
            +
                """
         
     | 
| 
      
 224 
     | 
    
         
            +
                Exchange calendar for SIFMA United Kingdom
         
     | 
| 
      
 225 
     | 
    
         
            +
             
     | 
| 
      
 226 
     | 
    
         
            +
                https://www.sifma.org/resources/general/holiday-schedule/#UK
         
     | 
| 
      
 227 
     | 
    
         
            +
             
     | 
| 
      
 228 
     | 
    
         
            +
                """
         
     | 
| 
      
 229 
     | 
    
         
            +
             
     | 
| 
      
 230 
     | 
    
         
            +
                aliases = [
         
     | 
| 
      
 231 
     | 
    
         
            +
                    "SIFMAUK",
         
     | 
| 
      
 232 
     | 
    
         
            +
                    "SIFMA_UK",
         
     | 
| 
      
 233 
     | 
    
         
            +
                    "Capital_Markets_UK",
         
     | 
| 
      
 234 
     | 
    
         
            +
                    "Financial_Markets_UK",
         
     | 
| 
      
 235 
     | 
    
         
            +
                    "Bond_Markets_UK",
         
     | 
| 
      
 236 
     | 
    
         
            +
                ]
         
     | 
| 
      
 237 
     | 
    
         
            +
             
     | 
| 
      
 238 
     | 
    
         
            +
                regular_market_times = {
         
     | 
| 
      
 239 
     | 
    
         
            +
                    "market_open": ((None, time(8)),),
         
     | 
| 
      
 240 
     | 
    
         
            +
                    "market_close": ((None, time(17)),),
         
     | 
| 
      
 241 
     | 
    
         
            +
                }
         
     | 
| 
      
 242 
     | 
    
         
            +
             
     | 
| 
      
 243 
     | 
    
         
            +
                @property
         
     | 
| 
      
 244 
     | 
    
         
            +
                def name(self):
         
     | 
| 
      
 245 
     | 
    
         
            +
                    return "SIFMA_UK"
         
     | 
| 
      
 246 
     | 
    
         
            +
             
     | 
| 
      
 247 
     | 
    
         
            +
                @property
         
     | 
| 
      
 248 
     | 
    
         
            +
                def tz(self):
         
     | 
| 
      
 249 
     | 
    
         
            +
                    return ZoneInfo("Europe/London")
         
     | 
| 
      
 250 
     | 
    
         
            +
             
     | 
| 
      
 251 
     | 
    
         
            +
                @property
         
     | 
| 
      
 252 
     | 
    
         
            +
                def regular_holidays(self):
         
     | 
| 
      
 253 
     | 
    
         
            +
                    return AbstractHolidayCalendar(
         
     | 
| 
      
 254 
     | 
    
         
            +
                        rules=[
         
     | 
| 
      
 255 
     | 
    
         
            +
                            UKNewYearsDay,
         
     | 
| 
      
 256 
     | 
    
         
            +
                            MartinLutherKingJr,
         
     | 
| 
      
 257 
     | 
    
         
            +
                            USPresidentsDay,
         
     | 
| 
      
 258 
     | 
    
         
            +
                            UKGoodFriday,
         
     | 
| 
      
 259 
     | 
    
         
            +
                            UKEasterMonday,
         
     | 
| 
      
 260 
     | 
    
         
            +
                            UKMayDay,
         
     | 
| 
      
 261 
     | 
    
         
            +
                            USMemorialDay,
         
     | 
| 
      
 262 
     | 
    
         
            +
                            USJuneteenthAfter2022,
         
     | 
| 
      
 263 
     | 
    
         
            +
                            USIndependenceDay,
         
     | 
| 
      
 264 
     | 
    
         
            +
                            UKSummerBank,
         
     | 
| 
      
 265 
     | 
    
         
            +
                            USLaborDay,
         
     | 
| 
      
 266 
     | 
    
         
            +
                            USColumbusDay,
         
     | 
| 
      
 267 
     | 
    
         
            +
                            USVeteransDay,
         
     | 
| 
      
 268 
     | 
    
         
            +
                            USThanksgivingDay,
         
     | 
| 
      
 269 
     | 
    
         
            +
                            UKChristmas,
         
     | 
| 
      
 270 
     | 
    
         
            +
                            UKChristmaEve,
         
     | 
| 
      
 271 
     | 
    
         
            +
                            UKWeekendChristmas,
         
     | 
| 
      
 272 
     | 
    
         
            +
                            UKBoxingDay,
         
     | 
| 
      
 273 
     | 
    
         
            +
                            UKWeekendBoxingDay,
         
     | 
| 
      
 274 
     | 
    
         
            +
                        ]
         
     | 
| 
      
 275 
     | 
    
         
            +
                    )
         
     | 
| 
      
 276 
     | 
    
         
            +
             
     | 
| 
      
 277 
     | 
    
         
            +
                @property
         
     | 
| 
      
 278 
     | 
    
         
            +
                def adhoc_holidays(self):
         
     | 
| 
      
 279 
     | 
    
         
            +
                    return list(
         
     | 
| 
      
 280 
     | 
    
         
            +
                        chain(
         
     | 
| 
      
 281 
     | 
    
         
            +
                            UKSpringBankAdHoc,
         
     | 
| 
      
 282 
     | 
    
         
            +
                            UKPlatinumJubilee2022,
         
     | 
| 
      
 283 
     | 
    
         
            +
                        )
         
     | 
| 
      
 284 
     | 
    
         
            +
                    )
         
     | 
| 
      
 285 
     | 
    
         
            +
             
     | 
| 
      
 286 
     | 
    
         
            +
             
     | 
| 
      
 287 
     | 
    
         
            +
            ############################################################
         
     | 
| 
      
 288 
     | 
    
         
            +
            # Japan
         
     | 
| 
      
 289 
     | 
    
         
            +
            ############################################################
         
     | 
| 
      
 290 
     | 
    
         
            +
            from pandas_market_calendars.holidays.jp import (
         
     | 
| 
      
 291 
     | 
    
         
            +
                JapanComingOfAgeDay,
         
     | 
| 
      
 292 
     | 
    
         
            +
                JapanNationalFoundationDay,
         
     | 
| 
      
 293 
     | 
    
         
            +
                JapanEmperorsBirthday,
         
     | 
| 
      
 294 
     | 
    
         
            +
                JapanVernalEquinox,
         
     | 
| 
      
 295 
     | 
    
         
            +
                JapanShowaDay,
         
     | 
| 
      
 296 
     | 
    
         
            +
                JapanConstitutionMemorialDay,
         
     | 
| 
      
 297 
     | 
    
         
            +
                JapanGreeneryDay,
         
     | 
| 
      
 298 
     | 
    
         
            +
                JapanChildrensDay,
         
     | 
| 
      
 299 
     | 
    
         
            +
                JapanMarineDay,
         
     | 
| 
      
 300 
     | 
    
         
            +
                JapanMountainDay,
         
     | 
| 
      
 301 
     | 
    
         
            +
                JapanRespectForTheAgedDay,
         
     | 
| 
      
 302 
     | 
    
         
            +
                JapanAutumnalEquinox,
         
     | 
| 
      
 303 
     | 
    
         
            +
                JapanHealthAndSportsDay2000To2019,
         
     | 
| 
      
 304 
     | 
    
         
            +
                JapanSportsDay2020,
         
     | 
| 
      
 305 
     | 
    
         
            +
                JapanSportsDay,
         
     | 
| 
      
 306 
     | 
    
         
            +
                JapanCultureDay,
         
     | 
| 
      
 307 
     | 
    
         
            +
                JapanLaborThanksgivingDay,
         
     | 
| 
      
 308 
     | 
    
         
            +
            )
         
     | 
| 
      
 309 
     | 
    
         
            +
             
     | 
| 
      
 310 
     | 
    
         
            +
             
     | 
| 
      
 311 
     | 
    
         
            +
            class SIFMAJPExchangeCalendar(MarketCalendar):
         
     | 
| 
      
 312 
     | 
    
         
            +
                """
         
     | 
| 
      
 313 
     | 
    
         
            +
                Exchange calendar for SIFMA Japan
         
     | 
| 
      
 314 
     | 
    
         
            +
             
     | 
| 
      
 315 
     | 
    
         
            +
                https://www.sifma.org/resources/general/holiday-schedule/#JP
         
     | 
| 
      
 316 
     | 
    
         
            +
             
     | 
| 
      
 317 
     | 
    
         
            +
                """
         
     | 
| 
      
 318 
     | 
    
         
            +
             
     | 
| 
      
 319 
     | 
    
         
            +
                aliases = [
         
     | 
| 
      
 320 
     | 
    
         
            +
                    "SIFMAJP",
         
     | 
| 
      
 321 
     | 
    
         
            +
                    "SIFMA_JP",
         
     | 
| 
      
 322 
     | 
    
         
            +
                    "Capital_Markets_JP",
         
     | 
| 
      
 323 
     | 
    
         
            +
                    "Financial_Markets_JP",
         
     | 
| 
      
 324 
     | 
    
         
            +
                    "Bond_Markets_JP",
         
     | 
| 
      
 325 
     | 
    
         
            +
                ]
         
     | 
| 
      
 326 
     | 
    
         
            +
             
     | 
| 
      
 327 
     | 
    
         
            +
                regular_market_times = {
         
     | 
| 
      
 328 
     | 
    
         
            +
                    "market_open": ((None, time(8, 30)),),
         
     | 
| 
      
 329 
     | 
    
         
            +
                    "market_close": ((None, time(18, 30)),),
         
     | 
| 
      
 330 
     | 
    
         
            +
                }
         
     | 
| 
      
 331 
     | 
    
         
            +
             
     | 
| 
      
 332 
     | 
    
         
            +
                @property
         
     | 
| 
      
 333 
     | 
    
         
            +
                def name(self):
         
     | 
| 
      
 334 
     | 
    
         
            +
                    return "SIFMA_JP"
         
     | 
| 
      
 335 
     | 
    
         
            +
             
     | 
| 
      
 336 
     | 
    
         
            +
                @property
         
     | 
| 
      
 337 
     | 
    
         
            +
                def tz(self):
         
     | 
| 
      
 338 
     | 
    
         
            +
                    return ZoneInfo("Asia/Tokyo")
         
     | 
| 
      
 339 
     | 
    
         
            +
             
     | 
| 
      
 340 
     | 
    
         
            +
                @property
         
     | 
| 
      
 341 
     | 
    
         
            +
                def regular_holidays(self):
         
     | 
| 
      
 342 
     | 
    
         
            +
                    return AbstractHolidayCalendar(
         
     | 
| 
      
 343 
     | 
    
         
            +
                        rules=[
         
     | 
| 
      
 344 
     | 
    
         
            +
                            UKNewYearsDay,
         
     | 
| 
      
 345 
     | 
    
         
            +
                            JapanComingOfAgeDay,
         
     | 
| 
      
 346 
     | 
    
         
            +
                            MartinLutherKingJr,
         
     | 
| 
      
 347 
     | 
    
         
            +
                            JapanNationalFoundationDay,
         
     | 
| 
      
 348 
     | 
    
         
            +
                            USPresidentsDay,
         
     | 
| 
      
 349 
     | 
    
         
            +
                            JapanEmperorsBirthday,
         
     | 
| 
      
 350 
     | 
    
         
            +
                            JapanVernalEquinox,
         
     | 
| 
      
 351 
     | 
    
         
            +
                            UKGoodFriday,
         
     | 
| 
      
 352 
     | 
    
         
            +
                            UKEasterMonday,
         
     | 
| 
      
 353 
     | 
    
         
            +
                            JapanShowaDay,
         
     | 
| 
      
 354 
     | 
    
         
            +
                            JapanConstitutionMemorialDay,
         
     | 
| 
      
 355 
     | 
    
         
            +
                            JapanGreeneryDay,
         
     | 
| 
      
 356 
     | 
    
         
            +
                            JapanChildrensDay,
         
     | 
| 
      
 357 
     | 
    
         
            +
                            USMemorialDay,
         
     | 
| 
      
 358 
     | 
    
         
            +
                            USJuneteenthAfter2022,
         
     | 
| 
      
 359 
     | 
    
         
            +
                            USIndependenceDay,
         
     | 
| 
      
 360 
     | 
    
         
            +
                            JapanMarineDay,
         
     | 
| 
      
 361 
     | 
    
         
            +
                            JapanMountainDay,
         
     | 
| 
      
 362 
     | 
    
         
            +
                            UKSummerBank,
         
     | 
| 
      
 363 
     | 
    
         
            +
                            USLaborDay,
         
     | 
| 
      
 364 
     | 
    
         
            +
                            JapanRespectForTheAgedDay,
         
     | 
| 
      
 365 
     | 
    
         
            +
                            JapanAutumnalEquinox,
         
     | 
| 
      
 366 
     | 
    
         
            +
                            JapanSportsDay,
         
     | 
| 
      
 367 
     | 
    
         
            +
                            JapanSportsDay2020,
         
     | 
| 
      
 368 
     | 
    
         
            +
                            JapanHealthAndSportsDay2000To2019,
         
     | 
| 
      
 369 
     | 
    
         
            +
                            JapanCultureDay,
         
     | 
| 
      
 370 
     | 
    
         
            +
                            USVeteransDay,
         
     | 
| 
      
 371 
     | 
    
         
            +
                            JapanLaborThanksgivingDay,
         
     | 
| 
      
 372 
     | 
    
         
            +
                            USThanksgivingDay,
         
     | 
| 
      
 373 
     | 
    
         
            +
                            UKChristmas,
         
     | 
| 
      
 374 
     | 
    
         
            +
                            UKChristmaEve,
         
     | 
| 
      
 375 
     | 
    
         
            +
                            UKBoxingDay,
         
     | 
| 
      
 376 
     | 
    
         
            +
                            UKWeekendBoxingDay,
         
     | 
| 
      
 377 
     | 
    
         
            +
                        ]
         
     | 
| 
      
 378 
     | 
    
         
            +
                    )
         
     | 
| 
      
 379 
     | 
    
         
            +
             
     | 
| 
      
 380 
     | 
    
         
            +
                @property
         
     | 
| 
      
 381 
     | 
    
         
            +
                def adhoc_holidays(self):
         
     | 
| 
      
 382 
     | 
    
         
            +
                    return list(
         
     | 
| 
      
 383 
     | 
    
         
            +
                        chain(
         
     | 
| 
      
 384 
     | 
    
         
            +
                            UKSpringBankAdHoc,
         
     | 
| 
      
 385 
     | 
    
         
            +
                            UKPlatinumJubilee2022,
         
     | 
| 
      
 386 
     | 
    
         
            +
                        )
         
     | 
| 
      
 387 
     | 
    
         
            +
                    )
         
     | 
| 
      
 388 
     | 
    
         
            +
             
     | 
| 
      
 389 
     | 
    
         
            +
                @property
         
     | 
| 
      
 390 
     | 
    
         
            +
                def special_closes(self):
         
     | 
| 
      
 391 
     | 
    
         
            +
                    return [(time(15), AbstractHolidayCalendar(rules=[UKMayDay, UKWeekendChristmas]))]
         
     |