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,136 +1,144 @@
1
- from datetime import time
2
-
3
- from pandas.tseries.holiday import (
4
- AbstractHolidayCalendar,
5
- Day,
6
- Easter,
7
- EasterMonday,
8
- GoodFriday,
9
- Holiday,
10
- previous_friday,
11
- )
12
- from zoneinfo import ZoneInfo
13
-
14
- from pandas_market_calendars.market_calendar import (
15
- FRIDAY,
16
- MONDAY,
17
- MarketCalendar,
18
- THURSDAY,
19
- TUESDAY,
20
- WEDNESDAY,
21
- )
22
-
23
- # New Year's Eve
24
- NewYearsEve = Holiday(
25
- "New Year's Eve",
26
- month=12,
27
- day=31,
28
- observance=previous_friday,
29
- )
30
- # New Year's Day
31
- NewYearsDay = Holiday(
32
- "New Year's Day",
33
- month=1,
34
- day=1,
35
- days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY),
36
- )
37
- # Berthold's Day
38
- BertholdsDay = Holiday(
39
- "Berthold's Day",
40
- month=1,
41
- day=2,
42
- days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY),
43
- )
44
- # Early May bank holiday
45
- MayBank = Holiday(
46
- "Early May Bank Holiday",
47
- month=5,
48
- day=1,
49
- days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY),
50
- )
51
- # Ascension Day (Auffahrt)
52
- AscensionDay = Holiday(
53
- "Ascension Day",
54
- month=1,
55
- day=1,
56
- offset=[Easter(), Day(39)],
57
- days_of_week=(THURSDAY,),
58
- )
59
- # Pentecost Day (Pfingstmontag)
60
- PentecostMonday = Holiday(
61
- "Pentecost Monday",
62
- month=1,
63
- day=1,
64
- offset=[Easter(), Day(50)],
65
- days_of_week=(MONDAY,),
66
- )
67
- # Swiss National Day
68
- SwissNationalDay = Holiday(
69
- "Swiss National Day",
70
- month=8,
71
- day=1,
72
- days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY),
73
- )
74
- # Christmas Eve
75
- ChristmasEve = Holiday(
76
- "Christmas Eve",
77
- month=12,
78
- day=24,
79
- )
80
- # Christmas
81
- Christmas = Holiday(
82
- "Christmas",
83
- month=12,
84
- day=25,
85
- days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY),
86
- )
87
- # Boxing day
88
- BoxingDay = Holiday(
89
- "Boxing Day",
90
- month=12,
91
- day=26,
92
- )
93
-
94
-
95
- class SIXExchangeCalendar(MarketCalendar):
96
- """
97
- Exchange calendar for SIX
98
-
99
- """
100
-
101
- aliases = ["SIX"]
102
- regular_market_times = {
103
- "market_open": ((None, time(9)),),
104
- "market_close": ((None, time(17, 30)),),
105
- }
106
-
107
- @property
108
- def name(self):
109
- return "SIX"
110
-
111
- @property
112
- def full_name(self):
113
- return "SIX Swiss Exchange"
114
-
115
- @property
116
- def tz(self):
117
- return ZoneInfo("Europe/Zurich")
118
-
119
- @property
120
- def regular_holidays(self):
121
- return AbstractHolidayCalendar(
122
- rules=[
123
- NewYearsDay,
124
- BertholdsDay,
125
- GoodFriday,
126
- EasterMonday,
127
- MayBank,
128
- AscensionDay,
129
- PentecostMonday,
130
- SwissNationalDay,
131
- ChristmasEve,
132
- Christmas,
133
- BoxingDay,
134
- NewYearsEve,
135
- ]
136
- )
1
+ from datetime import time
2
+
3
+ from pandas.tseries.holiday import (
4
+ AbstractHolidayCalendar,
5
+ Day,
6
+ Easter,
7
+ EasterMonday,
8
+ GoodFriday,
9
+ Holiday,
10
+ previous_friday,
11
+ )
12
+ import sys
13
+
14
+ # check python versiOn aNd import accordingly
15
+ if sys.version_info >= (3, 9):
16
+ # For Python 3.9 and later, import directly
17
+ from zoneinfo import ZoneInfo
18
+ else:
19
+ # For Python 3.8 and earlier, import from backports
20
+ from backports.zoneinfo import ZoneInfo
21
+
22
+ from pandas_market_calendars.market_calendar import (
23
+ FRIDAY,
24
+ MONDAY,
25
+ MarketCalendar,
26
+ THURSDAY,
27
+ TUESDAY,
28
+ WEDNESDAY,
29
+ )
30
+
31
+ # New Year's Eve
32
+ NewYearsEve = Holiday(
33
+ "New Year's Eve",
34
+ month=12,
35
+ day=31,
36
+ observance=previous_friday,
37
+ )
38
+ # New Year's Day
39
+ NewYearsDay = Holiday(
40
+ "New Year's Day",
41
+ month=1,
42
+ day=1,
43
+ days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY),
44
+ )
45
+ # Berthold's Day
46
+ BertholdsDay = Holiday(
47
+ "Berthold's Day",
48
+ month=1,
49
+ day=2,
50
+ days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY),
51
+ )
52
+ # Early May bank holiday
53
+ MayBank = Holiday(
54
+ "Early May Bank Holiday",
55
+ month=5,
56
+ day=1,
57
+ days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY),
58
+ )
59
+ # Ascension Day (Auffahrt)
60
+ AscensionDay = Holiday(
61
+ "Ascension Day",
62
+ month=1,
63
+ day=1,
64
+ offset=[Easter(), Day(39)],
65
+ days_of_week=(THURSDAY,),
66
+ )
67
+ # Pentecost Day (Pfingstmontag)
68
+ PentecostMonday = Holiday(
69
+ "Pentecost Monday",
70
+ month=1,
71
+ day=1,
72
+ offset=[Easter(), Day(50)],
73
+ days_of_week=(MONDAY,),
74
+ )
75
+ # Swiss National Day
76
+ SwissNationalDay = Holiday(
77
+ "Swiss National Day",
78
+ month=8,
79
+ day=1,
80
+ days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY),
81
+ )
82
+ # Christmas Eve
83
+ ChristmasEve = Holiday(
84
+ "Christmas Eve",
85
+ month=12,
86
+ day=24,
87
+ )
88
+ # Christmas
89
+ Christmas = Holiday(
90
+ "Christmas",
91
+ month=12,
92
+ day=25,
93
+ days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY),
94
+ )
95
+ # Boxing day
96
+ BoxingDay = Holiday(
97
+ "Boxing Day",
98
+ month=12,
99
+ day=26,
100
+ )
101
+
102
+
103
+ class SIXExchangeCalendar(MarketCalendar):
104
+ """
105
+ Exchange calendar for SIX
106
+
107
+ """
108
+
109
+ aliases = ["SIX"]
110
+ regular_market_times = {
111
+ "market_open": ((None, time(9)),),
112
+ "market_close": ((None, time(17, 30)),),
113
+ }
114
+
115
+ @property
116
+ def name(self):
117
+ return "SIX"
118
+
119
+ @property
120
+ def full_name(self):
121
+ return "SIX Swiss Exchange"
122
+
123
+ @property
124
+ def tz(self):
125
+ return ZoneInfo("Europe/Zurich")
126
+
127
+ @property
128
+ def regular_holidays(self):
129
+ return AbstractHolidayCalendar(
130
+ rules=[
131
+ NewYearsDay,
132
+ BertholdsDay,
133
+ GoodFriday,
134
+ EasterMonday,
135
+ MayBank,
136
+ AscensionDay,
137
+ PentecostMonday,
138
+ SwissNationalDay,
139
+ ChristmasEve,
140
+ Christmas,
141
+ BoxingDay,
142
+ NewYearsEve,
143
+ ]
144
+ )