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,214 +1,214 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            from dateutil.relativedelta import MO, TH
         
     | 
| 
       2 
     | 
    
         
            -
            from pandas import DateOffset, Timestamp
         
     | 
| 
       3 
     | 
    
         
            -
            from pandas.tseries.holiday import Holiday, nearest_workday, Easter
         
     | 
| 
       4 
     | 
    
         
            -
            from pandas.tseries.offsets import Day
         
     | 
| 
       5 
     | 
    
         
            -
             
     | 
| 
       6 
     | 
    
         
            -
            from pandas_market_calendars.market_calendar import (
         
     | 
| 
       7 
     | 
    
         
            -
                MONDAY,
         
     | 
| 
       8 
     | 
    
         
            -
                TUESDAY,
         
     | 
| 
       9 
     | 
    
         
            -
                WEDNESDAY,
         
     | 
| 
       10 
     | 
    
         
            -
                THURSDAY,
         
     | 
| 
       11 
     | 
    
         
            -
                FRIDAY,
         
     | 
| 
       12 
     | 
    
         
            -
            )
         
     | 
| 
       13 
     | 
    
         
            -
             
     | 
| 
       14 
     | 
    
         
            -
            ####################################################
         
     | 
| 
       15 
     | 
    
         
            -
            # US New Years Day Jan 1
         
     | 
| 
       16 
     | 
    
         
            -
            #####################################################
         
     | 
| 
       17 
     | 
    
         
            -
            USNewYearsDay = Holiday(
         
     | 
| 
       18 
     | 
    
         
            -
                "New Years Day",
         
     | 
| 
       19 
     | 
    
         
            -
                month=1,
         
     | 
| 
       20 
     | 
    
         
            -
                day=1,
         
     | 
| 
       21 
     | 
    
         
            -
                start_date=Timestamp("1952-09-29"),
         
     | 
| 
       22 
     | 
    
         
            -
                # observance=sunday_to_monday,
         
     | 
| 
       23 
     | 
    
         
            -
                days_of_week=(
         
     | 
| 
       24 
     | 
    
         
            -
                    MONDAY,
         
     | 
| 
       25 
     | 
    
         
            -
                    TUESDAY,
         
     | 
| 
       26 
     | 
    
         
            -
                    WEDNESDAY,
         
     | 
| 
       27 
     | 
    
         
            -
                    THURSDAY,
         
     | 
| 
       28 
     | 
    
         
            -
                    FRIDAY,
         
     | 
| 
       29 
     | 
    
         
            -
                ),
         
     | 
| 
       30 
     | 
    
         
            -
            )
         
     | 
| 
       31 
     | 
    
         
            -
             
     | 
| 
       32 
     | 
    
         
            -
            #########################################################################
         
     | 
| 
       33 
     | 
    
         
            -
            # Martin Luther King Jr.
         
     | 
| 
       34 
     | 
    
         
            -
            #    Starting 1998
         
     | 
| 
       35 
     | 
    
         
            -
            ##########################################################################
         
     | 
| 
       36 
     | 
    
         
            -
            USMartinLutherKingJrFrom2022 = Holiday(
         
     | 
| 
       37 
     | 
    
         
            -
                "Dr. Martin Luther King Jr. Day",
         
     | 
| 
       38 
     | 
    
         
            -
                month=1,
         
     | 
| 
       39 
     | 
    
         
            -
                day=1,
         
     | 
| 
       40 
     | 
    
         
            -
                start_date=Timestamp("2022-01-01"),
         
     | 
| 
       41 
     | 
    
         
            -
                days_of_week=(
         
     | 
| 
       42 
     | 
    
         
            -
                    MONDAY,
         
     | 
| 
       43 
     | 
    
         
            -
                    TUESDAY,
         
     | 
| 
       44 
     | 
    
         
            -
                    WEDNESDAY,
         
     | 
| 
       45 
     | 
    
         
            -
                    THURSDAY,
         
     | 
| 
       46 
     | 
    
         
            -
                    FRIDAY,
         
     | 
| 
       47 
     | 
    
         
            -
                ),
         
     | 
| 
       48 
     | 
    
         
            -
                offset=DateOffset(weekday=MO(3)),
         
     | 
| 
       49 
     | 
    
         
            -
            )
         
     | 
| 
       50 
     | 
    
         
            -
             
     | 
| 
       51 
     | 
    
         
            -
            USMartinLutherKingJrPre2022 = Holiday(
         
     | 
| 
       52 
     | 
    
         
            -
                "Dr. Martin Luther King Jr. Day",
         
     | 
| 
       53 
     | 
    
         
            -
                month=1,
         
     | 
| 
       54 
     | 
    
         
            -
                day=1,
         
     | 
| 
       55 
     | 
    
         
            -
                start_date=Timestamp("1998-01-01"),
         
     | 
| 
       56 
     | 
    
         
            -
                end_date=Timestamp("2021-12-31"),
         
     | 
| 
       57 
     | 
    
         
            -
                offset=DateOffset(weekday=MO(3)),
         
     | 
| 
       58 
     | 
    
         
            -
            )
         
     | 
