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.
Files changed (49) hide show
  1. pandas_market_calendars/__init__.py +39 -39
  2. pandas_market_calendars/calendar_registry.py +58 -57
  3. pandas_market_calendars/calendar_utils.py +1151 -1151
  4. pandas_market_calendars/calendars/asx.py +100 -70
  5. pandas_market_calendars/calendars/bmf.py +225 -219
  6. pandas_market_calendars/calendars/bse.py +433 -425
  7. pandas_market_calendars/calendars/cboe.py +153 -149
  8. pandas_market_calendars/calendars/cme.py +417 -405
  9. pandas_market_calendars/calendars/cme_globex_agriculture.py +172 -172
  10. pandas_market_calendars/calendars/cme_globex_base.py +127 -119
  11. pandas_market_calendars/calendars/cme_globex_crypto.py +166 -158
  12. pandas_market_calendars/calendars/cme_globex_energy_and_metals.py +224 -216
  13. pandas_market_calendars/calendars/cme_globex_equities.py +131 -123
  14. pandas_market_calendars/calendars/cme_globex_fixed_income.py +136 -136
  15. pandas_market_calendars/calendars/cme_globex_fx.py +101 -101
  16. pandas_market_calendars/calendars/eurex.py +139 -131
  17. pandas_market_calendars/calendars/eurex_fixed_income.py +106 -98
  18. pandas_market_calendars/calendars/hkex.py +437 -431
  19. pandas_market_calendars/calendars/ice.py +89 -81
  20. pandas_market_calendars/calendars/iex.py +163 -155
  21. pandas_market_calendars/calendars/jpx.py +125 -117
  22. pandas_market_calendars/calendars/lse.py +126 -118
  23. pandas_market_calendars/calendars/mirror.py +144 -144
  24. pandas_market_calendars/calendars/nyse.py +1462 -1466
  25. pandas_market_calendars/calendars/ose.py +124 -118
  26. pandas_market_calendars/calendars/sifma.py +391 -383
  27. pandas_market_calendars/calendars/six.py +144 -136
  28. pandas_market_calendars/calendars/sse.py +305 -315
  29. pandas_market_calendars/calendars/tase.py +232 -224
  30. pandas_market_calendars/calendars/tsx.py +193 -185
  31. pandas_market_calendars/class_registry.py +115 -115
  32. pandas_market_calendars/holidays/cme.py +385 -385
  33. pandas_market_calendars/holidays/cme_globex.py +214 -214
  34. pandas_market_calendars/holidays/cn.py +1476 -1476
  35. pandas_market_calendars/holidays/jp.py +401 -401
  36. pandas_market_calendars/holidays/jpx_equinox.py +506 -506
  37. pandas_market_calendars/holidays/nyse.py +1536 -1536
  38. pandas_market_calendars/holidays/oz.py +82 -63
  39. pandas_market_calendars/holidays/sifma.py +350 -350
  40. pandas_market_calendars/holidays/uk.py +186 -186
  41. pandas_market_calendars/holidays/us.py +376 -376
  42. pandas_market_calendars/market_calendar.py +1006 -1008
  43. {pandas_market_calendars-5.1.0.dist-info → pandas_market_calendars-5.1.3.dist-info}/METADATA +5 -4
  44. pandas_market_calendars-5.1.3.dist-info/RECORD +50 -0
  45. {pandas_market_calendars-5.1.0.dist-info → pandas_market_calendars-5.1.3.dist-info}/WHEEL +1 -1
  46. pandas_market_calendars-5.1.0.dist-info/RECORD +0 -50
  47. {pandas_market_calendars-5.1.0.dist-info → pandas_market_calendars-5.1.3.dist-info}/licenses/LICENSE +0 -0
  48. {pandas_market_calendars-5.1.0.dist-info → pandas_market_calendars-5.1.3.dist-info}/licenses/NOTICE +0 -0
  49. {pandas_market_calendars-5.1.0.dist-info → pandas_market_calendars-5.1.3.dist-info}/top_level.txt +0 -0
