pandas-market-calendars 5.0.0__py3-none-any.whl → 5.1.1__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 +57 -57
- pandas_market_calendars/calendar_utils.py +1151 -1147
- pandas_market_calendars/calendars/asx.py +77 -70
- pandas_market_calendars/calendars/bmf.py +226 -219
- pandas_market_calendars/calendars/bse.py +432 -425
- pandas_market_calendars/calendars/cboe.py +156 -149
- pandas_market_calendars/calendars/cme.py +412 -405
- pandas_market_calendars/calendars/cme_globex_agriculture.py +172 -172
- pandas_market_calendars/calendars/cme_globex_base.py +126 -119
- pandas_market_calendars/calendars/cme_globex_crypto.py +165 -158
- pandas_market_calendars/calendars/cme_globex_energy_and_metals.py +223 -216
- pandas_market_calendars/calendars/cme_globex_equities.py +130 -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 +138 -131
- pandas_market_calendars/calendars/eurex_fixed_income.py +105 -98
- pandas_market_calendars/calendars/hkex.py +438 -431
- pandas_market_calendars/calendars/ice.py +88 -81
- pandas_market_calendars/calendars/iex.py +162 -155
- pandas_market_calendars/calendars/jpx.py +124 -117
- pandas_market_calendars/calendars/lse.py +125 -118
- pandas_market_calendars/calendars/mirror.py +144 -144
- pandas_market_calendars/calendars/nyse.py +1472 -1466
- pandas_market_calendars/calendars/ose.py +125 -118
- pandas_market_calendars/calendars/sifma.py +390 -356
- pandas_market_calendars/calendars/six.py +143 -136
- pandas_market_calendars/calendars/sse.py +322 -315
- pandas_market_calendars/calendars/tase.py +231 -224
- pandas_market_calendars/calendars/tsx.py +192 -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 +63 -63
- pandas_market_calendars/holidays/sifma.py +350 -350
- pandas_market_calendars/holidays/us.py +376 -376
- pandas_market_calendars/market_calendar.py +1008 -1008
- {pandas_market_calendars-5.0.0.dist-info → pandas_market_calendars-5.1.1.dist-info}/METADATA +3 -1
- pandas_market_calendars-5.1.1.dist-info/RECORD +50 -0
- {pandas_market_calendars-5.0.0.dist-info → pandas_market_calendars-5.1.1.dist-info}/WHEEL +1 -1
- pandas_market_calendars-5.0.0.dist-info/RECORD +0 -50
- {pandas_market_calendars-5.0.0.dist-info → pandas_market_calendars-5.1.1.dist-info}/licenses/LICENSE +0 -0
- {pandas_market_calendars-5.0.0.dist-info → pandas_market_calendars-5.1.1.dist-info}/licenses/NOTICE +0 -0
- {pandas_market_calendars-5.0.0.dist-info → pandas_market_calendars-5.1.1.dist-info}/top_level.txt +0 -0
@@ -1,136 +1,143 @@
|
|
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
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
# New Year's
|
31
|
-
|
32
|
-
"New Year's
|
33
|
-
month=
|
34
|
-
day=
|
35
|
-
|
36
|
-
)
|
37
|
-
#
|
38
|
-
|
39
|
-
"
|
40
|
-
month=1,
|
41
|
-
day=
|
42
|
-
days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY),
|
43
|
-
)
|
44
|
-
#
|
45
|
-
|
46
|
-
"
|
47
|
-
month=
|
48
|
-
day=
|
49
|
-
days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY),
|
50
|
-
)
|
51
|
-
#
|
52
|
-
|
53
|
-
"
|
54
|
-
month=
|
55
|
-
day=1,
|
56
|
-
|
57
|
-
|
58
|
-
)
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
)
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
days_of_week=(MONDAY,
|
73
|
-
)
|
74
|
-
#
|
75
|
-
|
76
|
-
"
|
77
|
-
month=
|
78
|
-
day=
|
79
|
-
)
|
80
|
-
|
81
|
-
Christmas
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
)
|
87
|
-
#
|
88
|
-
|
89
|
-
"
|
90
|
-
month=12,
|
91
|
-
day=
|
92
|
-
)
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
""
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
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
|
+
# check python versiOn aNd import accordingly
|
14
|
+
if sys.version_info >= (3, 9):
|
15
|
+
# For Python 3.9 and later, import directly
|
16
|
+
from zoneinfo import ZoneInfo
|
17
|
+
else:
|
18
|
+
# For Python 3.8 and earlier, import from backports
|
19
|
+
from backports.zoneinfo import ZoneInfo
|
20
|
+
|
21
|
+
from pandas_market_calendars.market_calendar import (
|
22
|
+
FRIDAY,
|
23
|
+
MONDAY,
|
24
|
+
MarketCalendar,
|
25
|
+
THURSDAY,
|
26
|
+
TUESDAY,
|
27
|
+
WEDNESDAY,
|
28
|
+
)
|
29
|
+
|
30
|
+
# New Year's Eve
|
31
|
+
NewYearsEve = Holiday(
|
32
|
+
"New Year's Eve",
|
33
|
+
month=12,
|
34
|
+
day=31,
|
35
|
+
observance=previous_friday,
|
36
|
+
)
|
37
|
+
# New Year's Day
|
38
|
+
NewYearsDay = Holiday(
|
39
|
+
"New Year's Day",
|
40
|
+
month=1,
|
41
|
+
day=1,
|
42
|
+
days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY),
|
43
|
+
)
|
44
|
+
# Berthold's Day
|
45
|
+
BertholdsDay = Holiday(
|
46
|
+
"Berthold's Day",
|
47
|
+
month=1,
|
48
|
+
day=2,
|
49
|
+
days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY),
|
50
|
+
)
|
51
|
+
# Early May bank holiday
|
52
|
+
MayBank = Holiday(
|
53
|
+
"Early May Bank Holiday",
|
54
|
+
month=5,
|
55
|
+
day=1,
|
56
|
+
days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY),
|
57
|
+
)
|
58
|
+
# Ascension Day (Auffahrt)
|
59
|
+
AscensionDay = Holiday(
|
60
|
+
"Ascension Day",
|
61
|
+
month=1,
|
62
|
+
day=1,
|
63
|
+
offset=[Easter(), Day(39)],
|
64
|
+
days_of_week=(THURSDAY,),
|
65
|
+
)
|
66
|
+
# Pentecost Day (Pfingstmontag)
|
67
|
+
PentecostMonday = Holiday(
|
68
|
+
"Pentecost Monday",
|
69
|
+
month=1,
|
70
|
+
day=1,
|
71
|
+
offset=[Easter(), Day(50)],
|
72
|
+
days_of_week=(MONDAY,),
|
73
|
+
)
|
74
|
+
# Swiss National Day
|
75
|
+
SwissNationalDay = Holiday(
|
76
|
+
"Swiss National Day",
|
77
|
+
month=8,
|
78
|
+
day=1,
|
79
|
+
days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY),
|
80
|
+
)
|
81
|
+
# Christmas Eve
|
82
|
+
ChristmasEve = Holiday(
|
83
|
+
"Christmas Eve",
|
84
|
+
month=12,
|
85
|
+
day=24,
|
86
|
+
)
|
87
|
+
# Christmas
|
88
|
+
Christmas = Holiday(
|
89
|
+
"Christmas",
|
90
|
+
month=12,
|
91
|
+
day=25,
|
92
|
+
days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY),
|
93
|
+
)
|
94
|
+
# Boxing day
|
95
|
+
BoxingDay = Holiday(
|
96
|
+
"Boxing Day",
|
97
|
+
month=12,
|
98
|
+
day=26,
|
99
|
+
)
|
100
|
+
|
101
|
+
|
102
|
+
class SIXExchangeCalendar(MarketCalendar):
|
103
|
+
"""
|
104
|
+
Exchange calendar for SIX
|
105
|
+
|
106
|
+
"""
|
107
|
+
|
108
|
+
aliases = ["SIX"]
|
109
|
+
regular_market_times = {
|
110
|
+
"market_open": ((None, time(9)),),
|
111
|
+
"market_close": ((None, time(17, 30)),),
|
112
|
+
}
|
113
|
+
|
114
|
+
@property
|
115
|
+
def name(self):
|
116
|
+
return "SIX"
|
117
|
+
|
118
|
+
@property
|
119
|
+
def full_name(self):
|
120
|
+
return "SIX Swiss Exchange"
|
121
|
+
|
122
|
+
@property
|
123
|
+
def tz(self):
|
124
|
+
return ZoneInfo("Europe/Zurich")
|
125
|
+
|
126
|
+
@property
|
127
|
+
def regular_holidays(self):
|
128
|
+
return AbstractHolidayCalendar(
|
129
|
+
rules=[
|
130
|
+
NewYearsDay,
|
131
|
+
BertholdsDay,
|
132
|
+
GoodFriday,
|
133
|
+
EasterMonday,
|
134
|
+
MayBank,
|
135
|
+
AscensionDay,
|
136
|
+
PentecostMonday,
|
137
|
+
SwissNationalDay,
|
138
|
+
ChristmasEve,
|
139
|
+
Christmas,
|
140
|
+
BoxingDay,
|
141
|
+
NewYearsEve,
|
142
|
+
]
|
143
|
+
)
|