| 
       59 
     | 
    
         
            -
             
     | 
| 
       60 
     | 
    
         
            -
            #########################################################################
         
     | 
| 
       61 
     | 
    
         
            -
            # US Presidents Day Feb
         
     | 
| 
       62 
     | 
    
         
            -
            ##########################################################################
         
     | 
| 
       63 
     | 
    
         
            -
            USPresidentsDayFrom2022 = Holiday(
         
     | 
| 
       64 
     | 
    
         
            -
                "President" "s Day",
         
     | 
| 
       65 
     | 
    
         
            -
                start_date=Timestamp("2022-01-01"),
         
     | 
| 
       66 
     | 
    
         
            -
                month=2,
         
     | 
| 
       67 
     | 
    
         
            -
                day=1,
         
     | 
| 
       68 
     | 
    
         
            -
                offset=DateOffset(weekday=MO(3)),
         
     | 
| 
       69 
     | 
    
         
            -
            )
         
     | 
| 
       70 
     | 
    
         
            -
             
     | 
| 
       71 
     | 
    
         
            -
            USPresidentsDayPre2022 = Holiday(
         
     | 
| 
       72 
     | 
    
         
            -
                "President" "s Day",
         
     | 
| 
       73 
     | 
    
         
            -
                end_date=Timestamp("2021-12-31"),
         
     | 
| 
       74 
     | 
    
         
            -
                month=2,
         
     | 
| 
       75 
     | 
    
         
            -
                day=1,
         
     | 
| 
       76 
     | 
    
         
            -
                offset=DateOffset(weekday=MO(3)),
         
     | 
| 
       77 
     | 
    
         
            -
            )
         
     | 
| 
       78 
     | 
    
         
            -
             
     | 
| 
       79 
     | 
    
         
            -
            ############################################################
         
     | 
| 
       80 
     | 
    
         
            -
            # Good Friday
         
     | 
| 
       81 
     | 
    
         
            -
            ############################################################
         
     | 
| 
       82 
     | 
    
         
            -
            GoodFriday = Holiday(
         
     | 
| 
       83 
     | 
    
         
            -
                "Good Friday 1908+",
         
     | 
| 
       84 
     | 
    
         
            -
                start_date=Timestamp("1908-01-01"),
         
     | 
| 
       85 
     | 
    
         
            -
                month=1,
         
     | 
| 
       86 
     | 
    
         
            -
                day=1,
         
     | 
| 
       87 
     | 
    
         
            -
                offset=[Easter(), Day(-2)],
         
     | 
| 
       88 
     | 
    
         
            -
            )
         
     | 
| 
       89 
     | 
    
         
            -
             
     | 
| 
       90 
     | 
    
         
            -
            ##################################################
         
     | 
| 
       91 
     | 
    
         
            -
            # US Memorial Day (Decoration Day) May 30
         
     | 
| 
       92 
     | 
    
         
            -
            ##################################################
         
     | 
| 
       93 
     | 
    
         
            -
            USMemorialDayFrom2022 = Holiday(
         
     | 
| 
       94 
     | 
    
         
            -
                "Memorial Day",
         
     | 
| 
       95 
     | 
    
         
            -
                month=5,
         
     | 
| 
       96 
     | 
    
         
            -
                day=25,
         
     | 
| 
       97 
     | 
    
         
            -
                start_date=Timestamp("2022-01-01"),
         
     | 
| 
       98 
     | 
    
         
            -
                offset=DateOffset(weekday=MO(1)),
         
     | 
| 
       99 
     | 
    
         
            -
            )
         
     | 
| 
       100 
     | 
    
         
            -
             
     | 
| 
       101 
     | 
    
         
            -
            USMemorialDayPre2022 = Holiday(
         
     | 
| 
       102 
     | 
    
         
            -
                "Memorial Day",
         
     | 
| 
       103 
     | 
    
         
            -
                month=5,
         
     | 
| 
       104 
     | 
    
         
            -
                day=25,
         
     | 
| 
       105 
     | 
    
         
            -
                end_date=Timestamp("2021-12-31"),
         
     | 
| 
       106 
     | 
    
         
            -
                offset=DateOffset(weekday=MO(1)),
         
     | 
| 
       107 
     | 
    
         
            -
            )
         
     | 
| 
       108 
     | 
    
         
            -
             
     | 
| 
       109 
     | 
    
         
            -
            #######################################
         
     | 
| 
       110 
     | 
    
         
            -
            # US Juneteenth (June 19th)
         
     | 
