pandas-market-calendars 4.3.1__py3-none-any.whl → 4.3.3__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- pandas_market_calendars/__init__.py +38 -37
- pandas_market_calendars/calendar_registry.py +53 -48
- pandas_market_calendars/calendar_utils.py +261 -225
- pandas_market_calendars/calendars/asx.py +66 -63
- pandas_market_calendars/calendars/bmf.py +206 -227
- pandas_market_calendars/calendars/bse.py +407 -409
- pandas_market_calendars/calendars/cboe.py +145 -115
- pandas_market_calendars/calendars/cme.py +402 -240
- pandas_market_calendars/calendars/cme_globex_agriculture.py +126 -103
- pandas_market_calendars/calendars/cme_globex_base.py +119 -103
- pandas_market_calendars/calendars/cme_globex_crypto.py +160 -147
- pandas_market_calendars/calendars/cme_globex_energy_and_metals.py +216 -138
- pandas_market_calendars/calendars/cme_globex_equities.py +123 -104
- pandas_market_calendars/calendars/cme_globex_fixed_income.py +136 -113
- pandas_market_calendars/calendars/cme_globex_fx.py +101 -78
- pandas_market_calendars/calendars/eurex.py +139 -119
- pandas_market_calendars/calendars/eurex_fixed_income.py +98 -0
- pandas_market_calendars/calendars/hkex.py +426 -408
- pandas_market_calendars/calendars/ice.py +81 -65
- pandas_market_calendars/calendars/iex.py +112 -98
- pandas_market_calendars/calendars/jpx.py +109 -103
- pandas_market_calendars/calendars/lse.py +114 -91
- pandas_market_calendars/calendars/mirror.py +130 -114
- pandas_market_calendars/calendars/nyse.py +1324 -1127
- pandas_market_calendars/calendars/ose.py +116 -150
- pandas_market_calendars/calendars/sifma.py +350 -297
- pandas_market_calendars/calendars/six.py +132 -114
- pandas_market_calendars/calendars/sse.py +311 -290
- pandas_market_calendars/calendars/tase.py +197 -195
- pandas_market_calendars/calendars/tsx.py +181 -159
- pandas_market_calendars/class_registry.py +22 -16
- pandas_market_calendars/holidays/cme.py +385 -340
- pandas_market_calendars/holidays/cme_globex.py +214 -198
- pandas_market_calendars/holidays/cn.py +1455 -1436
- pandas_market_calendars/holidays/jp.py +398 -396
- pandas_market_calendars/holidays/jpx_equinox.py +453 -95
- pandas_market_calendars/holidays/nyse.py +1531 -1472
- pandas_market_calendars/holidays/oz.py +63 -65
- pandas_market_calendars/holidays/sifma.py +338 -321
- pandas_market_calendars/holidays/uk.py +32 -26
- pandas_market_calendars/holidays/us.py +376 -360
- pandas_market_calendars/market_calendar.py +895 -789
- {pandas_market_calendars-4.3.1.dist-info → pandas_market_calendars-4.3.3.dist-info}/METADATA +7 -5
- pandas_market_calendars-4.3.3.dist-info/RECORD +50 -0
- {pandas_market_calendars-4.3.1.dist-info → pandas_market_calendars-4.3.3.dist-info}/WHEEL +1 -1
- pandas_market_calendars-4.3.1.dist-info/RECORD +0 -49
- {pandas_market_calendars-4.3.1.dist-info → pandas_market_calendars-4.3.3.dist-info}/LICENSE +0 -0
- {pandas_market_calendars-4.3.1.dist-info → pandas_market_calendars-4.3.3.dist-info}/NOTICE +0 -0
- {pandas_market_calendars-4.3.1.dist-info → pandas_market_calendars-4.3.3.dist-info}/top_level.txt +0 -0
@@ -1,360 +1,376 @@
|
|
1
|
-
from dateutil.relativedelta import
|
2
|
-
from pandas import
|
3
|
-
from pandas.tseries.holiday import
|
4
|
-
from pandas.tseries.offsets import Day
|
5
|
-
|
6
|
-
from pandas_market_calendars.market_calendar import (
|
7
|
-
|
8
|
-
|
9
|
-
|
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
|
-
start_date=Timestamp(
|
107
|
-
|
108
|
-
|
109
|
-
)
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
month=5,
|
115
|
-
day=
|
116
|
-
|
117
|
-
|
118
|
-
)
|
119
|
-
# http://www.tradingtheodds.com/nyse-full-day-closings/
|
120
|
-
|
121
|
-
|
122
|
-
month=
|
123
|
-
day=
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
)
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
observance=
|
151
|
-
)
|
152
|
-
# http://www.tradingtheodds.com/nyse-full-day-closings/
|
153
|
-
|
154
|
-
|
155
|
-
month=11,
|
156
|
-
day=
|
157
|
-
start_date=Timestamp(
|
158
|
-
end_date=Timestamp(
|
159
|
-
|
160
|
-
)
|
161
|
-
# http://www.tradingtheodds.com/nyse-full-day-closings/
|
162
|
-
|
163
|
-
|
164
|
-
month=
|
165
|
-
day=
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
)
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
#
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
)
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
)
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
)
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
Timestamp("
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
# http://www.tradingtheodds.com/nyse-full-day-closings/
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
Timestamp("
|
310
|
-
Timestamp("
|
311
|
-
Timestamp("
|
312
|
-
Timestamp("
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
)
|
321
|
-
|
322
|
-
# http://
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
#
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
#
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
)
|
1
|
+
from dateutil.relativedelta import MO, TH, TU
|
2
|
+
from pandas import DateOffset, Timestamp, date_range
|
3
|
+
from pandas.tseries.holiday import Holiday, nearest_workday, sunday_to_monday
|
4
|
+
from pandas.tseries.offsets import Day
|
5
|
+
|
6
|
+
from pandas_market_calendars.market_calendar import (
|
7
|
+
FRIDAY,
|
8
|
+
MONDAY,
|
9
|
+
THURSDAY,
|
10
|
+
TUESDAY,
|
11
|
+
WEDNESDAY,
|
12
|
+
)
|
13
|
+
|
14
|
+
|
15
|
+
# These have the same definition, but are used in different places because the
|
16
|
+
# NYSE closed at 2:00 PM on Christmas Eve until 1993.
|
17
|
+
|
18
|
+
|
19
|
+
def following_tuesday_every_four_years_observance(dt):
|
20
|
+
return dt + DateOffset(years=(4 - (dt.year % 4)) % 4, weekday=TU(1))
|
21
|
+
|
22
|
+
|
23
|
+
ChristmasEveBefore1993 = Holiday(
|
24
|
+
"Christmas Eve",
|
25
|
+
month=12,
|
26
|
+
day=24,
|
27
|
+
end_date=Timestamp("1993-01-01"),
|
28
|
+
# When Christmas is a Saturday, the 24th is a full holiday.
|
29
|
+
days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY),
|
30
|
+
)
|
31
|
+
ChristmasEveInOrAfter1993 = Holiday(
|
32
|
+
"Christmas Eve",
|
33
|
+
month=12,
|
34
|
+
day=24,
|
35
|
+
start_date=Timestamp("1993-01-01"),
|
36
|
+
# When Christmas is a Saturday, the 24th is a full holiday.
|
37
|
+
days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY),
|
38
|
+
)
|
39
|
+
USNewYearsDay = Holiday(
|
40
|
+
"New Years Day",
|
41
|
+
month=1,
|
42
|
+
day=1,
|
43
|
+
# When Jan 1 is a Sunday, US markets observe the subsequent Monday.
|
44
|
+
# When Jan 1 is a Saturday (as in 2005 and 2011), no holiday is observed.
|
45
|
+
observance=sunday_to_monday,
|
46
|
+
)
|
47
|
+
USMartinLutherKingJrAfter1998 = Holiday(
|
48
|
+
"Dr. Martin Luther King Jr. Day",
|
49
|
+
month=1,
|
50
|
+
day=1,
|
51
|
+
# The US markets didn't observe MLK day as a holiday until 1998.
|
52
|
+
start_date=Timestamp("1998-01-01"),
|
53
|
+
offset=DateOffset(weekday=MO(3)),
|
54
|
+
)
|
55
|
+
USLincolnsBirthDayBefore1954 = Holiday(
|
56
|
+
"Lincoln" "s Birthday",
|
57
|
+
month=2,
|
58
|
+
day=12,
|
59
|
+
start_date=Timestamp("1874-01-01"),
|
60
|
+
end_date=Timestamp("1953-12-31"),
|
61
|
+
observance=sunday_to_monday,
|
62
|
+
)
|
63
|
+
USWashingtonsBirthDayBefore1964 = Holiday(
|
64
|
+
"Washington" "s Birthday",
|
65
|
+
month=2,
|
66
|
+
day=22,
|
67
|
+
start_date=Timestamp("1880-01-01"),
|
68
|
+
end_date=Timestamp("1963-12-31"),
|
69
|
+
observance=sunday_to_monday,
|
70
|
+
)
|
71
|
+
USWashingtonsBirthDay1964to1970 = Holiday(
|
72
|
+
"Washington" "s Birthday",
|
73
|
+
month=2,
|
74
|
+
day=22,
|
75
|
+
start_date=Timestamp("1964-01-01"),
|
76
|
+
end_date=Timestamp("1970-12-31"),
|
77
|
+
observance=nearest_workday,
|
78
|
+
)
|
79
|
+
USPresidentsDay = Holiday(
|
80
|
+
"President" "s Day",
|
81
|
+
start_date=Timestamp("1971-01-01"),
|
82
|
+
month=2,
|
83
|
+
day=1,
|
84
|
+
offset=DateOffset(weekday=MO(3)),
|
85
|
+
)
|
86
|
+
# http://www.tradingtheodds.com/nyse-full-day-closings/
|
87
|
+
USThanksgivingDayBefore1939 = Holiday(
|
88
|
+
"Thanksgiving Before 1939",
|
89
|
+
start_date=Timestamp("1864-01-01"),
|
90
|
+
end_date=Timestamp("1938-12-31"),
|
91
|
+
month=11,
|
92
|
+
day=30,
|
93
|
+
offset=DateOffset(weekday=TH(-1)),
|
94
|
+
)
|
95
|
+
# http://www.tradingtheodds.com/nyse-full-day-closings/
|
96
|
+
USThanksgivingDay1939to1941 = Holiday(
|
97
|
+
"Thanksgiving 1939 to 1941",
|
98
|
+
start_date=Timestamp("1939-01-01"),
|
99
|
+
end_date=Timestamp("1941-12-31"),
|
100
|
+
month=11,
|
101
|
+
day=30,
|
102
|
+
offset=DateOffset(weekday=TH(-2)),
|
103
|
+
)
|
104
|
+
USThanksgivingDay = Holiday(
|
105
|
+
"Thanksgiving",
|
106
|
+
start_date=Timestamp("1942-01-01"),
|
107
|
+
month=11,
|
108
|
+
day=1,
|
109
|
+
offset=DateOffset(weekday=TH(4)),
|
110
|
+
)
|
111
|
+
# http://www.tradingtheodds.com/nyse-full-day-closings/
|
112
|
+
USMemorialDayBefore1964 = Holiday(
|
113
|
+
"Memorial Day",
|
114
|
+
month=5,
|
115
|
+
day=30,
|
116
|
+
end_date=Timestamp("1963-12-31"),
|
117
|
+
observance=sunday_to_monday,
|
118
|
+
)
|
119
|
+
# http://www.tradingtheodds.com/nyse-full-day-closings/
|
120
|
+
USMemorialDay1964to1969 = Holiday(
|
121
|
+
"Memorial Day",
|
122
|
+
month=5,
|
123
|
+
day=30,
|
124
|
+
start_date=Timestamp("1964-01-01"),
|
125
|
+
end_date=Timestamp("1969-12-31"),
|
126
|
+
observance=nearest_workday,
|
127
|
+
)
|
128
|
+
USMemorialDay = Holiday(
|
129
|
+
# NOTE: The definition for Memorial Day is incorrect as of pandas 0.16.0.
|
130
|
+
# See https://github.com/pydata/pandas/issues/9760.
|
131
|
+
"Memorial Day",
|
132
|
+
month=5,
|
133
|
+
day=25,
|
134
|
+
start_date=Timestamp("1971-01-01"),
|
135
|
+
offset=DateOffset(weekday=MO(1)),
|
136
|
+
)
|
137
|
+
# http://www.tradingtheodds.com/nyse-full-day-closings/
|
138
|
+
USIndependenceDayBefore1954 = Holiday(
|
139
|
+
"July 4th",
|
140
|
+
month=7,
|
141
|
+
day=4,
|
142
|
+
end_date=Timestamp("1953-12-31"),
|
143
|
+
observance=sunday_to_monday,
|
144
|
+
)
|
145
|
+
USIndependenceDay = Holiday(
|
146
|
+
"July 4th",
|
147
|
+
month=7,
|
148
|
+
day=4,
|
149
|
+
start_date=Timestamp("1954-01-01"),
|
150
|
+
observance=nearest_workday,
|
151
|
+
)
|
152
|
+
# http://www.tradingtheodds.com/nyse-full-day-closings/
|
153
|
+
USElectionDay1848to1967 = Holiday(
|
154
|
+
"Election Day",
|
155
|
+
month=11,
|
156
|
+
day=2,
|
157
|
+
start_date=Timestamp("1848-1-1"),
|
158
|
+
end_date=Timestamp("1967-12-31"),
|
159
|
+
offset=DateOffset(weekday=TU(1)),
|
160
|
+
)
|
161
|
+
# http://www.tradingtheodds.com/nyse-full-day-closings/
|
162
|
+
USElectionDay1968to1980 = Holiday(
|
163
|
+
"Election Day",
|
164
|
+
month=11,
|
165
|
+
day=2,
|
166
|
+
start_date=Timestamp("1968-01-01"),
|
167
|
+
end_date=Timestamp("1980-12-31"),
|
168
|
+
observance=following_tuesday_every_four_years_observance,
|
169
|
+
)
|
170
|
+
# http://www.tradingtheodds.com/nyse-full-day-closings/
|
171
|
+
USVeteransDay1934to1953 = Holiday(
|
172
|
+
"Veteran Day",
|
173
|
+
month=11,
|
174
|
+
day=11,
|
175
|
+
start_date=Timestamp("1934-1-1"),
|
176
|
+
end_date=Timestamp("1953-12-31"),
|
177
|
+
observance=sunday_to_monday,
|
178
|
+
)
|
179
|
+
# http://www.tradingtheodds.com/nyse-full-day-closings/
|
180
|
+
USColumbusDayBefore1954 = Holiday(
|
181
|
+
"Columbus Day",
|
182
|
+
month=10,
|
183
|
+
day=12,
|
184
|
+
end_date=Timestamp("1953-12-31"),
|
185
|
+
observance=sunday_to_monday,
|
186
|
+
)
|
187
|
+
ChristmasBefore1954 = Holiday(
|
188
|
+
"Christmas",
|
189
|
+
month=12,
|
190
|
+
day=25,
|
191
|
+
end_date=Timestamp("1953-12-31"),
|
192
|
+
observance=sunday_to_monday,
|
193
|
+
)
|
194
|
+
Christmas = Holiday(
|
195
|
+
"Christmas",
|
196
|
+
month=12,
|
197
|
+
day=25,
|
198
|
+
start_date=Timestamp("1954-01-01"),
|
199
|
+
observance=nearest_workday,
|
200
|
+
)
|
201
|
+
|
202
|
+
MonTuesThursBeforeIndependenceDay = Holiday(
|
203
|
+
# When July 4th is a Tuesday, Wednesday, or Friday, the previous day is a
|
204
|
+
# half day.
|
205
|
+
"Mondays, Tuesdays, and Thursdays Before Independence Day",
|
206
|
+
month=7,
|
207
|
+
day=3,
|
208
|
+
days_of_week=(MONDAY, TUESDAY, THURSDAY),
|
209
|
+
start_date=Timestamp("1995-01-01"),
|
210
|
+
)
|
211
|
+
FridayAfterIndependenceDayPre2013 = Holiday(
|
212
|
+
# When July 4th is a Thursday, the next day is a half day prior to 2013.
|
213
|
+
# Since 2013 the early close is on Wednesday and Friday is a full day
|
214
|
+
"Fridays after Independence Day prior to 2013",
|
215
|
+
month=7,
|
216
|
+
day=5,
|
217
|
+
days_of_week=(FRIDAY,),
|
218
|
+
start_date=Timestamp("1995-01-01"),
|
219
|
+
end_date=Timestamp("2012-12-31"),
|
220
|
+
)
|
221
|
+
WednesdayBeforeIndependenceDayPost2013 = Holiday(
|
222
|
+
# When July 4th is a Thursday, the next day is a half day prior to 2013.
|
223
|
+
# Since 2013 the early close is on Wednesday and Friday is a full day
|
224
|
+
"Wednesdays Before Independence Day including and after 2013",
|
225
|
+
month=7,
|
226
|
+
day=3,
|
227
|
+
days_of_week=(WEDNESDAY,),
|
228
|
+
start_date=Timestamp("2013-01-01"),
|
229
|
+
)
|
230
|
+
USBlackFridayBefore1993 = Holiday(
|
231
|
+
"Black Friday",
|
232
|
+
month=11,
|
233
|
+
day=1,
|
234
|
+
# Black Friday was not observed until 1992.
|
235
|
+
start_date=Timestamp("1992-01-01"),
|
236
|
+
end_date=Timestamp("1993-01-01"),
|
237
|
+
offset=[DateOffset(weekday=TH(4)), Day(1)],
|
238
|
+
)
|
239
|
+
USBlackFridayInOrAfter1993 = Holiday(
|
240
|
+
"Black Friday",
|
241
|
+
month=11,
|
242
|
+
day=1,
|
243
|
+
start_date=Timestamp("1993-01-01"),
|
244
|
+
offset=[DateOffset(weekday=TH(4)), Day(1)],
|
245
|
+
)
|
246
|
+
BattleOfGettysburg = Holiday(
|
247
|
+
# All of the floor traders in Chicago were sent to PA
|
248
|
+
"Markets were closed during the battle of Gettysburg",
|
249
|
+
month=7,
|
250
|
+
day=(1, 2, 3),
|
251
|
+
start_date=Timestamp("1863-07-01"),
|
252
|
+
end_date=Timestamp("1863-07-03"),
|
253
|
+
)
|
254
|
+
|
255
|
+
# http://www.tradingtheodds.com/nyse-full-day-closings/
|
256
|
+
November29BacklogRelief = [
|
257
|
+
Timestamp("1929-11-01", tz="UTC"),
|
258
|
+
Timestamp("1929-11-29", tz="UTC"),
|
259
|
+
]
|
260
|
+
|
261
|
+
# https://en.wikipedia.org/wiki/March_1933#March_6,_1933_(Monday)
|
262
|
+
March33BankHoliday = [
|
263
|
+
Timestamp("1933-03-06", tz="UTC"),
|
264
|
+
Timestamp("1933-03-07", tz="UTC"),
|
265
|
+
Timestamp("1933-03-08", tz="UTC"),
|
266
|
+
Timestamp("1933-03-09", tz="UTC"),
|
267
|
+
Timestamp("1933-03-10", tz="UTC"),
|
268
|
+
Timestamp("1933-03-13", tz="UTC"),
|
269
|
+
Timestamp("1933-03-14", tz="UTC"),
|
270
|
+
]
|
271
|
+
|
272
|
+
# http://www.tradingtheodds.com/nyse-full-day-closings/
|
273
|
+
August45VictoryOverJapan = date_range("1945-08-15", "1945-08-16", tz="UTC")
|
274
|
+
|
275
|
+
# http://www.tradingtheodds.com/nyse-full-day-closings/
|
276
|
+
ChristmasEvesAdhoc = [
|
277
|
+
Timestamp("1945-12-24", tz="UTC"),
|
278
|
+
Timestamp("1956-12-24", tz="UTC"),
|
279
|
+
]
|
280
|
+
|
281
|
+
# http://www.tradingtheodds.com/nyse-full-day-closings/
|
282
|
+
DayAfterChristmasAdhoc = [Timestamp("1958-12-26", tz="UTC")]
|
283
|
+
|
284
|
+
# http://www.tradingtheodds.com/nyse-full-day-closings/
|
285
|
+
DayBeforeDecorationAdhoc = [Timestamp("1961-05-29", tz="UTC")]
|
286
|
+
|
287
|
+
# http://www.tradingtheodds.com/nyse-full-day-closings/
|
288
|
+
LincolnsBirthDayAdhoc = [Timestamp("1968-02-12", tz="UTC")]
|
289
|
+
|
290
|
+
# http://www.tradingtheodds.com/nyse-full-day-closings/
|
291
|
+
PaperworkCrisis68 = [
|
292
|
+
Timestamp("1968-06-12", tz="UTC"),
|
293
|
+
Timestamp("1968-06-19", tz="UTC"),
|
294
|
+
Timestamp("1968-06-26", tz="UTC"),
|
295
|
+
Timestamp("1968-07-10", tz="UTC"),
|
296
|
+
Timestamp("1968-07-17", tz="UTC"),
|
297
|
+
Timestamp("1968-07-24", tz="UTC"),
|
298
|
+
Timestamp("1968-07-31", tz="UTC"),
|
299
|
+
Timestamp("1968-08-07", tz="UTC"),
|
300
|
+
Timestamp("1968-08-14", tz="UTC"),
|
301
|
+
Timestamp("1968-08-21", tz="UTC"),
|
302
|
+
Timestamp("1968-08-28", tz="UTC"),
|
303
|
+
Timestamp("1968-09-11", tz="UTC"),
|
304
|
+
Timestamp("1968-09-18", tz="UTC"),
|
305
|
+
Timestamp("1968-09-25", tz="UTC"),
|
306
|
+
Timestamp("1968-10-02", tz="UTC"),
|
307
|
+
Timestamp("1968-10-09", tz="UTC"),
|
308
|
+
Timestamp("1968-10-16", tz="UTC"),
|
309
|
+
Timestamp("1968-10-23", tz="UTC"),
|
310
|
+
Timestamp("1968-10-30", tz="UTC"),
|
311
|
+
Timestamp("1968-11-11", tz="UTC"),
|
312
|
+
Timestamp("1968-11-20", tz="UTC"),
|
313
|
+
Timestamp("1968-12-04", tz="UTC"),
|
314
|
+
Timestamp("1968-12-11", tz="UTC"),
|
315
|
+
Timestamp("1968-12-18", tz="UTC"),
|
316
|
+
Timestamp("1968-12-25", tz="UTC"),
|
317
|
+
]
|
318
|
+
|
319
|
+
# http://www.tradingtheodds.com/nyse-full-day-closings/
|
320
|
+
DayAfterIndependenceDayAdhoc = [Timestamp("1968-07-05", tz="UTC")]
|
321
|
+
|
322
|
+
# http://www.tradingtheodds.com/nyse-full-day-closings/
|
323
|
+
WeatherSnowClosing = [Timestamp("1969-02-10", tz="UTC")]
|
324
|
+
|
325
|
+
# http://www.tradingtheodds.com/nyse-full-day-closings/
|
326
|
+
FirstLunarLandingClosing = [Timestamp("1969-07-21", tz="UTC")]
|
327
|
+
|
328
|
+
# http://www.tradingtheodds.com/nyse-full-day-closings/
|
329
|
+
NewYorkCityBlackout77 = [Timestamp("1977-07-14", tz="UTC")]
|
330
|
+
|
331
|
+
# http://en.wikipedia.org/wiki/Aftermath_of_the_September_11_attacks
|
332
|
+
September11Closings = [
|
333
|
+
Timestamp("2001-09-11", tz="UTC"),
|
334
|
+
Timestamp("2001-09-12", tz="UTC"),
|
335
|
+
Timestamp("2001-09-13", tz="UTC"),
|
336
|
+
Timestamp("2001-09-14", tz="UTC"),
|
337
|
+
]
|
338
|
+
|
339
|
+
# http://en.wikipedia.org/wiki/Hurricane_Gloria
|
340
|
+
HurricaneGloriaClosings = date_range("1985-09-27", "1985-09-27", tz="UTC")
|
341
|
+
|
342
|
+
# http://en.wikipedia.org/wiki/Hurricane_sandy
|
343
|
+
HurricaneSandyClosings = date_range("2012-10-29", "2012-10-30", tz="UTC")
|
344
|
+
|
345
|
+
# National Days of Mourning
|
346
|
+
# - President John F. Kennedy - November 25, 1963
|
347
|
+
# - Martin Luther King - April 9, 1968
|
348
|
+
# - President Dwight D. Eisenhower - March 31, 1969
|
349
|
+
# - President Harry S. Truman - December 28, 1972
|
350
|
+
# - President Lyndon B. Johnson - January 25, 1973
|
351
|
+
# - President Richard Nixon - April 27, 1994
|
352
|
+
# - President Ronald W. Reagan - June 11, 2004
|
353
|
+
# - President Gerald R. Ford - Jan 2, 2007
|
354
|
+
# - President George H.W. Bush - Dec 5, 2018
|
355
|
+
USNationalDaysofMourning = [
|
356
|
+
Timestamp("1963-11-25", tz="UTC"),
|
357
|
+
Timestamp("1968-04-09", tz="UTC"),
|
358
|
+
Timestamp("1969-03-31", tz="UTC"),
|
359
|
+
Timestamp("1972-12-28", tz="UTC"),
|
360
|
+
Timestamp("1973-01-25", tz="UTC"),
|
361
|
+
Timestamp("1994-04-27", tz="UTC"),
|
362
|
+
Timestamp("2004-06-11", tz="UTC"),
|
363
|
+
Timestamp("2007-01-02", tz="UTC"),
|
364
|
+
Timestamp("2018-12-05", tz="UTC"),
|
365
|
+
]
|
366
|
+
|
367
|
+
#######################################
|
368
|
+
# US Juneteenth (June 19th)
|
369
|
+
#######################################
|
370
|
+
USJuneteenthAfter2022 = Holiday(
|
371
|
+
"Juneteenth Starting at 2022",
|
372
|
+
start_date=Timestamp("2022-06-19"),
|
373
|
+
month=6,
|
374
|
+
day=19,
|
375
|
+
observance=nearest_workday,
|
376
|
+
)
|