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,118 +1,124 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            from datetime import time
         
     | 
| 
       2 
     | 
    
         
            -
             
     | 
| 
       3 
     | 
    
         
            -
            from pandas.tseries.holiday import (
         
     | 
| 
       4 
     | 
    
         
            -
                AbstractHolidayCalendar,
         
     | 
| 
       5 
     | 
    
         
            -
                EasterMonday,
         
     | 
| 
       6 
     | 
    
         
            -
                GoodFriday,
         
     | 
| 
       7 
     | 
    
         
            -
                Holiday,
         
     | 
| 
       8 
     | 
    
         
            -
            )
         
     | 
| 
       9 
     | 
    
         
            -
            from pandas.tseries.offsets import Day, Easter
         
     | 
| 
       10 
     | 
    
         
            -
             
     | 
| 
       11 
     | 
    
         
            -
             
     | 
| 
       12 
     | 
    
         
            -
             
     | 
| 
       13 
     | 
    
         
            -
             
     | 
| 
       14 
     | 
    
         
            -
             
     | 
| 
       15 
     | 
    
         
            -
             
     | 
| 
       16 
     | 
    
         
            -
             
     | 
| 
       17 
     | 
    
         
            -
                 
     | 
| 
       18 
     | 
    
         
            -
             
     | 
| 
       19 
     | 
    
         
            -
             
     | 
| 
       20 
     | 
    
         
            -
             
     | 
| 
       21 
     | 
    
         
            -
             
     | 
| 
       22 
     | 
    
         
            -
             
     | 
| 
       23 
     | 
    
         
            -
             
     | 
| 
       24 
     | 
    
         
            -
             
     | 
| 
       25 
     | 
    
         
            -
             
     | 
| 
       26 
     | 
    
         
            -
             
     | 
| 
       27 
     | 
    
         
            -
             
     | 
| 
       28 
     | 
    
         
            -
             
     | 
| 
       29 
     | 
    
         
            -
             
     | 
| 
       30 
     | 
    
         
            -
             
     | 
| 
       31 
     | 
    
         
            -
             
     | 
| 
       32 
     | 
    
         
            -
             
     | 
| 
       33 
     | 
    
         
            -
             
     | 
| 
       34 
     | 
    
         
            -
             
     | 
| 
       35 
     | 
    
         
            -
             
     | 
| 
       36 
     | 
    
         
            -
             
     | 
| 
       37 
     | 
    
         
            -
             
     | 
| 
       38 
     | 
    
         
            -
            )
         
     | 
| 
       39 
     | 
    
         
            -
             
     | 
| 
       40 
     | 
    
         
            -
             
     | 
| 
       41 
     | 
    
         
            -
             
     | 
| 
       42 
     | 
    
         
            -
             
     | 
| 
       43 
     | 
    
         
            -
             
     | 
| 
       44 
     | 
    
         
            -
             
     | 
| 
       45 
     | 
    
         
            -
             
     | 
| 
       46 
     | 
    
         
            -
             
     | 
| 
       47 
     | 
    
         
            -
             
     | 
| 
       48 
     | 
    
         
            -
             
     | 
| 
       49 
     | 
    
         
            -
             
     | 
| 
       50 
     | 
    
         
            -
             
     | 
| 
       51 
     | 
    
         
            -
             
     | 
| 
       52 
     | 
    
         
            -
             
     | 
| 
       53 
     | 
    
         
            -
             
     | 
| 
       54 
     | 
    
         
            -
                 
     | 
| 
       55 
     | 
    
         
            -
                 
     | 
| 
       56 
     | 
    
         
            -
             
     | 
| 
       57 
     | 
    
         
            -
             
     | 
| 
       58 
     | 
    
         
            -
                 
     | 
| 
       59 
     | 
    
         
            -
             
     | 
| 
       60 
     | 
    
         
            -
                 
     | 
| 
       61 
     | 
    
         
            -
                 
     | 
| 
       62 
     | 
    
         
            -
                 
     | 
| 
       63 
     | 
    
         
            -
             
     | 
| 
       64 
     | 
    
         
            -
                -  
     | 
| 
       65 
     | 
    
         
            -
                -  
     | 
| 
       66 
     | 
    
         
            -
                -  
     | 
| 
       67 
     | 
    
         
            -
                -  
     | 
| 
       68 
     | 
    
         
            -
                -  
     | 
| 
       69 
     | 
    
         
            -
                -  
     | 
| 
       70 
     | 
    
         
            -
                -  
     | 
| 
       71 
     | 
    
         
            -
                -  
     | 
| 
       72 
     | 
    
         
            -
                 
     | 
| 
       73 
     | 
    
         
            -
             
     | 
| 
       74 
     | 
    
         
            -
                 
     | 