| 
       111 
     | 
    
         
            -
            #######################################
         
     | 
| 
       112 
     | 
    
         
            -
            USJuneteenthFrom2022 = Holiday(
         
     | 
| 
       113 
     | 
    
         
            -
                "Juneteenth Starting at 2022",
         
     | 
| 
       114 
     | 
    
         
            -
                start_date=Timestamp("2022-06-19"),
         
     | 
| 
       115 
     | 
    
         
            -
                month=6,
         
     | 
| 
       116 
     | 
    
         
            -
                day=19,
         
     | 
| 
       117 
     | 
    
         
            -
                observance=nearest_workday,
         
     | 
| 
       118 
     | 
    
         
            -
            )
         
     | 
| 
       119 
     | 
    
         
            -
             
     | 
| 
       120 
     | 
    
         
            -
            #######################################
         
     | 
| 
       121 
     | 
    
         
            -
            # US Independence Day July 4
         
     | 
| 
       122 
     | 
    
         
            -
            #######################################
         
     | 
| 
       123 
     | 
    
         
            -
            USIndependenceDayFrom2022 = Holiday(
         
     | 
| 
       124 
     | 
    
         
            -
                "July 4th",
         
     | 
| 
       125 
     | 
    
         
            -
                month=7,
         
     | 
| 
       126 
     | 
    
         
            -
                day=4,
         
     | 
| 
       127 
     | 
    
         
            -
                start_date=Timestamp("2022-01-01"),
         
     | 
| 
       128 
     | 
    
         
            -
                observance=nearest_workday,
         
     | 
| 
       129 
     | 
    
         
            -
            )
         
     | 
| 
       130 
     | 
    
         
            -
            USIndependenceDayPre2022 = Holiday(
         
     | 
| 
       131 
     | 
    
         
            -
                "July 4th",
         
     | 
| 
       132 
     | 
    
         
            -
                month=7,
         
     | 
| 
       133 
     | 
    
         
            -
                day=4,
         
     | 
| 
       134 
     | 
    
         
            -
                end_date=Timestamp("2021-12-31"),
         
     | 
| 
       135 
     | 
    
         
            -
                observance=nearest_workday,
         
     | 
| 
       136 
     | 
    
         
            -
            )
         
     | 
| 
       137 
     | 
    
         
            -
             
     | 
| 
       138 
     | 
    
         
            -
            #################################################
         
     | 
| 
       139 
     | 
    
         
            -
            # US Labor Day Starting 1887
         
     | 
| 
       140 
     | 
    
         
            -
            #################################################
         
     | 
| 
       141 
     | 
    
         
            -
            USLaborDayFrom2022 = Holiday(
         
     | 
| 
       142 
     | 
    
         
            -
                "Labor Day",
         
     | 
| 
       143 
     | 
    
         
            -
                month=9,
         
     | 
| 
       144 
     | 
    
         
            -
                day=1,
         
     | 
| 
       145 
     | 
    
         
            -
                start_date=Timestamp("2022-01-01"),
         
     | 
| 
       146 
     | 
    
         
            -
                offset=DateOffset(weekday=MO(1)),
         
     | 
| 
       147 
     | 
    
         
            -
            )
         
     | 
| 
       148 
     | 
    
         
            -
            USLaborDayPre2022 = Holiday(
         
     | 
| 
       149 
     | 
    
         
            -
                "Labor Day",
         
     | 
| 
       150 
     | 
    
         
            -
                month=9,
         
     | 
| 
       151 
     | 
    
         
            -
                day=1,
         
     | 
| 
       152 
     | 
    
         
            -
                end_date=Timestamp("2021-12-31"),
         
     | 
| 
       153 
     | 
    
         
            -
                offset=DateOffset(weekday=MO(1)),
         
     | 
| 
       154 
     | 
    
         
            -
            )
         
     | 
| 
       155 
     | 
    
         
            -
            USLaborDay = Holiday(
         
     | 
| 
       156 
     | 
    
         
            -
                "Labor Day",
         
     | 
| 
       157 
     | 
    
         
            -
                month=9,
         
     | 
| 
       158 
     | 
    
         
            -
                day=1,
         
     | 
| 
       159 
     | 
    
         
            -
                start_date=Timestamp("1887-01-01"),
         
     | 
| 
       160 
     | 
    
         
            -
                offset=DateOffset(weekday=MO(1)),
         
     | 
| 
       161 
     | 
    
         
            -
            )
         
     | 
| 
       162 
     | 
    
         
            -
             
     | 
| 
       163 
     | 
    
         
            -
            ################################################
         
     | 
| 
       164 
     | 
    
         
            -
            # US Thanksgiving Nov 30
         
     | 
| 
       165 
     | 
    
         
            -
            ################################################
         
     | 