@@ -1,98 +1,106 @@
1
- from datetime import time
2
-
3
- from pandas.tseries.holiday import (
4
- AbstractHolidayCalendar,
5
- EasterMonday,
6
- GoodFriday,
7
- Holiday,
8
- )
9
- from zoneinfo import ZoneInfo
10
-
11
- from pandas_market_calendars.market_calendar import (
12
- FRIDAY,
13
- MONDAY,
14
- MarketCalendar,
15
- THURSDAY,
16
- TUESDAY,
17
- WEDNESDAY,
18
- )
19
-
20
- # New Year's Day
21
- EUREXNewYearsDay = Holiday(
22
- "New Year's Day",
23
- month=1,
24
- day=1,
25
- days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY),
26
- )
27
- # Early May bank holiday
28
- MayBank = Holiday(
29
- "Early May Bank Holiday",
30
- month=5,
31
- day=1,
32
- days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY),
33
- )
34
- # Christmas Eve
35
- ChristmasEve = Holiday(
36
- "Christmas Eve",
37
- month=12,
38
- day=24,
39
- days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY),
40
- )
41
- # Christmas
42
- Christmas = Holiday(
43
- "Christmas",
44
- month=12,
45
- day=25,
46
- days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY),
47
- )
48
- # Boxing day
49
- BoxingDay = Holiday(
50
- "Boxing Day",
51
- month=12,
52
- day=26,
53
- days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY),
54
- )
55
- # New Year's Eve
56
- NewYearsEve = Holiday(
57
- "New Year's Eve",
58
- month=12,
59
- day=31,
60
- days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY),
61
- )
62
-
63
-
64
- class EUREXFixedIncomeCalendar(MarketCalendar):
65
- """
66
- Trading calendar available here:
67
- https://www.eurex.com/resource/blob/3378814/910cf372738890f691bc1bfbccfd3aef/data/tradingcalendar_2023_en.pdf
68
- """
69
-
70
- aliases = ["EUREX_Bond"]
71
-
72
- regular_market_times = {
73
- "market_open": ((None, time(1, 10)), ("2018-12-10", time(8, 0))),
74
- "market_close": ((None, time(22)),),
75
- }
76
-
77
- @property
78
- def name(self):
79
- return "EUREX_Bond"
80
-
81
- @property
82
- def tz(self):
83
- return ZoneInfo("Europe/Berlin")
84
-
85
- @property
86
- def regular_holidays(self):
87
- return AbstractHolidayCalendar(
88
- rules=[
89
- EUREXNewYearsDay,
90
- GoodFriday,
91
- EasterMonday,
92
- MayBank,
93
- ChristmasEve,
94
- Christmas,
95
- BoxingDay,
96
- NewYearsEve,
97
- ]
98
- )
1
+ from datetime import time
2
+
3
+ from pandas.tseries.holiday import (
4
+ AbstractHolidayCalendar,
5
+ EasterMonday,
6
+ GoodFriday,
7
+ Holiday,
8
+ )
9
+ import sys
10
+
11
+ # check python versiOn aNd import accordingly
12
+ if sys.version_info >= (3, 9):
13
+ # For Python 3.9 and later, import directly
14
+ from zoneinfo import ZoneInfo
15
+ else:
16
+ # For Python 3.8 and earlier, import from backports
17
+ from backports.zoneinfo import ZoneInfo
18
+
19
+ from pandas_market_calendars.market_calendar import (
20
+ FRIDAY,
21
+ MONDAY,
22
+ MarketCalendar,
23
+ THURSDAY,
24
+ TUESDAY,
25
+ WEDNESDAY,
26
+ )
27
+
28
+ # New Year's Day
29
+ EUREXNewYearsDay = Holiday(
30
+ "New Year's Day",
31
+ month=1,
32
+ day=1,
33
+ days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY),
34
+ )
35
+ # Early May bank holiday
36
+ MayBank = Holiday(
37
+ "Early May Bank Holiday",
38
+ month=5,
39
+ day=1,
40
+ days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY),
41
+ )
42
+ # Christmas Eve
43
+ ChristmasEve = Holiday(
44
+ "Christmas Eve",
45
+ month=12,
46
+ day=24,
47
+ days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY),
48
+ )
49
+ # Christmas
50
+ Christmas = Holiday(
51
+ "Christmas",
52
+ month=12,
53
+ day=25,
54
+ days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY),
55
+ )
56
+ # Boxing day
57
+ BoxingDay = Holiday(
58
+ "Boxing Day",
59
+ month=12,
60
+ day=26,
61
+ days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY),
62
+ )
63
+ # New Year's Eve
64
+ NewYearsEve = Holiday(
65
+ "New Year's Eve",
66
+ month=12,
67
+ day=31,
68
+ days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY),
69
+ )
70
+
71
+
72
+ class EUREXFixedIncomeCalendar(MarketCalendar):
73
+ """
74
+ Trading calendar available here:
75
+ https://www.eurex.com/resource/blob/3378814/910cf372738890f691bc1bfbccfd3aef/data/tradingcalendar_2023_en.pdf
76
+ """
77
+
78
+ aliases = ["EUREX_Bond"]
79
+
80
+ regular_market_times = {
81
+ "market_open": ((None, time(1, 10)), ("2018-12-10", time(8, 0))),
82
+ "market_close": ((None, time(22)),),
83
+ }
84
+
85
+ @property
86
+ def name(self):
87
+ return "EUREX_Bond"
88
+
89
+ @property
90
+ def tz(self):
91
+ return ZoneInfo("Europe/Berlin")
92
+
93
+ @property
94
+ def regular_holidays(self):
95
+ return AbstractHolidayCalendar(
96
+ rules=[
97
+ EUREXNewYearsDay,
98
+ GoodFriday,
99
+ EasterMonday,
100
+ MayBank,
101
+ ChristmasEve,
102
+ Christmas,
103
+ BoxingDay,
104
+ NewYearsEve,
105
+ ]
106
+ )