| 
       75 
     | 
    
         
            -
                 
     | 
| 
       76 
     | 
    
         
            -
             
     | 
| 
       77 
     | 
    
         
            -
             
     | 
| 
       78 
     | 
    
         
            -
                 
     | 
| 
       79 
     | 
    
         
            -
             
     | 
| 
       80 
     | 
    
         
            -
                 
     | 
| 
       81 
     | 
    
         
            -
                 
     | 
| 
       82 
     | 
    
         
            -
                     
     | 
| 
       83 
     | 
    
         
            -
             
     | 
| 
       84 
     | 
    
         
            -
                 
     | 
| 
       85 
     | 
    
         
            -
             
     | 
| 
       86 
     | 
    
         
            -
             
     | 
| 
       87 
     | 
    
         
            -
             
     | 
| 
       88 
     | 
    
         
            -
             
     | 
| 
       89 
     | 
    
         
            -
             
     | 
| 
       90 
     | 
    
         
            -
             
     | 
| 
       91 
     | 
    
         
            -
             
     | 
| 
       92 
     | 
    
         
            -
             
     | 
| 
       93 
     | 
    
         
            -
             
     | 
| 
       94 
     | 
    
         
            -
             
     | 
| 
       95 
     | 
    
         
            -
             
     | 
| 
       96 
     | 
    
         
            -
             
     | 
| 
       97 
     | 
    
         
            -
             
     | 
| 
       98 
     | 
    
         
            -
             
     | 
| 
       99 
     | 
    
         
            -
             
     | 
| 
       100 
     | 
    
         
            -
             
     | 
| 
       101 
     | 
    
         
            -
             
     | 
| 
       102 
     | 
    
         
            -
                             
     | 
| 
       103 
     | 
    
         
            -
                             
     | 
| 
       104 
     | 
    
         
            -
                             
     | 
| 
       105 
     | 
    
         
            -
                             
     | 
| 
       106 
     | 
    
         
            -
                             
     | 
| 
       107 
     | 
    
         
            -
                             
     | 
| 
       108 
     | 
    
         
            -
             
     | 
| 
       109 
     | 
    
         
            -
             
     | 
| 
       110 
     | 
    
         
            -
             
     | 
| 
       111 
     | 
    
         
            -
             
     | 
| 
       112 
     | 
    
         
            -
             
     | 
| 
       113 
     | 
    
         
            -
             
     | 
| 
       114 
     | 
    
         
            -
                         
     | 
| 
       115 
     | 
    
         
            -
             
     | 
| 
       116 
     | 
    
         
            -
             
     | 
| 
       117 
     | 
    
         
            -
             
     | 
| 
       118 
     | 
    
         
            -
             
     | 
| 
      
 1 
     | 
    
         
            +
            from datetime import time
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            from pandas.tseries.holiday import (
         
     | 
| 
      
 4 
     | 
    
         
            +
                AbstractHolidayCalendar,
         
     | 
| 
      
 5 
     | 
    
         
            +
                EasterMonday,
         
     | 
| 
      
 6 
     | 
    
         
            +
                GoodFriday,
         
     | 
| 
      
 7 
     | 
    
         
            +
                Holiday,
         
     | 
| 
      
 8 
     | 
    
         
            +
            )
         
     | 
| 
      
 9 
     | 
    
         
            +
            from pandas.tseries.offsets import Day, Easter
         
     | 
| 
      
 10 
     | 
    
         
            +
            import sys
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
            # check python versiOn aNd import accordingly
         
     | 
| 
      
 13 
     | 
    
         
            +
            if sys.version_info >= (3, 9):
         
     | 
| 
      
 14 
     | 
    
         
            +
                # For Python 3.9 and later, import directly
         
     | 
| 
      
 15 
     | 
    
         
            +
                from zoneinfo import ZoneInfo
         
     | 
| 
      
 16 
     | 
    
         
            +
            else:
         
     | 
| 
      
 17 
     | 
    
         
            +
                # For Python 3.8 and earlier, import from backports
         
     | 
| 
      
 18 
     | 
    
         
            +
                from backports.zoneinfo import ZoneInfo
         
     | 
| 
      
 19 
     | 
    
         
            +
             
     | 
| 
      
 20 
     | 
    
         
            +
            from pandas_market_calendars.market_calendar import MarketCalendar
         
     | 
| 
      
 21 
     | 
    
         
            +
             
     | 
| 
      
 22 
     | 
    
         
            +
            OSENewYearsDay = Holiday("New Year's Day", month=1, day=1)
         
     | 
| 
      
 23 
     | 
    
         
            +
             
     | 
| 
      
 24 
     | 
    
         
            +
            OSEWednesdayBeforeEaster = Holiday("Wednesday before Easter", month=1, day=1, offset=[Easter(), Day(-4)])
         
     | 