| 
       166 
     | 
    
         
            -
            USThanksgivingDayFrom2022 = Holiday(
         
     | 
| 
       167 
     | 
    
         
            -
                "Thanksgiving",
         
     | 
| 
       168 
     | 
    
         
            -
                start_date=Timestamp("2022-01-01"),
         
     | 
| 
       169 
     | 
    
         
            -
                month=11,
         
     | 
| 
       170 
     | 
    
         
            -
                day=1,
         
     | 
| 
       171 
     | 
    
         
            -
                offset=DateOffset(weekday=TH(4)),
         
     | 
| 
       172 
     | 
    
         
            -
            )
         
     | 
| 
       173 
     | 
    
         
            -
             
     | 
| 
       174 
     | 
    
         
            -
            USThanksgivingDayPre2022 = Holiday(
         
     | 
| 
       175 
     | 
    
         
            -
                "Thanksgiving",
         
     | 
| 
       176 
     | 
    
         
            -
                end_date=Timestamp("2021-12-31"),
         
     | 
| 
       177 
     | 
    
         
            -
                month=11,
         
     | 
| 
       178 
     | 
    
         
            -
                day=1,
         
     | 
| 
       179 
     | 
    
         
            -
                offset=DateOffset(weekday=TH(4)),
         
     | 
| 
       180 
     | 
    
         
            -
            )
         
     | 
| 
       181 
     | 
    
         
            -
             
     | 
| 
       182 
     | 
    
         
            -
            FridayAfterThanksgiving = Holiday(
         
     | 
| 
       183 
     | 
    
         
            -
                "Friday after Thanksgiving",
         
     | 
| 
       184 
     | 
    
         
            -
                month=11,
         
     | 
| 
       185 
     | 
    
         
            -
                day=1,
         
     | 
| 
       186 
     | 
    
         
            -
                offset=[DateOffset(weekday=TH(4)), Day(1)],
         
     | 
| 
       187 
     | 
    
         
            -
            )
         
     | 
| 
       188 
     | 
    
         
            -
             
     | 
| 
       189 
     | 
    
         
            -
            USThanksgivingFridayFrom2021 = Holiday(
         
     | 
| 
       190 
     | 
    
         
            -
                "Thanksgiving Friday",
         
     | 
| 
       191 
     | 
    
         
            -
                month=11,
         
     | 
| 
       192 
     | 
    
         
            -
                day=1,
         
     | 
| 
       193 
     | 
    
         
            -
                offset=[DateOffset(weekday=TH(4)), Day(1)],
         
     | 
| 
       194 
     | 
    
         
            -
                start_date=Timestamp("2021-01-01"),
         
     | 
| 
       195 
     | 
    
         
            -
            )
         
     | 
| 
       196 
     | 
    
         
            -
             
     | 
| 
       197 
     | 
    
         
            -
            USThanksgivingFridayPre2021 = Holiday(
         
     | 
| 
       198 
     | 
    
         
            -
                "Thanksgiving Friday",
         
     | 
| 
       199 
     | 
    
         
            -
                month=11,
         
     | 
| 
       200 
     | 
    
         
            -
                day=1,
         
     | 
| 
       201 
     | 
    
         
            -
                offset=[DateOffset(weekday=TH(4)), Day(1)],
         
     | 
| 
       202 
     | 
    
         
            -
                end_date=Timestamp("2020-12-31"),
         
     | 
| 
       203 
     | 
    
         
            -
            )
         
     | 
| 
       204 
     | 
    
         
            -
             
     | 
| 
       205 
     | 
    
         
            -
            ################################
         
     | 
| 
       206 
     | 
    
         
            -
            # Christmas Dec 25
         
     | 
| 
       207 
     | 
    
         
            -
            ################################
         
     | 
| 
       208 
     | 
    
         
            -
            ChristmasCME = Holiday(
         
     | 
| 
       209 
     | 
    
         
            -
                "Christmas",
         
     | 
| 
       210 
     | 
    
         
            -
                month=12,
         
     | 
| 
       211 
     | 
    
         
            -
                day=25,
         
     | 
| 
       212 
     | 
    
         
            -
                start_date=Timestamp("1999-01-01"),
         
     | 
| 
       213 
     | 
    
         
            -
                observance=nearest_workday,
         
     | 
| 
       214 
     | 
    
         
            -
            )
         
     | 
| 
      
 1 
     | 
    
         
            +
            from dateutil.relativedelta import MO, TH
         
     | 
| 
      
 2 
     | 
    
         
            +
            from pandas import DateOffset, Timestamp
         
     | 
| 
      
 3 
     | 
    
         
            +
            from pandas.tseries.holiday import Holiday, nearest_workday, Easter
         
     | 
| 
      
 4 
     | 
    
         
            +
            from pandas.tseries.offsets import Day
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
            from pandas_market_calendars.market_calendar import (
         
     | 
| 
      
 7 
     | 
    
         
            +
                MONDAY,
         
     | 
| 
      
 8 
     | 
    
         
            +
                TUESDAY,
         
     | 
| 
      
 9 
     | 
    
         
            +
                WEDNESDAY,
         
     | 
| 
      
 10 
     | 
    
         
            +
                THURSDAY,
         
     | 
| 
      
 11 
     | 
    
         
            +
                FRIDAY,
         
     | 
| 
      
 12 
     | 
    
         
            +
            )
         
     | 
| 
      
 13 
     | 
    
         
            +
             
     | 
| 
      
 14 
     | 
    
         
            +
            ####################################################
         
     | 
| 
      
 15 
     | 
    
         
            +
            # US New Years Day Jan 1
         
     | 
| 
      
 16 
     | 
    
         
            +
            #####################################################
         
     | 
| 
      
 17 
     | 
    
         
            +
            USNewYearsDay = Holiday(
         
     | 
| 
      
 18 
     | 
    
         
            +
                "New Years Day",
         
     | 
| 
      
 19 
     | 
    
         
            +
                month=1,
         
     | 
| 
      
 20 
     | 
    
         
            +
                day=1,
         
     | 
| 
      
 21 
     | 
    
         
            +
                start_date=Timestamp("1952-09-29"),
         
     | 
| 
      
 22 
     | 
    
         
            +
                # observance=sunday_to_monday,
         
     | 
| 
      
 23 
     | 
    
         
            +
                days_of_week=(
         
     | 
| 
      
 24 
     | 
    
         
            +
                    MONDAY,
         
     | 
| 
      
 25 
     | 
    
         
            +
                    TUESDAY,
         
     | 
| 
      
 26 
     | 
    
         
            +
                    WEDNESDAY,
         
     | 
| 
      
 27 
     | 
    
         
            +
                    THURSDAY,
         
     | 
| 
      
 28 
     | 
    
         
            +
                    FRIDAY,
         
     | 
| 
      
 29 
     | 
    
         
            +
                ),
         
     | 
| 
      
 30 
     | 
    
         
            +
            )
         
     | 
| 
      
 31 
     | 
    
         
            +
             
     | 
| 
      
 32 
     | 
    
         
            +
            #########################################################################
         
     | 
| 
      
 33 
     | 
    
         
            +
            # Martin Luther King Jr.
         
     | 
| 
      
 34 
     | 
    
         
            +
            #    Starting 1998
         
     | 
| 
      
 35 
     | 
    
         
            +
            ##########################################################################
         
     | 
| 
      
 36 
     | 
    
         
            +
            USMartinLutherKingJrFrom2022 = Holiday(
         
     | 
| 
      
 37 
     | 
    
         
            +
                "Dr. Martin Luther King Jr. Day",
         
     | 
| 
      
 38 
     | 
    
         
            +
                month=1,
         
     | 
| 
      
 39 
     | 
    
         
            +
                day=1,
         
     | 
| 
      
 40 
     | 
    
         
            +
                start_date=Timestamp("2022-01-01"),
         
     | 
| 
      
 41 
     | 
    
         
            +
                days_of_week=(
         
     | 
| 
      
 42 
     | 
    
         
            +
                    MONDAY,
         
     | 
| 
      
 43 
     | 
    
         
            +
                    TUESDAY,
         
     | 
| 
      
 44 
     | 
    
         
            +
                    WEDNESDAY,
         
     | 
| 
      
 45 
     | 
    
         
            +
                    THURSDAY,
         
     | 
| 
      
 46 
     | 
    
         
            +
                    FRIDAY,
         
     | 
| 
      
 47 
     | 
    
         
            +
                ),
         
     | 
| 
      
 48 
     | 
    
         
            +
                offset=DateOffset(weekday=MO(3)),
         
     | 
| 
      
 49 
     | 
    
         
            +
            )
         
     | 
| 
      
 50 
     | 
    
         
            +
             
     | 
| 
      
 51 
     | 
    
         
            +
            USMartinLutherKingJrPre2022 = Holiday(
         
     | 
| 
      
 52 
     | 
    
         
            +
                "Dr. Martin Luther King Jr. Day",
         
     | 
| 
      
 53 
     | 
    
         
            +
                month=1,
         
     | 
| 
      
 54 
     | 
    
         
            +
                day=1,
         
     | 
| 
      
 55 
     | 
    
         
            +
                start_date=Timestamp("1998-01-01"),
         
     | 
| 
      
 56 
     | 
    
         
            +
                end_date=Timestamp("2021-12-31"),
         
     | 
| 
      
 57 
     | 
    
         
            +
                offset=DateOffset(weekday=MO(3)),
         
     | 
| 
      
 58 
     | 
    
         
            +
            )
         
     | 