| 
      
 25 
     | 
    
         
            +
             
     | 
| 
      
 26 
     | 
    
         
            +
            OSEMaundyThursday = Holiday("Maundy Thursday", month=1, day=1, offset=[Easter(), Day(-3)])
         
     | 
| 
      
 27 
     | 
    
         
            +
             
     | 
| 
      
 28 
     | 
    
         
            +
            OSEGoodFriday = GoodFriday
         
     | 
| 
      
 29 
     | 
    
         
            +
             
     | 
| 
      
 30 
     | 
    
         
            +
            OSEEasterMonday = EasterMonday
         
     | 
| 
      
 31 
     | 
    
         
            +
             
     | 
| 
      
 32 
     | 
    
         
            +
            OSELabourDay = Holiday("Labour Day", month=5, day=1)
         
     | 
| 
      
 33 
     | 
    
         
            +
             
     | 
| 
      
 34 
     | 
    
         
            +
            OSEConstitutionDay = Holiday("Constitution Day", month=5, day=17)
         
     | 
| 
      
 35 
     | 
    
         
            +
             
     | 
| 
      
 36 
     | 
    
         
            +
            OSEWhitMonday = Holiday("Whit Monday", month=1, day=1, offset=[Easter(), Day(50)])
         
     | 
| 
      
 37 
     | 
    
         
            +
             
     | 
| 
      
 38 
     | 
    
         
            +
            OSEAscensionDay = Holiday("Ascension Day", month=1, day=1, offset=[Easter(), Day(39)])
         
     | 
| 
      
 39 
     | 
    
         
            +
             
     | 
| 
      
 40 
     | 
    
         
            +
            OSEChristmasEve = Holiday(
         
     | 
| 
      
 41 
     | 
    
         
            +
                "Christmas Eve",
         
     | 
| 
      
 42 
     | 
    
         
            +
                month=12,
         
     | 
| 
      
 43 
     | 
    
         
            +
                day=24,
         
     | 
| 
      
 44 
     | 
    
         
            +
            )
         
     | 
| 
      
 45 
     | 
    
         
            +
             
     | 
| 
      
 46 
     | 
    
         
            +
            OSEChristmasDay = Holiday("Christmas Day", month=12, day=25)
         
     | 
| 
      
 47 
     | 
    
         
            +
             
     | 
| 
      
 48 
     | 
    
         
            +
            OSEBoxingDay = Holiday("Boxing Day", month=12, day=26)
         
     | 
| 
      
 49 
     | 
    
         
            +
             
     | 
| 
      
 50 
     | 
    
         
            +
            OSENewYearsEve = Holiday("New Year's Eve", month=12, day=31)
         
     | 
| 
      
 51 
     | 
    
         
            +
             
     | 
| 
      
 52 
     | 
    
         
            +
             
     | 
| 
      
 53 
     | 
    
         
            +
            class OSEExchangeCalendar(MarketCalendar):
         
     | 
| 
      
 54 
     | 
    
         
            +
                """
         
     | 
| 
      
 55 
     | 
    
         
            +
                Exchange calendar for Oslo Stock Exchange
         
     | 
| 
      
 56 
     | 
    
         
            +
             
     | 
| 
      
 57 
     | 
    
         
            +
                Note these dates are only checked against 2017, 2018 and 2019
         
     | 
| 
      
 58 
     | 
    
         
            +
                https://www.oslobors.no/ob_eng/Oslo-Boers/About-Oslo-Boers/Opening-hours
         
     | 
| 
      
 59 
     | 
    
         
            +
             
     | 
| 
      
 60 
     | 
    
         
            +
                Opening times for the regular trading of equities (not including closing auction call)
         
     | 
| 
      
 61 
     | 
    
         
            +
                Open Time: 9:00 AM, CEST/EST
         
     | 
| 
      
 62 
     | 
    
         
            +
                Close Time: 4:20 PM, CEST/EST
         
     | 
| 
      
 63 
     | 
    
         
            +
             
     | 
| 
      
 64 
     | 
    
         
            +
                Regularly-Observed Holidays (not necessarily in order):
         
     | 
| 
      
 65 
     | 
    
         
            +
                - New Years Day
         
     | 
| 
      
 66 
     | 
    
         
            +
                - Wednesday before Easter (Half trading day)
         
     | 
| 
      
 67 
     | 
    
         
            +
                - Maundy Thursday
         
     | 
| 
      
 68 
     | 
    
         
            +
                - Good Friday
         
     | 
| 
      
 69 
     | 
    
         
            +
                - Easter Monday
         
     | 
| 
      
 70 
     | 
    
         
            +
                - Labour Day
         
     | 
| 
      
 71 
     | 
    
         
            +
                - Ascension Day
         
     | 
| 
      
 72 
     | 
    
         
            +
                - Constitution Day
         
     | 
| 
      
 73 
     | 
    
         
            +
                - Whit Monday
         
     | 
| 
      
 74 
     | 
    
         
            +
                - Christmas Eve
         
     | 
| 
      
 75 
     | 
    
         
            +
                - Christmas Day
         
     | 
| 
      
 76 
     | 
    
         
            +
                - Boxing Day
         
     | 
| 
      
 77 
     | 
    
         
            +
                - New Year's Eve
         
     | 
| 
      
 78 
     | 
    
         
            +
                """
         
     | 
| 
      
 79 
     | 
    
         
            +
             
     | 
| 
      
 80 
     | 
    
         
            +
                aliases = ["OSE"]
         
     | 
| 
      
 81 
     | 
    
         
            +
                regular_market_times = {
         
     | 
| 
      
 82 
     | 
    
         
            +
                    "market_open": ((None, time(9)),),
         
     | 
| 
      
 83 
     | 
    
         
            +
                    "market_close": ((None, time(16, 20)),),
         
     | 
| 
      
 84 
     | 
    
         
            +
                }
         
     | 
| 
      
 85 
     | 
    
         
            +
             
     | 
| 
      
 86 
     | 
    
         
            +
                @property
         
     | 
| 
      
 87 
     | 
    
         
            +
                def name(self):
         
     | 
| 
      
 88 
     | 
    
         
            +
                    return "OSE"
         
     | 
| 
      
 89 
     | 
    
         
            +
             
     | 
| 
      
 90 
     | 
    
         
            +
                @property
         
     | 
| 
      
 91 
     | 
    
         
            +
                def full_name(self):
         
     | 
| 
      
 92 
     | 
    
         
            +
                    return "Oslo Stock Exchange"
         
     | 
| 
      
 93 
     | 
    
         
            +
             
     | 
| 
      
 94 
     | 
    
         
            +
                @property
         
     | 
| 
      
 95 
     | 
    
         
            +
                def tz(self):
         
     | 
| 
      
 96 
     | 
    
         
            +
                    return ZoneInfo("Europe/Oslo")
         
     | 
| 
      
 97 
     | 
    
         
            +
             
     | 
| 
      
 98 
     | 
    
         
            +
                @property
         
     | 
| 
      
 99 
     | 
    
         
            +
                def regular_holidays(self):
         
     | 
| 
      
 100 
     | 
    
         
            +
                    return AbstractHolidayCalendar(
         
     | 
| 
      
 101 
     | 
    
         
            +
                        rules=[
         
     | 
| 
      
 102 
     | 
    
         
            +
                            OSENewYearsDay,
         
     | 
| 
      
 103 
     | 
    
         
            +
                            OSEMaundyThursday,
         
     | 
| 
      
 104 
     | 
    
         
            +
                            OSEGoodFriday,
         
     | 
| 
      
 105 
     | 
    
         
            +
                            OSEEasterMonday,
         
     | 
| 
      
 106 
     | 
    
         
            +
                            OSELabourDay,
         
     | 
| 
      
 107 
     | 
    
         
            +
                            OSEConstitutionDay,
         
     | 
| 
      
 108 
     | 
    
         
            +
                            OSEWhitMonday,
         
     | 
| 
      
 109 
     | 
    
         
            +
                            OSEAscensionDay,
         
     | 
| 
      
 110 
     | 
    
         
            +
                            OSEChristmasEve,
         
     | 
| 
      
 111 
     | 
    
         
            +
                            OSEChristmasDay,
         
     | 
| 
      
 112 
     | 
    
         
            +
                            OSEBoxingDay,
         
     | 
| 
      
 113 
     | 
    
         
            +
                            OSENewYearsEve,
         
     | 
| 
      
 114 
     | 
    
         
            +
                        ]
         
     | 
| 
      
 115 
     | 
    
         
            +
                    )
         
     | 
| 
      
 116 
     | 
    
         
            +
             
     | 
| 
      
 117 
     | 
    
         
            +
                @property
         
     | 
| 
      
 118 
     | 
    
         
            +
                def special_closes(self):
         
     | 
| 
      
 119 
     | 
    
         
            +
                    return [
         
     | 
| 
      
 120 
     | 
    
         
            +
                        (
         
     | 
| 
      
 121 
     | 
    
         
            +
                            time(13, 0, tzinfo=self.tz),
         
     | 
| 
      
 122 
     | 
    
         
            +
                            AbstractHolidayCalendar(rules=[OSEWednesdayBeforeEaster]),
         
     | 
| 
      
 123 
     | 
    
         
            +
                        )
         
     | 
| 
      
 124 
     | 
    
         
            +
                    ]
         
     |