| 
      
 59 
     | 
    
         
            +
             
     | 
| 
      
 60 
     | 
    
         
            +
            #########################################################################
         
     | 
| 
      
 61 
     | 
    
         
            +
            # US Presidents Day Feb
         
     | 
| 
      
 62 
     | 
    
         
            +
            ##########################################################################
         
     | 
| 
      
 63 
     | 
    
         
            +
            USPresidentsDayFrom2022 = Holiday(
         
     | 
| 
      
 64 
     | 
    
         
            +
                "President" "s Day",
         
     | 
| 
      
 65 
     | 
    
         
            +
                start_date=Timestamp("2022-01-01"),
         
     | 
| 
      
 66 
     | 
    
         
            +
                month=2,
         
     | 
| 
      
 67 
     | 
    
         
            +
                day=1,
         
     | 
| 
      
 68 
     | 
    
         
            +
                offset=DateOffset(weekday=MO(3)),
         
     | 
| 
      
 69 
     | 
    
         
            +
            )
         
     | 
| 
      
 70 
     | 
    
         
            +
             
     | 
| 
      
 71 
     | 
    
         
            +
            USPresidentsDayPre2022 = Holiday(
         
     | 
| 
      
 72 
     | 
    
         
            +
                "President" "s Day",
         
     | 
| 
      
 73 
     | 
    
         
            +
                end_date=Timestamp("2021-12-31"),
         
     | 
| 
      
 74 
     | 
    
         
            +
                month=2,
         
     | 
| 
      
 75 
     | 
    
         
            +
                day=1,
         
     | 
| 
      
 76 
     | 
    
         
            +
                offset=DateOffset(weekday=MO(3)),
         
     | 
| 
      
 77 
     | 
    
         
            +
            )
         
     | 
| 
      
 78 
     | 
    
         
            +
             
     | 
| 
      
 79 
     | 
    
         
            +
            ############################################################
         
     | 
| 
      
 80 
     | 
    
         
            +
            # Good Friday
         
     | 
| 
      
 81 
     | 
    
         
            +
            ############################################################
         
     | 
| 
      
 82 
     | 
    
         
            +
            GoodFriday = Holiday(
         
     | 
| 
      
 83 
     | 
    
         
            +
                "Good Friday 1908+",
         
     | 
| 
      
 84 
     | 
    
         
            +
                start_date=Timestamp("1908-01-01"),
         
     | 
| 
      
 85 
     | 
    
         
            +
                month=1,
         
     | 
| 
      
 86 
     | 
    
         
            +
                day=1,
         
     | 
| 
      
 87 
     | 
    
         
            +
                offset=[Easter(), Day(-2)],
         
     | 
| 
      
 88 
     | 
    
         
            +
            )
         
     | 
| 
      
 89 
     | 
    
         
            +
             
     | 
| 
      
 90 
     | 
    
         
            +
            ##################################################
         
     | 
| 
      
 91 
     | 
    
         
            +
            # US Memorial Day (Decoration Day) May 30
         
     | 
| 
      
 92 
     | 
    
         
            +
            ##################################################
         
     | 
| 
      
 93 
     | 
    
         
            +
            USMemorialDayFrom2022 = Holiday(
         
     | 
| 
      
 94 
     | 
    
         
            +
                "Memorial Day",
         
     | 
| 
      
 95 
     | 
    
         
            +
                month=5,
         
     | 
| 
      
 96 
     | 
    
         
            +
                day=25,
         
     | 
| 
      
 97 
     | 
    
         
            +
                start_date=Timestamp("2022-01-01"),
         
     | 
| 
      
 98 
     | 
    
         
            +
                offset=DateOffset(weekday=MO(1)),
         
     | 
| 
      
 99 
     | 
    
         
            +
            )
         
     | 
| 
      
 100 
     | 
    
         
            +
             
     | 
| 
      
 101 
     | 
    
         
            +
            USMemorialDayPre2022 = Holiday(
         
     | 
| 
      
 102 
     | 
    
         
            +
                "Memorial Day",
         
     | 
| 
      
 103 
     | 
    
         
            +
                month=5,
         
     | 
| 
      
 104 
     | 
    
         
            +
                day=25,
         
     | 
| 
      
 105 
     | 
    
         
            +
                end_date=Timestamp("2021-12-31"),
         
     | 
| 
      
 106 
     | 
    
         
            +
                offset=DateOffset(weekday=MO(1)),
         
     | 
| 
      
 107 
     | 
    
         
            +
            )
         
     | 
| 
      
 108 
     | 
    
         
            +
             
     | 
| 
      
 109 
     | 
    
         
            +
            #######################################
         
     | 
| 
      
 110 
     | 
    
         
            +
            # US Juneteenth (June 19th)
         
     | 
| 
      
 111 
     | 
    
         
            +
            #######################################
         
     | 
| 
      
 112 
     | 
    
         
            +
            USJuneteenthFrom2022 = Holiday(
         
     | 
| 
      
 113 
     | 
    
         
            +
                "Juneteenth Starting at 2022",
         
     | 
| 
      
 114 
     | 
    
         
            +
                start_date=Timestamp("2022-06-19"),
         
     | 
| 
      
 115 
     | 
    
         
            +
                month=6,
         
     | 
| 
      
 116 
     | 
    
         
            +
                day=19,
         
     | 
| 
      
 117 
     | 
    
         
            +
                observance=nearest_workday,
         
     | 
| 
      
 118 
     | 
    
         
            +
            )
         
     | 
| 
      
 119 
     | 
    
         
            +
             
     | 
| 
      
 120 
     | 
    
         
            +
            #######################################
         
     | 
| 
      
 121 
     | 
    
         
            +
            # US Independence Day July 4
         
     | 
| 
      
 122 
     | 
    
         
            +
            #######################################
         
     | 
| 
      
 123 
     | 
    
         
            +
            USIndependenceDayFrom2022 = Holiday(
         
     | 
| 
      
 124 
     | 
    
         
            +
                "July 4th",
         
     | 
| 
      
 125 
     | 
    
         
            +
                month=7,
         
     | 
| 
      
 126 
     | 
    
         
            +
                day=4,
         
     | 
| 
      
 127 
     | 
    
         
            +
                start_date=Timestamp("2022-01-01"),
         
     | 
| 
      
 128 
     | 
    
         
            +
                observance=nearest_workday,
         
     | 
| 
      
 129 
     | 
    
         
            +
            )
         
     | 
| 
      
 130 
     | 
    
         
            +
            USIndependenceDayPre2022 = Holiday(
         
     | 
| 
      
 131 
     | 
    
         
            +
                "July 4th",
         
     | 
| 
      
 132 
     | 
    
         
            +
                month=7,
         
     | 
| 
      
 133 
     | 
    
         
            +
                day=4,
         
     | 
| 
      
 134 
     | 
    
         
            +
                end_date=Timestamp("2021-12-31"),
         
     | 
| 
      
 135 
     | 
    
         
            +
                observance=nearest_workday,
         
     | 
| 
      
 136 
     | 
    
         
            +
            )
         
     | 
| 
      
 137 
     | 
    
         
            +
             
     | 
| 
      
 138 
     | 
    
         
            +
            #################################################
         
     | 
| 
      
 139 
     | 
    
         
            +
            # US Labor Day Starting 1887
         
     | 
| 
      
 140 
     | 
    
         
            +
            #################################################
         
     | 
| 
      
 141 
     | 
    
         
            +
            USLaborDayFrom2022 = Holiday(
         
     | 
| 
      
 142 
     | 
    
         
            +
                "Labor Day",
         
     | 
| 
      
 143 
     | 
    
         
            +
                month=9,
         
     | 
| 
      
 144 
     | 
    
         
            +
                day=1,
         
     | 
| 
      
 145 
     | 
    
         
            +
                start_date=Timestamp("2022-01-01"),
         
     | 
| 
      
 146 
     | 
    
         
            +
                offset=DateOffset(weekday=MO(1)),
         
     | 
| 
      
 147 
     | 
    
         
            +
            )
         
     | 
| 
      
 148 
     | 
    
         
            +
            USLaborDayPre2022 = Holiday(
         
     | 
| 
      
 149 
     | 
    
         
            +
                "Labor Day",
         
     | 
| 
      
 150 
     | 
    
         
            +
                month=9,
         
     | 
| 
      
 151 
     | 
    
         
            +
                day=1,
         
     | 
| 
      
 152 
     | 
    
         
            +
                end_date=Timestamp("2021-12-31"),
         
     | 
| 
      
 153 
     | 
    
         
            +
                offset=DateOffset(weekday=MO(1)),
         
     | 
| 
      
 154 
     | 
    
         
            +
            )
         
     | 
| 
      
 155 
     | 
    
         
            +
            USLaborDay = Holiday(
         
     | 
| 
      
 156 
     | 
    
         
            +
                "Labor Day",
         
     | 
| 
      
 157 
     | 
    
         
            +
                month=9,
         
     | 
| 
      
 158 
     | 
    
         
            +
                day=1,
         
     | 
| 
      
 159 
     | 
    
         
            +
                start_date=Timestamp("1887-01-01"),
         
     | 
| 
      
 160 
     | 
    
         
            +
                offset=DateOffset(weekday=MO(1)),
         
     | 
| 
      
 161 
     | 
    
         
            +
            )
         
     | 
| 
      
 162 
     | 
    
         
            +
             
     | 
| 
      
 163 
     | 
    
         
            +
            ################################################
         
     | 
| 
      
 164 
     | 
    
         
            +
            # US Thanksgiving Nov 30
         
     | 
| 
      
 165 
     | 
    
         
            +
            ################################################
         
     | 
| 
      
 166 
     | 
    
         
            +
            USThanksgivingDayFrom2022 = Holiday(
         
     | 
| 
      
 167 
     | 
    
         
            +
                "Thanksgiving",
         
     | 
| 
      
 168 
     | 
    
         
            +
                start_date=Timestamp("2022-01-01"),
         
     | 
| 
      
 169 
     | 
    
         
            +
                month=11,
         
     | 
| 
      
 170 
     | 
    
         
            +
                day=1,
         
     | 
| 
      
 171 
     | 
    
         
            +
                offset=DateOffset(weekday=TH(4)),
         
     | 
| 
      
 172 
     | 
    
         
            +
            )
         
     | 
| 
      
 173 
     | 
    
         
            +
             
     | 
| 
      
 174 
     | 
    
         
            +
            USThanksgivingDayPre2022 = Holiday(
         
     | 
| 
      
 175 
     | 
    
         
            +
                "Thanksgiving",
         
     | 
| 
      
 176 
     | 
    
         
            +
                end_date=Timestamp("2021-12-31"),
         
     | 
| 
      
 177 
     | 
    
         
            +
                month=11,
         
     | 
| 
      
 178 
     | 
    
         
            +
                day=1,
         
     | 
| 
      
 179 
     | 
    
         
            +
                offset=DateOffset(weekday=TH(4)),
         
     | 
| 
      
 180 
     | 
    
         
            +
            )
         
     | 
| 
      
 181 
     | 
    
         
            +
             
     | 
| 
      
 182 
     | 
    
         
            +
            FridayAfterThanksgiving = Holiday(
         
     | 
| 
      
 183 
     | 
    
         
            +
                "Friday after Thanksgiving",
         
     | 
| 
      
 184 
     | 
    
         
            +
                month=11,
         
     | 
| 
      
 185 
     | 
    
         
            +
                day=1,
         
     | 
| 
      
 186 
     | 
    
         
            +
                offset=[DateOffset(weekday=TH(4)), Day(1)],
         
     | 
| 
      
 187 
     | 
    
         
            +
            )
         
     | 
| 
      
 188 
     | 
    
         
            +
             
     | 
| 
      
 189 
     | 
    
         
            +
            USThanksgivingFridayFrom2021 = Holiday(
         
     | 
| 
      
 190 
     | 
    
         
            +
                "Thanksgiving Friday",
         
     | 
| 
      
 191 
     | 
    
         
            +
                month=11,
         
     | 
| 
      
 192 
     | 
    
         
            +
                day=1,
         
     | 
| 
      
 193 
     | 
    
         
            +
                offset=[DateOffset(weekday=TH(4)), Day(1)],
         
     | 
| 
      
 194 
     | 
    
         
            +
                start_date=Timestamp("2021-01-01"),
         
     | 
| 
      
 195 
     | 
    
         
            +
            )
         
     | 
| 
      
 196 
     | 
    
         
            +
             
     | 
| 
      
 197 
     | 
    
         
            +
            USThanksgivingFridayPre2021 = Holiday(
         
     | 
| 
      
 198 
     | 
    
         
            +
                "Thanksgiving Friday",
         
     | 
| 
      
 199 
     | 
    
         
            +
                month=11,
         
     | 
| 
      
 200 
     | 
    
         
            +
                day=1,
         
     | 
| 
      
 201 
     | 
    
         
            +
                offset=[DateOffset(weekday=TH(4)), Day(1)],
         
     | 
| 
      
 202 
     | 
    
         
            +
                end_date=Timestamp("2020-12-31"),
         
     | 
| 
      
 203 
     | 
    
         
            +
            )
         
     | 
| 
      
 204 
     | 
    
         
            +
             
     | 
| 
      
 205 
     | 
    
         
            +
            ################################
         
     | 
| 
      
 206 
     | 
    
         
            +
            # Christmas Dec 25
         
     | 
| 
      
 207 
     | 
    
         
            +
            ################################
         
     | 
| 
      
 208 
     | 
    
         
            +
            ChristmasCME = Holiday(
         
     | 
| 
      
 209 
     | 
    
         
            +
                "Christmas",
         
     | 
| 
      
 210 
     | 
    
         
            +
                month=12,
         
     | 
| 
      
 211 
     | 
    
         
            +
                day=25,
         
     | 
| 
      
 212 
     | 
    
         
            +
                start_date=Timestamp("1999-01-01"),
         
     | 
| 
      
 213 
     | 
    
         
            +
                observance=nearest_workday,
         
     | 
| 
      
 214 
     | 
    
         
            +
            )
         
     |