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.
Files changed (49) hide show
  1. pandas_market_calendars/__init__.py +38 -37
  2. pandas_market_calendars/calendar_registry.py +53 -48
  3. pandas_market_calendars/calendar_utils.py +261 -225
  4. pandas_market_calendars/calendars/asx.py +66 -63
  5. pandas_market_calendars/calendars/bmf.py +206 -227
  6. pandas_market_calendars/calendars/bse.py +407 -409
  7. pandas_market_calendars/calendars/cboe.py +145 -115
  8. pandas_market_calendars/calendars/cme.py +402 -240
  9. pandas_market_calendars/calendars/cme_globex_agriculture.py +126 -103
  10. pandas_market_calendars/calendars/cme_globex_base.py +119 -103
  11. pandas_market_calendars/calendars/cme_globex_crypto.py +160 -147
  12. pandas_market_calendars/calendars/cme_globex_energy_and_metals.py +216 -138
  13. pandas_market_calendars/calendars/cme_globex_equities.py +123 -104
  14. pandas_market_calendars/calendars/cme_globex_fixed_income.py +136 -113
  15. pandas_market_calendars/calendars/cme_globex_fx.py +101 -78
  16. pandas_market_calendars/calendars/eurex.py +139 -119
  17. pandas_market_calendars/calendars/eurex_fixed_income.py +98 -0
  18. pandas_market_calendars/calendars/hkex.py +426 -408
  19. pandas_market_calendars/calendars/ice.py +81 -65
  20. pandas_market_calendars/calendars/iex.py +112 -98
  21. pandas_market_calendars/calendars/jpx.py +109 -103
  22. pandas_market_calendars/calendars/lse.py +114 -91
  23. pandas_market_calendars/calendars/mirror.py +130 -114
  24. pandas_market_calendars/calendars/nyse.py +1324 -1127
  25. pandas_market_calendars/calendars/ose.py +116 -150
  26. pandas_market_calendars/calendars/sifma.py +350 -297
  27. pandas_market_calendars/calendars/six.py +132 -114
  28. pandas_market_calendars/calendars/sse.py +311 -290
  29. pandas_market_calendars/calendars/tase.py +197 -195
  30. pandas_market_calendars/calendars/tsx.py +181 -159
  31. pandas_market_calendars/class_registry.py +22 -16
  32. pandas_market_calendars/holidays/cme.py +385 -340
  33. pandas_market_calendars/holidays/cme_globex.py +214 -198
  34. pandas_market_calendars/holidays/cn.py +1455 -1436
  35. pandas_market_calendars/holidays/jp.py +398 -396
  36. pandas_market_calendars/holidays/jpx_equinox.py +453 -95
  37. pandas_market_calendars/holidays/nyse.py +1531 -1472
  38. pandas_market_calendars/holidays/oz.py +63 -65
  39. pandas_market_calendars/holidays/sifma.py +338 -321
  40. pandas_market_calendars/holidays/uk.py +32 -26
  41. pandas_market_calendars/holidays/us.py +376 -360
  42. pandas_market_calendars/market_calendar.py +895 -789
  43. {pandas_market_calendars-4.3.1.dist-info → pandas_market_calendars-4.3.3.dist-info}/METADATA +7 -5
  44. pandas_market_calendars-4.3.3.dist-info/RECORD +50 -0
  45. {pandas_market_calendars-4.3.1.dist-info → pandas_market_calendars-4.3.3.dist-info}/WHEEL +1 -1
  46. pandas_market_calendars-4.3.1.dist-info/RECORD +0 -49
  47. {pandas_market_calendars-4.3.1.dist-info → pandas_market_calendars-4.3.3.dist-info}/LICENSE +0 -0
  48. {pandas_market_calendars-4.3.1.dist-info → pandas_market_calendars-4.3.3.dist-info}/NOTICE +0 -0
  49. {pandas_market_calendars-4.3.1.dist-info → pandas_market_calendars-4.3.3.dist-info}/top_level.txt +0 -0
@@ -1,1472 +1,1531 @@
1
- import pandas as pd
2
- from dateutil.relativedelta import (MO, TH, TU)
3
- from pandas import (DateOffset, Timestamp, date_range)
4
- from datetime import timedelta
5
- from pandas.tseries.holiday import (Holiday, nearest_workday, sunday_to_monday, Easter)
6
- from pandas.tseries.offsets import Day, CustomBusinessDay
7
-
8
- from pandas_market_calendars.market_calendar import ( MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY)
9
-
10
- ################################################################################################
11
- # main reference:
12
- # https://github.com/rsheftel/pandas_market_calendars/files/6827110/Stocks.NYSE-Closings.pdf
13
- #
14
- # See nyse.py for details
15
- #################################################################################################
16
-
17
- def previous_saturday(dt):
18
- """
19
- If holiday falls on Sunday, Monday or Tuesday, Saturday there is no trading
20
- """
21
- if dt.weekday() == MONDAY:
22
- return dt - timedelta(2)
23
- elif dt.weekday() == TUESDAY:
24
- return dt - timedelta(3)
25
- elif dt.weekday() == SUNDAY:
26
- return dt - timedelta(1)
27
- return dt
28
-
29
- def next_saturday(dt):
30
- """
31
- If holiday falls on Thursday or Friday, the next Saturday there is no trading
32
- """
33
- if dt.weekday() == THURSDAY:
34
- return dt + timedelta(2)
35
- elif dt.weekday() == FRIDAY:
36
- return dt + timedelta(1)
37
- return dt
38
-
39
- ####################################################
40
- # US New Years Day Jan 1
41
- # Closed every year since the stock market opened
42
- #####################################################
43
- USNewYearsDayNYSEpost1952 = Holiday(
44
- 'New Years Day',
45
- month=1,
46
- day=1,
47
- start_date = Timestamp('1952-09-29'),
48
- # When Jan 1 is a Sunday, US markets observe the subsequent Monday.
49
- # When Jan 1 is a Saturday (as in 2005 and 2011), no holiday is observed.
50
- observance=sunday_to_monday,
51
- days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY,)
52
- )
53
-
54
- USNewYearsDayNYSEpre1952 = Holiday(
55
- 'New Years Day Before Saturday Trading Ceased',
56
- month=1,
57
- day=1,
58
- end_date = Timestamp('1952-09-28'),
59
- observance=sunday_to_monday,
60
- days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY,)
61
- )
62
-
63
- NewYearsEve1pmCloseAdhoc = [
64
- #Timestamp('1999-12-31', tz='UTC'), # Disputed. Not in reference source
65
- ]
66
-
67
- # Not every Saturday before/after Christmas is a holiday
68
- SatBeforeNewYearsAdhoc = [
69
- Timestamp('1916-12-30', tz='UTC')
70
- ]
71
-
72
- USMartinLutherKingJrAfter1998 = Holiday(
73
- 'Dr. Martin Luther King Jr. Day',
74
- month=1,
75
- day=1,
76
- # The US markets didn't observe MLK day as a holiday until 1998.
77
- start_date=Timestamp('1998-01-01'),
78
- days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY,),
79
- offset=DateOffset(weekday=MO(3)),
80
- )
81
- #########################################################################
82
- # US Presidents Day Feb
83
- # Lincoln's birthday closed every year 1896-1953
84
- # Washington's birthday closed every year. Observed Mondays since 1971
85
- # Grant's birthday was celebrated once in 1897
86
- ##########################################################################
87
- USPresidentsDay = Holiday('President''s Day',
88
- start_date=Timestamp('1971-01-01'),
89
- month=2, day=1,
90
- days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY,),
91
- offset=DateOffset(weekday=MO(3)))
92
-
93
- USWashingtonsBirthDayBefore1952 = Holiday(
94
- 'Washington''s Birthday',
95
- month=2,
96
- day=22,
97
- end_date=Timestamp('1952-09-28'),
98
- days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY,),
99
- observance=sunday_to_monday,
100
- )
101
- USWashingtonsBirthDay1952to1963 = Holiday(
102
- 'Washington''s Birthday',
103
- month=2,
104
- day=22,
105
- start_date=Timestamp('1952-09-29'),
106
- end_date=Timestamp('1963-12-31'),
107
- days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY,),
108
- observance=sunday_to_monday,
109
- )
110
-
111
- USWashingtonsBirthDay1964to1970 = Holiday(
112
- 'Washington''s Birthday',
113
- month=2,
114
- day=22,
115
- start_date=Timestamp('1964-01-01'),
116
- end_date=Timestamp('1970-12-31'),
117
- observance=nearest_workday,
118
- )
119
- # Not all Saturdays before Washingtons birthday were holidays (e.g. 1920)
120
- SatBeforeWashingtonsBirthdayAdhoc = [
121
- Timestamp('1903-02-21', tz='UTC'),
122
- ]
123
- # Not all Saturdays after Washington's brithday were holidays (e.g. 1918)
124
- SatAfterWashingtonsBirthdayAdhoc = [
125
- Timestamp('1901-02-23', tz='UTC'),
126
- Timestamp('1907-02-23', tz='UTC'),
127
- Timestamp('1929-02-23', tz='UTC'),
128
- Timestamp('1946-02-23', tz='UTC')
129
- ]
130
-
131
- USLincolnsBirthDayBefore1954 = Holiday(
132
- 'Lincoln''s Birthday',
133
- month=2,
134
- day=12,
135
- start_date=Timestamp('1896-01-01'),
136
- end_date=Timestamp('1953-12-31'),
137
- observance=sunday_to_monday,
138
- )
139
- # Not all Saturdays before/after Lincoln's birthday were holidays
140
- SatBeforeAfterLincolnsBirthdayAdhoc = [
141
- Timestamp('1899-02-11', tz='UTC'),
142
- Timestamp('1909-02-13', tz='UTC')
143
- ]
144
-
145
- # 1968-02-12. Offices were open but trading floor was closed
146
- LincolnsBirthDayAdhoc = [Timestamp('1968-02-12', tz='UTC')]
147
-
148
- GrantsBirthDayAdhoc = [Timestamp('1897-04-27', tz='UTC')]
149
-
150
- ############################################################
151
- # Good Friday
152
- # closed every year except 1898, 1906, and 1907
153
- ############################################################
154
- GoodFriday = Holiday(
155
- "Good Friday 1908+",
156
- start_date=Timestamp('1908-01-01'),
157
- month=1,
158
- day=1,
159
- offset=[Easter(), Day(-2)]
160
- )
161
- GoodFridayPre1898 = Holiday(
162
- "Good Friday Before 1898",
163
- start_date=Timestamp('1885-01-01'),
164
- end_date=Timestamp('1897-12-31'),
165
- month=1,
166
- day=1,
167
- offset=[Easter(), Day(-2)]
168
- )
169
- GoodFriday1899to1905 = Holiday(
170
- "Good Friday 1899 to 1905",
171
- start_date=Timestamp('1899-01-01'),
172
- end_date=Timestamp('1905-12-31'),
173
- month=1,
174
- day=1,
175
- offset=[Easter(), Day(-2)]
176
- )
177
- #Not every saturday after Good Friday is a holiday (e.g. 1904)
178
- SatAfterGoodFridayAdhoc = [
179
- Timestamp("1900-04-14", tz='UTC'),
180
- Timestamp("1901-04-06", tz='UTC'),
181
- Timestamp("1902-03-29", tz='UTC'),
182
- Timestamp("1903-04-11", tz='UTC'),
183
- Timestamp("1905-04-22", tz='UTC'),
184
- Timestamp("1907-03-30", tz='UTC'),
185
- Timestamp("1908-04-18", tz='UTC'),
186
- Timestamp("1909-04-10", tz='UTC'),
187
- Timestamp("1910-03-26", tz='UTC'),
188
- Timestamp("1911-04-15", tz='UTC'),
189
- Timestamp("1913-03-22", tz='UTC'),
190
- Timestamp("1920-04-03", tz='UTC'),
191
- Timestamp("1929-03-30", tz='UTC'),
192
- Timestamp("1930-04-19", tz='UTC')
193
- ]
194
-
195
- ##################################################
196
- # US Memorial Day (Decoration Day) May 30
197
- # Closed every year since 1873
198
- # Observed on Monday since 1971
199
- ##################################################
200
- USMemorialDay = Holiday(
201
- 'Memorial Day',
202
- month=5,
203
- day=25,
204
- start_date=Timestamp('1971-01-01'),
205
- days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY),
206
- offset=DateOffset(weekday=MO(1)),
207
- )
208
- USMemorialDayBefore1952 = Holiday(
209
- 'Memorial Day',
210
- month=5,
211
- day=30,
212
- end_date=Timestamp('1952-09-28'),
213
- observance=sunday_to_monday,
214
- days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY)
215
- )
216
- USMemorialDay1952to1964 = Holiday(
217
- 'Memorial Day',
218
- month=5,
219
- day=30,
220
- start_date=Timestamp('1952-09-29'),
221
- end_date=Timestamp('1963-12-31'),
222
- observance=sunday_to_monday,
223
- days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY)
224
- )
225
-
226
- USMemorialDay1964to1969 = Holiday(
227
- 'Memorial Day',
228
- month=5,
229
- day=30,
230
- start_date=Timestamp('1964-01-01'),
231
- end_date=Timestamp('1969-12-31'),
232
- observance=nearest_workday,
233
- )
234
-
235
- # Not all Saturdays before/after Decoration Day were observed
236
- SatBeforeDecorationAdhoc = [
237
- Timestamp('1904-05-28', tz='UTC'),
238
- Timestamp('1909-05-29', tz='UTC'),
239
- Timestamp('1910-05-28', tz='UTC'),
240
- Timestamp('1921-05-28', tz='UTC'),
241
- Timestamp('1926-05-29', tz='UTC'),
242
- Timestamp('1937-05-29', tz='UTC'),
243
- ]
244
- SatAfterDecorationAdhoc = [
245
- Timestamp('1902-05-31', tz='UTC'),
246
- Timestamp('1913-05-31', tz='UTC'),
247
- Timestamp('1919-05-31', tz='UTC'),
248
- Timestamp('1924-05-31', tz='UTC'),
249
- Timestamp('1930-05-31', tz='UTC'),
250
- ]
251
-
252
- DayBeforeDecorationAdhoc = [
253
- Timestamp('1899-05-29', tz='UTC'),
254
- Timestamp('1961-05-29', tz='UTC')
255
- ]
256
-
257
- #######################################
258
- # US Juneteenth (June 19th)
259
- #######################################
260
- USJuneteenthAfter2022 = Holiday(
261
- 'Juneteenth Starting at 2022',
262
- start_date=Timestamp('2022-06-19'),
263
- month=6, day=19,
264
- observance=nearest_workday,
265
- )
266
-
267
- #######################################
268
- # US Independence Day July 4
269
- #######################################
270
- USIndependenceDay = Holiday(
271
- 'July 4th',
272
- month=7,
273
- day=4,
274
- start_date=Timestamp('1954-01-01'),
275
- days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY),
276
- observance=nearest_workday,
277
- )
278
- USIndependenceDayPre1952 = Holiday(
279
- 'July 4th',
280
- month=7,
281
- day=4,
282
- end_date=Timestamp('1952-09-28'),
283
- days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY),
284
- observance=sunday_to_monday,
285
- )
286
- USIndependenceDay1952to1954 = Holiday(
287
- 'July 4th',
288
- month=7,
289
- day=4,
290
- start_date=Timestamp('1952-09-29'),
291
- end_date=Timestamp('1953-12-31'),
292
- days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY),
293
- observance=sunday_to_monday,
294
- )
295
-
296
- MonTuesThursBeforeIndependenceDay = Holiday(
297
- # When July 4th is a Tuesday, Wednesday, or Friday, the previous day is a
298
- # half day.
299
- 'Mondays, Tuesdays, and Thursdays Before Independence Day',
300
- month=7,
301
- day=3,
302
- days_of_week=(MONDAY, TUESDAY, THURSDAY),
303
- start_date=Timestamp("1995-01-01"),
304
- )
305
-
306
- FridayAfterIndependenceDayNYSEpre2013 = Holiday(
307
- # When July 4th is a Thursday, the next day is a half day prior to 2013.
308
- # Since 2013 the early close is on Wednesday and Friday is a full day
309
- "Fridays after Independence Day prior to 2013",
310
- month=7,
311
- day=5,
312
- days_of_week=(FRIDAY,),
313
- start_date=Timestamp("1996-01-01"),
314
- end_date=Timestamp("2012-12-31"),
315
- )
316
-
317
- WednesdayBeforeIndependenceDayPost2013 = Holiday(
318
- # When July 4th is a Thursday, the next day is a half day prior to 2013.
319
- # Since 2013 the early close is on Wednesday and Friday is a full day
320
- "Wednesdays Before Independence Day including and after 2013",
321
- month=7,
322
- day=3,
323
- days_of_week=(WEDNESDAY,),
324
- start_date=Timestamp("2013-01-01"),
325
- )
326
-
327
- MonBeforeIndependenceDayAdhoc = [
328
- Timestamp('1899-07-03', tz='UTC'),
329
- ]
330
-
331
- # Not all Saturdays before/after Independence day are observed
332
- SatBeforeIndependenceDayAdhoc = [
333
- Timestamp('1887-07-02', tz='UTC'),
334
- Timestamp('1892-07-02', tz='UTC'),
335
- Timestamp('1898-07-02', tz='UTC'),
336
- Timestamp('1904-07-02', tz='UTC'),
337
- Timestamp('1909-07-03', tz='UTC'),
338
- Timestamp('1910-07-02', tz='UTC'),
339
- Timestamp('1920-07-03', tz='UTC'),
340
- Timestamp('1921-07-02', tz='UTC'),
341
- Timestamp('1926-07-03', tz='UTC'),
342
- Timestamp('1932-07-02', tz='UTC'),
343
- Timestamp('1937-07-03', tz='UTC'),
344
- ]
345
-
346
- SatAfterIndependenceDayAdhoc = [
347
- Timestamp('1890-07-05', tz='UTC'),
348
- Timestamp('1902-07-05', tz='UTC'),
349
- Timestamp('1913-07-05', tz='UTC'),
350
- Timestamp('1919-07-05', tz='UTC'),
351
- Timestamp('1930-07-05', tz='UTC'),
352
- ]
353
-
354
- DaysAfterIndependenceDayAdhoc = [
355
- Timestamp('1901-07-05', tz='UTC'),
356
- Timestamp('1901-07-06', tz='UTC'),
357
- Timestamp('1968-07-05', tz='UTC')
358
- ]
359
-
360
- DaysBeforeIndependenceDay1pmEarlyCloseAdhoc = [
361
- Timestamp('2013-07-03', tz='UTC')
362
- ]
363
-
364
- #################################################
365
- # US Labor Day Starting 1887
366
- #################################################
367
- USLaborDayStarting1887 = Holiday(
368
- "Labor Day",
369
- month=9,
370
- day=1,
371
- start_date=Timestamp("1887-01-01"),
372
- offset=DateOffset(weekday=MO(1))
373
- )
374
-
375
- # Not every Saturday before Labor Day is observed. 1894 is an example.
376
- SatBeforeLaborDayAdhoc = [
377
- Timestamp('1888-09-01', tz='UTC'),
378
- Timestamp('1898-09-03', tz='UTC'),
379
- Timestamp('1900-09-01', tz='UTC'),
380
- Timestamp('1901-08-31', tz='UTC'),
381
- Timestamp('1902-08-30', tz='UTC'),
382
- Timestamp('1903-09-05', tz='UTC'),
383
- Timestamp('1904-09-03', tz='UTC'),
384
- Timestamp('1907-08-31', tz='UTC'),
385
- Timestamp('1908-09-05', tz='UTC'),
386
- Timestamp('1909-09-04', tz='UTC'),
387
- Timestamp('1910-09-03', tz='UTC'),
388
- Timestamp('1911-09-02', tz='UTC'),
389
- Timestamp('1912-08-31', tz='UTC'),
390
- Timestamp('1913-08-30', tz='UTC'),
391
- Timestamp('1917-09-01', tz='UTC'),
392
- Timestamp('1919-08-30', tz='UTC'),
393
- Timestamp('1920-09-04', tz='UTC'),
394
- Timestamp('1921-09-03', tz='UTC'),
395
- Timestamp('1926-09-04', tz='UTC'),
396
- Timestamp('1929-08-31', tz='UTC'),
397
- Timestamp('1930-08-30', tz='UTC'),
398
- Timestamp('1931-09-05', tz='UTC'),
399
- ]
400
-
401
- ###################################################
402
- # US Election Day Nov 2
403
- ###################################################
404
- USElectionDay1848to1967 = Holiday(
405
- 'Election Day',
406
- month=11,
407
- day=2,
408
- start_date=Timestamp('1848-1-1'),
409
- end_date=Timestamp('1967-12-31'),
410
- offset=DateOffset(weekday=TU(1)),
411
- )
412
-
413
- USElectionDay1968to1980Adhoc = [
414
- Timestamp('1968-11-05', tz="UTC"),
415
- Timestamp('1972-11-07', tz="UTC"),
416
- Timestamp('1976-11-02', tz="UTC"),
417
- Timestamp('1980-11-04', tz="UTC")]
418
-
419
- ################################################
420
- # US Thanksgiving Nov 30
421
- ################################################
422
- USThanksgivingDay = Holiday(
423
- 'Thanksgiving',
424
- start_date=Timestamp('1942-01-01'),
425
- month=11, day=1,
426
- offset=DateOffset(weekday=TH(4))
427
- )
428
-
429
- USThanksgivingDayBefore1939 = Holiday(
430
- 'Thanksgiving Before 1939',
431
- start_date=Timestamp('1864-01-01'),
432
- end_date=Timestamp('1938-12-31'),
433
- month=11, day=30,
434
- offset=DateOffset(weekday=TH(-1))
435
- )
436
-
437
- USThanksgivingDay1939to1941 = Holiday(
438
- 'Thanksgiving 1939 to 1941',
439
- start_date=Timestamp('1939-01-01'),
440
- end_date=Timestamp('1941-12-31'),
441
- month=11, day=30,
442
- offset=DateOffset(weekday=TH(-2))
443
- )
444
-
445
- DayAfterThanksgiving2pmEarlyCloseBefore1993 = Holiday(
446
- 'Black Friday',
447
- month=11,
448
- day=1,
449
- # Black Friday was not observed until 1992.
450
- start_date=Timestamp('1992-01-01'),
451
- end_date=Timestamp('1993-01-01'),
452
- offset=[DateOffset(weekday=TH(4)), Day(1)],
453
- )
454
-
455
- DayAfterThanksgiving1pmEarlyCloseInOrAfter1993 = Holiday(
456
- 'Black Friday',
457
- month=11,
458
- day=1,
459
- start_date=Timestamp('1993-01-01'),
460
- offset=[DateOffset(weekday=TH(4)), Day(1)],
461
- )
462
-
463
- FridayAfterThanksgivingAdHoc = [
464
- Timestamp('1888-11-30', tz='UTC'),
465
- ]
466
-
467
- ################################
468
- # Christmas Dec 25
469
- ################################
470
- ChristmasNYSE = Holiday(
471
- 'Christmas',
472
- month=12,
473
- day=25,
474
- start_date=Timestamp('1999-01-01'),
475
- observance=nearest_workday,
476
- )
477
-
478
- Christmas54to98NYSE = Holiday(
479
- 'Christmas',
480
- month=12,
481
- day=25,
482
- start_date=Timestamp('1954-01-01'),
483
- end_date=Timestamp('1998-12-31'),
484
- observance=nearest_workday,
485
- )
486
-
487
- ChristmasBefore1954 = Holiday(
488
- 'Christmas',
489
- month=12,
490
- day=25,
491
- end_date=Timestamp('1953-12-31'),
492
- observance=sunday_to_monday,
493
- )
494
-
495
- # Only some Christmas Eve's were fully close
496
- ChristmasEvesAdhoc = [
497
- Timestamp('1900-12-24', tz='UTC'),
498
- Timestamp('1945-12-24', tz='UTC'),
499
- Timestamp('1956-12-24', tz='UTC'),
500
- ]
501
-
502
- DayAfterChristmasAdhoc = [
503
- Timestamp('1958-12-26', tz='UTC'),
504
- ]
505
-
506
- DayAfterChristmas1pmEarlyCloseAdhoc = [
507
- Timestamp('1997-12-26', tz='UTC'),
508
- Timestamp('2003-12-26', tz='UTC'),
509
- ]
510
-
511
- ChristmasEvePost1999Early1pmClose = Holiday(
512
- # When Christmas Eve is Mon-Thu it is a 1pm early close
513
- 'Mondays, Tuesdays, Wednesdays, and Thursdays Before Christmas',
514
- month=12,
515
- day=24,
516
- days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY),
517
- start_date=Timestamp("1999-01-01"),
518
- )
519
-
520
- ChristmasEve1pmEarlyCloseAdhoc = [
521
- Timestamp('1951-12-24', tz='UTC'),
522
- Timestamp('1996-12-24', tz='UTC'),
523
- Timestamp('1997-12-24', tz='UTC'),
524
- Timestamp('1998-12-24', tz='UTC'),
525
- Timestamp('1999-12-24', tz='UTC'),
526
- ]
527
-
528
- # Only some Christmas Eve's were 2pm early close (1976-1979 were not)
529
- ChristmasEve2pmEarlyCloseAdhoc = [
530
- Timestamp('1974-12-24', tz='UTC'),
531
- Timestamp('1975-12-24', tz='UTC'),
532
- Timestamp('1990-12-24', tz='UTC'), #### This one was also in the 1pm list, in the tests you check for 2pm
533
- Timestamp('1991-12-24', tz='UTC'),
534
- Timestamp('1992-12-24', tz='UTC'),
535
- ]
536
-
537
- # Not every Saturday before/after Christmas is a holiday
538
- SatBeforeChristmasAdhoc = [
539
- Timestamp('1887-12-24', tz='UTC'),
540
- Timestamp('1898-12-24', tz='UTC'),
541
- Timestamp('1904-12-24', tz='UTC'),
542
- Timestamp('1910-12-24', tz='UTC'),
543
- Timestamp('1911-12-23', tz='UTC'),
544
- Timestamp('1922-12-23', tz='UTC'),
545
- Timestamp('1949-12-24', tz='UTC'),
546
- Timestamp('1950-12-23', tz='UTC'),
547
- ]
548
-
549
- SatAfterChristmasAdhoc = [
550
- Timestamp('1891-12-26', tz='UTC'),
551
- Timestamp('1896-12-26', tz='UTC'),
552
- Timestamp('1903-12-26', tz='UTC'),
553
- Timestamp('1908-12-26', tz='UTC'),
554
- Timestamp('1925-12-26', tz='UTC'),
555
- Timestamp('1931-12-26', tz='UTC'),
556
- Timestamp('1936-12-26', tz='UTC'),
557
- ]
558
-
559
-
560
- #####################################
561
- # Retired holidays
562
- #####################################
563
- # Armistice/Veterans day
564
- USVeteransDay1934to1953 = Holiday(
565
- 'Veteran Day',
566
- month=11,
567
- day=11,
568
- start_date=Timestamp('1934-1-1'),
569
- end_date=Timestamp('1953-12-31'),
570
- observance=sunday_to_monday,
571
- )
572
-
573
- USVetransDayAdHoc = [
574
- Timestamp("1921-11-11", tz="UTC"),
575
- Timestamp("1968-11-11", tz="UTC")
576
- ]
577
-
578
- USColumbusDayBefore1954 = Holiday(
579
- 'Columbus Day',
580
- month=10,
581
- day=12,
582
- start_date=Timestamp('1909-01-01'),
583
- end_date=Timestamp('1953-12-31'),
584
- observance=sunday_to_monday,
585
- )
586
-
587
- SatAfterColumbusDayAdHoc = [
588
- Timestamp("1917-10-13", tz="UTC"),
589
- Timestamp("1945-10-13", tz="UTC"),
590
- ]
591
-
592
-
593
- ##########################
594
- # Non-recurring holidays
595
- ##########################
596
-
597
- # 1885
598
- UlyssesGrantFuneral1885 = [Timestamp('1885-08-08', tz='UTC')]
599
-
600
- # 1888
601
- GreatBlizzardOf1888 = [
602
- Timestamp('1888-03-12', tz='UTC'),
603
- Timestamp('1888-03-13', tz='UTC'),
604
- ]
605
-
606
- # 1889
607
- WashingtonInaugurationCentennialCelebration1889 = [
608
- Timestamp("1889-04-29", tz='UTC'),
609
- Timestamp("1889-04-30", tz='UTC'),
610
- Timestamp("1889-05-01", tz='UTC'),
611
- ]
612
-
613
-
614
- # 1892
615
- ColumbianCelebration1892 = [
616
- Timestamp("1892-10-12", tz='UTC'),
617
- Timestamp("1892-10-21", tz='UTC'),
618
- Timestamp("1892-10-22", tz='UTC'),
619
- Timestamp("1893-04-27", tz='UTC'),
620
- ]
621
-
622
- # 1898
623
- # NYC's 5 boroughs founded as NYC
624
- # Not actually celebrated due to Spanish-American war but market was closed
625
- CharterDay1898 = [Timestamp('1898-05-04', tz='UTC')]
626
-
627
- WelcomeNavalCommander1898 = [Timestamp('1898-08-20', tz='UTC')]
628
-
629
- # 1899
630
- AdmiralDeweyCelebration1899 = [Timestamp('1899-09-29', tz='UTC'),
631
- Timestamp('1899-09-30', tz='UTC')
632
- ]
633
-
634
- GarretHobartFuneral1899 = [Timestamp('1899-11-25', tz='UTC')]
635
-
636
- # 1901
637
- QueenVictoriaFuneral1901 = [Timestamp('1901-02-02', tz='UTC')]
638
-
639
- MovedToProduceExchange1901 = [Timestamp('1901-04-27', tz='UTC')]
640
-
641
- EnlargedProduceExchange1901 = [Timestamp('1901-05-11', tz='UTC')]
642
-
643
- McKinleyDeathAndFuneral1901 = [Timestamp('1901-09-14', tz='UTC'),
644
- Timestamp('1901-09-19', tz='UTC'),]
645
-
646
- # 1902
647
- KingEdwardVIIcoronation1902 = [Timestamp('1902-08-09', tz='UTC')]
648
-
649
- # 1903
650
- NYSEnewBuildingOpen1903 = [Timestamp('1903-04-22', tz='UTC')]
651
-
652
- # 1908
653
- GroverClevelandFuneral1pmClose1908 = Holiday(
654
- 'Funeral of Grover Cleveland 1908 1pm Close',
655
- month=6,
656
- day=26,
657
- start_date=Timestamp('1908-06-26'),
658
- end_date=Timestamp('1908-06-26'),
659
- )
660
-
661
- # 1909
662
- # 300th anniversary of Hudson discovering the Hudson river and
663
- # 100th anniversary of Fulton inventing the paddle steamer
664
- HudsonFultonCelebration1909 = [Timestamp('1909-09-25', tz='UTC')]
665
-
666
- # 1910
667
- KingEdwardDeath11amyClose1910 = Holiday(
668
- 'King Edward VII Death May 7, 1910',
669
- month=5,
670
- day=7,
671
- start_date=Timestamp('1910-05-07'),
672
- end_date=Timestamp('1910-05-07'),
673
- )
674
-
675
- KingEdwardFuneral12pmOpen1910 = Holiday(
676
- 'King Edward VII Funeral 12pm late open May 20, 1910',
677
- month=5,
678
- day=20,
679
- start_date=Timestamp('1910-05-20'),
680
- end_date=Timestamp('1910-05-20'),
681
- )
682
-
683
- # 1912
684
- JamesShermanFuneral1912 = [Timestamp('1912-11-02', tz='UTC')]
685
-
686
- # 1913
687
- JPMorganFuneral12pmOpen1913 = Holiday(
688
- 'JP Morgan Funeral 12pm late open April 14, 1913',
689
- month=4,
690
- day=14,
691
- start_date=Timestamp('1913-04-14'),
692
- end_date=Timestamp('1913-04-14'),
693
- )
694
-
695
- WilliamGaynorFuneral12pmOpen1913 = Holiday(
696
- 'Mayor William J. Gaynor Funeral 12pm late open Sept 22, 1913',
697
- month=9,
698
- day=22,
699
- start_date=Timestamp('1913-09-22'),
700
- end_date=Timestamp('1913-09-22'),
701
- )
702
-
703
- # 1914
704
-
705
- # Reopened for trading bonds (with restrictions) Nov 27, 1914
706
- # Reopened for trading stocks (with restrictions) Dec 12, 1914
707
- # Restrictions remained in place until April 1, 1915
708
- OnsetOfWWI1914 = date_range('1914-07-31',
709
- '1914-12-11',
710
- freq=CustomBusinessDay(weekmask = 'Mon Tue Wed Thu Fri Sat'),
711
- tz='UTC'
712
- )
713
-
714
- # 1917
715
- DraftRegistrationDay1917 = [Timestamp('1917-06-05', tz='UTC')]
716
-
717
- WeatherHeatClosing1917 = [Timestamp('1917-08-04', tz='UTC')]
718
-
719
- ParadeOfNationalGuardEarlyClose1917 = Holiday(
720
- 'Parade of National Guard 12pm Early Close Aug 29, 1917',
721
- month=8,
722
- day=29,
723
- start_date=Timestamp('1917-08-29'),
724
- end_date=Timestamp('1917-08-29'),
725
- )
726
-
727
- LibertyDay12pmEarlyClose1917 = Holiday(
728
- 'Liberty Day 12pm Early Close Oct 24, 1917',
729
- month=10,
730
- day=24,
731
- start_date=Timestamp('1917-10-24'),
732
- end_date=Timestamp('1917-10-24'),
733
- )
734
-
735
- # 1918
736
- WeatherNoHeatClosing1918 = [
737
- Timestamp('1918-01-28', tz='UTC'),
738
- Timestamp('1918-02-04', tz='UTC'),
739
- Timestamp('1918-02-11', tz='UTC'),
740
-
741
- ]
742
-
743
- LibertyDay12pmEarlyClose1918 = Holiday(
744
- 'Liberty Day 12pm Early Close April 26, 1918',
745
- month=4,
746
- day=26,
747
- start_date=Timestamp('1918-04-26'),
748
- end_date=Timestamp('1918-04-26'),
749
- )
750
-
751
- DraftRegistrationDay1918 = [Timestamp('1918-09-12', tz='UTC')]
752
-
753
- FalseArmisticeReport1430EarlyClose1918 = Holiday(
754
- 'False Armistice Report 2:30pm Early Close Nov 7, 1918',
755
- month=11,
756
- day=7,
757
- start_date=Timestamp('1918-11-07'),
758
- end_date=Timestamp('1918-11-07'),
759
- )
760
- ArmisticeSigned1918 = [Timestamp('1918-11-11', tz='UTC')]
761
-
762
- # 1919
763
- RooseveltFuneral1230EarlyClose1919 = Holiday(
764
- 'Former President Roosevelt funeral 12:30pm Early Close Jan 7, 1919',
765
- month=1,
766
- day=7,
767
- start_date=Timestamp('1919-01-07'),
768
- end_date=Timestamp('1919-01-07'),
769
- )
770
-
771
- Homecoming27Division1919 = [Timestamp('1919-03-25', tz='UTC')]
772
-
773
- ParadeOf77thDivision1919 = [Timestamp('1919-05-06', tz='UTC')]
774
-
775
- BacklogRelief1919 = [
776
- Timestamp('1919-07-19', tz='UTC'),
777
- Timestamp('1919-08-02', tz='UTC'),
778
- Timestamp('1919-08-16', tz='UTC'),
779
- ]
780
-
781
- GeneralPershingReturn1919 = [Timestamp('1919-09-10', tz='UTC')]
782
-
783
- TrafficBlockLateOpen1919 = Holiday(
784
- 'Traffic Block 10:30am late open Dec. 30, 1919',
785
- month=12,
786
- day=30,
787
- start_date=Timestamp('1919-12-30'),
788
- end_date=Timestamp('1919-12-30'),
789
- )
790
-
791
- # 1920
792
- TrafficBlockLateOpen1920 = Holiday(
793
- 'Traffic Block 10:30am late open Feb. 6, 1920',
794
- month=2,
795
- day=6,
796
- start_date=Timestamp('1920-02-06'),
797
- end_date=Timestamp('1920-02-06'),
798
- )
799
-
800
- OfficeLocationChange1920 = [Timestamp('1920-05-01', tz='UTC')]
801
-
802
- WallStreetExplosionEarlyClose1920 = Holiday(
803
- 'Wall Street Explosion 12:00 Early Close Sept 16, 1920',
804
- month=9,
805
- day=16,
806
- start_date=Timestamp('1920-09-16'),
807
- end_date=Timestamp('1920-09-16'),
808
- )
809
-
810
- # 1921
811
- AnnunciatorBoardFire1pmLateOpen1921 = Holiday(
812
- 'Annunciator Board Fire 1pm late open Aug 8, 1921',
813
- month=8,
814
- day=2,
815
- start_date=Timestamp('1921-08-02'),
816
- end_date=Timestamp('1921-08-02'),
817
- )
818
-
819
- # 1923
820
- HardingDeath1923 = [Timestamp('1923-08-03', tz='UTC')]
821
-
822
- HardingFuneral1923 = [Timestamp('1923-08-10', tz='UTC')]
823
-
824
- # 1924
825
- WoodrowWilsonFuneral1230EarlyClose1924 = Holiday(
826
- 'Former President Woodrow Wilson Funeral 12:30 Early Close Feb 6, 1924',
827
- month=2,
828
- day=6,
829
- start_date=Timestamp('1924-02-06'),
830
- end_date=Timestamp('1924-02-06'),
831
- )
832
-
833
- # 1925
834
- EclipseOfSunLateOpen1925 = Holiday(
835
- 'Eclipse of Sun 10:45am late open Jan 25, 1925',
836
- month=1,
837
- day=24,
838
- start_date=Timestamp('1925-01-24'),
839
- end_date=Timestamp('1925-01-24'),
840
- )
841
-
842
- CromwellFuneral1430EarlyClose1925 = Holiday(
843
- 'Former NYSE President Seymour L. Cromwell Funeral 2:30pm Early Close Sept 18, 1925',
844
- month=9,
845
- day=18,
846
- start_date=Timestamp('1925-09-18'),
847
- end_date=Timestamp('1925-09-18'),
848
- )
849
-
850
- # 1927
851
- LindberghParade1927 = [Timestamp('1927-06-13', tz='UTC')]
852
-
853
- # 1928
854
- BacklogRelief1928 = [
855
- Timestamp('1928-04-07', tz='UTC'),
856
- Timestamp('1928-04-21', tz='UTC'),
857
- Timestamp('1928-05-05', tz='UTC'),
858
- Timestamp('1928-05-12', tz='UTC'),
859
- Timestamp('1928-05-19', tz='UTC'),
860
- Timestamp('1928-05-26', tz='UTC'),
861
- Timestamp('1928-11-24', tz='UTC'),
862
- ]
863
-
864
- BacklogRelief2pmEarlyClose1928 = date_range('1928-05-21',
865
- '1928-05-25',
866
- freq=CustomBusinessDay(weekmask = 'Mon Tue Wed Thu Fri Sat'),
867
- tz='UTC'
868
- )
869
-
870
- # 1929
871
- BacklogRelief1929 = [
872
- Timestamp('1929-02-09', tz='UTC'),
873
- Timestamp('1929-11-01', tz='UTC'),
874
- Timestamp('1929-11-02', tz='UTC'),
875
- Timestamp('1929-11-09', tz='UTC'),
876
- Timestamp('1929-11-16', tz='UTC'),
877
- Timestamp('1929-11-23', tz='UTC'),
878
- Timestamp('1929-11-29', tz='UTC'),
879
- Timestamp('1929-11-30', tz='UTC'),
880
- ]
881
-
882
- BacklogRelief1pmEarlyClose1929 = [
883
- Timestamp('1929-11-06', tz='UTC'),
884
- Timestamp('1929-11-07', tz='UTC'),
885
- Timestamp('1929-11-08', tz='UTC'),
886
- Timestamp('1929-11-11', tz='UTC'),
887
- Timestamp('1929-11-12', tz='UTC'),
888
- Timestamp('1929-11-13', tz='UTC'),
889
- Timestamp('1929-11-14', tz='UTC'),
890
- Timestamp('1929-11-15', tz='UTC'),
891
- Timestamp('1929-11-18', tz='UTC'),
892
- Timestamp('1929-11-19', tz='UTC'),
893
- Timestamp('1929-11-20', tz='UTC'),
894
- Timestamp('1929-11-21', tz='UTC'),
895
- Timestamp('1929-11-22', tz='UTC')
896
- ]
897
-
898
- BacklogRelief12pmLateOpen1929 = [
899
- Timestamp('1929-10-31', tz='UTC'),
900
- ]
901
-
902
- # 1930
903
- TaftFuneral1230EarlyClose1930 = Holiday(
904
- 'Former President William Howard Taft Funeral 12:30pm Early Close Mar 11, 1930',
905
- month=3,
906
- day=11,
907
- start_date=Timestamp('1930-03-11'),
908
- end_date=Timestamp('1930-03-11'),
909
- )
910
-
911
- # 1933
912
- CoolidgeFuneral1933 = [Timestamp('1933-01-07', tz='UTC'),]
913
-
914
- BankHolidays1933 = [
915
- Timestamp('1933-03-04', tz='UTC'),
916
- Timestamp('1933-03-06', tz='UTC'),
917
- Timestamp('1933-03-07', tz='UTC'),
918
- Timestamp('1933-03-08', tz='UTC'),
919
- Timestamp('1933-03-09', tz='UTC'),
920
- Timestamp('1933-03-10', tz='UTC'),
921
- Timestamp('1933-03-11', tz='UTC'),
922
- Timestamp('1933-03-12', tz='UTC'),
923
- Timestamp('1933-03-13', tz='UTC'),
924
- Timestamp('1933-03-14', tz='UTC'),
925
- ]
926
-
927
- GasFumesOnTradingFloor1230EarlyClose1933 = Holiday(
928
- 'Gas Fumes on Trading Floor 12:30pm Early Close Aug 4, 1933',
929
- month=8,
930
- day=4,
931
- start_date=Timestamp('1933-08-04'),
932
- end_date=Timestamp('1933-08-04'),
933
- )
934
-
935
-
936
- HeavyVolume1933 = [
937
- Timestamp('1933-07-29', tz='UTC'),
938
- Timestamp('1933-08-05', tz='UTC'),
939
- Timestamp('1933-08-12', tz='UTC'),
940
- Timestamp('1933-08-19', tz='UTC'),
941
- Timestamp('1933-08-26', tz='UTC'),
942
- Timestamp('1933-09-02', tz='UTC'),
943
- ]
944
-
945
-
946
- HeavyVolume12pmLateOpen1933 = [
947
- Timestamp('1933-07-24', tz='UTC'),
948
- Timestamp('1933-07-25', tz='UTC'),
949
- ]
950
-
951
- HeavyVolume11amLateOpen1933 = [
952
- Timestamp('1933-07-26', tz='UTC'),
953
- Timestamp('1933-07-27', tz='UTC'),
954
- Timestamp('1933-07-28', tz='UTC'),
955
- ]
956
-
957
- HeavyVolume2pmEarlyClose1933 = [
958
- Timestamp('1933-07-26', tz='UTC'),
959
- Timestamp('1933-07-27', tz='UTC'),
960
- Timestamp('1933-07-28', tz='UTC'),
961
- ]
962
-
963
- NRAdemonstration12pmEarlyClose1933 = Holiday(
964
- 'NRA Demonstration 12:00 noon Early Close Sept 13, 1933',
965
- month=9,
966
- day=13,
967
- start_date=Timestamp('1933-09-13'),
968
- end_date=Timestamp('1933-09-13'),
969
- )
970
-
971
- # 1934
972
- Snow11amLateOpen1934 = Holiday(
973
- 'Severe Snowstorm 11:00am late open Feb 20, 1934',
974
- month=2,
975
- day=20,
976
- start_date=Timestamp('1934-02-20'),
977
- end_date=Timestamp('1934-02-20'),
978
- )
979
-
980
- # 1936
981
- KingGeorgeVFuneral11amLateOpen1936 = Holiday(
982
- 'King George V of England 11:00am late open Jan 28, 1936',
983
- month=1,
984
- day=28,
985
- start_date=Timestamp('1936-01-28'),
986
- end_date=Timestamp('1936-01-28'),
987
- )
988
-
989
- # 1944
990
- SatClosings1944 = [
991
- Timestamp('1944-08-19', tz='UTC'),
992
- Timestamp('1944-08-26', tz='UTC'),
993
- Timestamp('1944-09-02', tz='UTC'),
994
- ]
995
-
996
- # 1945
997
- RooseveltDayOfMourning1945 = [Timestamp('1945-04-14', tz='UTC'),]
998
-
999
- # Starting in 1945, no Saturday trading over the summer
1000
- SatClosings1945 = date_range('1945-07-07',
1001
- '1945-09-01',
1002
- freq='W-SAT',
1003
- tz='UTC')
1004
-
1005
- VJday1945 = [
1006
- Timestamp('1945-08-15', tz='UTC'),
1007
- Timestamp('1945-08-16', tz='UTC'),
1008
- ]
1009
-
1010
- NavyDay1945 = [
1011
- Timestamp('1945-10-27', tz='UTC'),
1012
- ]
1013
-
1014
- RailroadStrike1946 = [
1015
- Timestamp('1946-05-25', tz='UTC'),
1016
- ]
1017
-
1018
- # 1946
1019
- SatClosings1946 = date_range('1946-06-01',
1020
- '1946-09-28',
1021
- freq='W-SAT',
1022
- tz='UTC'
1023
- )
1024
-
1025
- # 1947
1026
- SatClosings1947 = date_range('1947-05-31',
1027
- '1947-09-27',
1028
- freq='W-SAT',
1029
- tz='UTC'
1030
- )
1031
-
1032
- # 1948
1033
- SevereWeather1948 = [
1034
- Timestamp('1948-01-03', tz='UTC'),
1035
- ]
1036
-
1037
- SatClosings1948 = date_range('1948-05-29',
1038
- '1948-09-25',
1039
- freq='W-SAT',
1040
- tz='UTC'
1041
- )
1042
-
1043
- # 1949
1044
- SatClosings1949 = date_range('1949-05-28',
1045
- '1949-09-24',
1046
- freq='W-SAT',
1047
- tz='UTC'
1048
- )
1049
-
1050
- # 1950
1051
- SatClosings1950 = date_range('1950-06-03',
1052
- '1950-09-30',
1053
- freq='W-SAT',
1054
- tz='UTC'
1055
- )
1056
-
1057
- # 1951
1058
- SatClosings1951 = date_range('1951-06-02',
1059
- '1951-09-29',
1060
- freq='W-SAT',
1061
- tz='UTC'
1062
- )
1063
-
1064
- # 1952
1065
- SatClosings1952 = date_range('1952-05-31',
1066
- '1952-09-27',
1067
- freq='W-SAT',
1068
- tz='UTC'
1069
- )
1070
-
1071
- # 1960
1072
- Snow11amLateOpening1960 = Holiday(
1073
- 'Severe Snow 11am Late Opening on Dec 12, 1960',
1074
- month=12,
1075
- day=12,
1076
- start_date=Timestamp('1960-12-12'),
1077
- end_date=Timestamp('1960-12-12'),
1078
- )
1079
-
1080
- # 1963
1081
- KennedyAssassination1407EarlyClose = Holiday(
1082
- 'President John F. Kennedy Assassination',
1083
- month=11,
1084
- day=22,
1085
- start_date=Timestamp('1963-11-22'),
1086
- end_date=Timestamp('1963-11-22'),
1087
- )
1088
-
1089
- KennedyFuneral1963 = [Timestamp('1963-11-25', tz='UTC')]
1090
-
1091
- # 1964
1092
- HooverFuneral1400EarlyClose1964 = Holiday(
1093
- 'Former President Herbert C. Hoover Funeral',
1094
- month=10,
1095
- day=23,
1096
- start_date=Timestamp('1964-10-23'),
1097
- end_date=Timestamp('1964-10-23'),
1098
- )
1099
-
1100
- # 1965
1101
- PowerFail1105LateOpen = Holiday(
1102
- 'Power Failure in NY grid supply',
1103
- month=11,
1104
- day=10,
1105
- start_date=Timestamp('1965-11-10'),
1106
- end_date=Timestamp('1965-11-10'),
1107
- )
1108
-
1109
- # 1966
1110
- TransitStrike2pmEarlyClose1966 = date_range('1966-01-06', '1966-01-14',
1111
- freq=CustomBusinessDay(weekmask = 'Mon Tue Wed Thu Fri'),
1112
- tz='UTC')
1113
-
1114
- # 1967
1115
- Snow1015LateOpen1967 = Holiday(
1116
- 'Late Open due to snow',
1117
- month=2,
1118
- day=7,
1119
- start_date=Timestamp('1967-02-07'),
1120
- end_date=Timestamp('1967-02-07'),
1121
- )
1122
- Snow2pmEarlyClose1967 = Holiday(
1123
- 'Late Open due to snow',
1124
- month=2,
1125
- day=7,
1126
- start_date=Timestamp('1967-02-07'),
1127
- end_date=Timestamp('1967-02-07'),
1128
- )
1129
- Backlog2pmEarlyCloses1967 = date_range('1967-08-09', '1967-08-18',
1130
- freq=CustomBusinessDay(weekmask = 'Mon Tue Wed Thu Fri'),
1131
- tz='UTC')
1132
-
1133
- # 1968
1134
- Backlog2pmEarlyCloses1968 = date_range('1968-01-22', '1968-03-01',
1135
- freq=CustomBusinessDay(weekmask = 'Mon Tue Wed Thu Fri'),
1136
- tz='UTC')
1137
-
1138
-
1139
- MLKdayOfMourning1968 = [Timestamp('1968-04-09', tz='UTC'),]
1140
-
1141
-
1142
- PaperworkCrisis1968 = [Timestamp('1968-06-12', tz='UTC'),
1143
- Timestamp('1968-06-19', tz='UTC'),
1144
- Timestamp('1968-06-26', tz='UTC'),
1145
- Timestamp('1968-07-10', tz='UTC'),
1146
- Timestamp('1968-07-17', tz='UTC'),
1147
- Timestamp('1968-07-24', tz='UTC'),
1148
- Timestamp('1968-07-31', tz='UTC'),
1149
- Timestamp('1968-08-07', tz='UTC'),
1150
- Timestamp('1968-08-14', tz='UTC'),
1151
- Timestamp('1968-08-21', tz='UTC'),
1152
- Timestamp('1968-08-28', tz='UTC'),
1153
- Timestamp('1968-09-11', tz='UTC'),
1154
- Timestamp('1968-09-18', tz='UTC'),
1155
- Timestamp('1968-09-25', tz='UTC'),
1156
- Timestamp('1968-10-02', tz='UTC'),
1157
- Timestamp('1968-10-09', tz='UTC'),
1158
- Timestamp('1968-10-16', tz='UTC'),
1159
- Timestamp('1968-10-23', tz='UTC'),
1160
- Timestamp('1968-10-30', tz='UTC'),
1161
- Timestamp('1968-11-20', tz='UTC'),
1162
- Timestamp('1968-12-04', tz='UTC'),
1163
- Timestamp('1968-12-11', tz='UTC'),
1164
- Timestamp('1968-12-18', tz='UTC'),]
1165
-
1166
-
1167
- # 1969
1168
- PaperworkCrisis2pmEarlyCloses1969 = date_range('1969-01-01', '1969-07-03',
1169
- freq=CustomBusinessDay(weekmask = 'Mon Tue Wed Thu Fri'),
1170
- tz='UTC')
1171
-
1172
- SnowClosing1969 = [Timestamp('1969-02-10', tz='UTC')]
1173
-
1174
- Snow11amLateOpen1969 = Holiday(
1175
- 'Late Open due to snow',
1176
- month=2,
1177
- day=11,
1178
- start_date=Timestamp('1969-02-11'),
1179
- end_date=Timestamp('1969-02-11'),
1180
- )
1181
-
1182
- EisenhowerFuneral1969 = [Timestamp('1969-03-31', tz='UTC'),]
1183
-
1184
- Storm1045LateOpen1969 = Holiday(
1185
- 'Late Open due to storm',
1186
- month=6,
1187
- day=2,
1188
- start_date=Timestamp('1969-06-02'),
1189
- end_date=Timestamp('1969-06-02'),
1190
- )
1191
-
1192
- PaperworkCrisis230pmEarlyCloses1969 = date_range('1969-07-07', '1969-09-26',
1193
- freq=CustomBusinessDay(weekmask = 'Mon Tue Wed Thu Fri'),
1194
- tz='UTC')
1195
-
1196
- FirstLunarLandingClosing1969 = [Timestamp('1969-07-21', tz='UTC')]
1197
-
1198
- PaperworkCrisis3pmEarlyCloses1969to1970 = date_range('1969-09-29', '1970-05-01',
1199
- freq=CustomBusinessDay(weekmask = 'Mon Tue Wed Thu Fri'),
1200
- tz='UTC')
1201
-
1202
- # 1972
1203
- TrumanFuneral1972 = [Timestamp('1972-12-28', tz='UTC'),]
1204
-
1205
- # 1973
1206
- JohnsonFuneral1973 = [Timestamp('1973-01-25', tz='UTC'),]
1207
-
1208
- Ice11amLateOpen1973 = Holiday(
1209
- 'Late Open due to storm',
1210
- month=12,
1211
- day=17,
1212
- start_date=Timestamp('1973-12-17'),
1213
- end_date=Timestamp('1973-12-17'),
1214
- )
1215
-
1216
- # 1974
1217
- MerrillLynchComputer1015LateOpen1974 = Holiday(
1218
- 'Late Open due to Merrill Lynch Computer trouble',
1219
- month=1,
1220
- day=16,
1221
- start_date=Timestamp('1974-01-16'),
1222
- end_date=Timestamp('1974-01-16'),
1223
- )
1224
- FireDrill1015LateOpen1974 = Holiday(
1225
- 'Late Open due to Merrill Lynch Computer trouble',
1226
- month=11,
1227
- day=22,
1228
- start_date=Timestamp('1974-11-22'),
1229
- end_date=Timestamp('1974-11-22'),
1230
- )
1231
-
1232
- # 1975
1233
- Snow230EarlyClose1975 = Holiday(
1234
- 'Early Close at 2:30pm due to snow',
1235
- month=2,
1236
- day=12,
1237
- start_date=Timestamp('1975-02-12'),
1238
- end_date=Timestamp('1975-02-12'),
1239
- )
1240
-
1241
- # 1976
1242
- Storm1115LateOpen1976 = Holiday(
1243
- 'Late Open 11:15am due to storm',
1244
- month=2,
1245
- day=2,
1246
- start_date=Timestamp('1976-02-02'),
1247
- end_date=Timestamp('1976-02-02'),
1248
- )
1249
-
1250
- FireDrill1015LateOpen1976 = Holiday(
1251
- 'Late Open 10:15am due to fire drill',
1252
- month=6,
1253
- day=8,
1254
- start_date=Timestamp('1976-06-08'),
1255
- end_date=Timestamp('1976-06-08'),
1256
- )
1257
-
1258
- HurricaneWatch3pmEarlyClose1976 = Holiday(
1259
- 'Early Close 3pm for Hurricane Watch',
1260
- month=8,
1261
- day=9,
1262
- start_date=Timestamp('1976-08-09'),
1263
- end_date=Timestamp('1976-08-09'),
1264
- )
1265
-
1266
- # 1977
1267
- NewYorkCityBlackout77 = [Timestamp('1977-07-14', tz='UTC')]
1268
-
1269
- # 1978
1270
- Snow12pmLateOpen1978 = Holiday(
1271
- 'Late Open due to snow',
1272
- month=1,
1273
- day=20,
1274
- start_date=Timestamp('1978-01-20'),
1275
- end_date=Timestamp('1978-01-20'),
1276
- )
1277
-
1278
- Snow2pmEarlyClose1978 = Holiday(
1279
- 'Early close due to snow',
1280
- month=2,
1281
- day=6,
1282
- start_date=Timestamp('1978-02-06'),
1283
- end_date=Timestamp('1978-02-06'),
1284
- )
1285
-
1286
- Snow11amLateOpen1978 = Holiday(
1287
- 'Late Open due to snow',
1288
- month=2,
1289
- day=7,
1290
- start_date=Timestamp('1978-02-07'),
1291
- end_date=Timestamp('1978-02-07'),
1292
- )
1293
-
1294
- # 1981
1295
- ReaganAssassAttempt317pmEarlyClose1981 = Holiday(
1296
- 'President Reagan Assassination Attempt',
1297
- month=3,
1298
- day=30,
1299
- start_date=Timestamp('1981-03-30'),
1300
- end_date=Timestamp('1981-03-30'),
1301
- )
1302
-
1303
- ConEdPowerFail328pmEarlyClose1981 = Holiday(
1304
- 'Con Edison power failure',
1305
- month=9,
1306
- day=9,
1307
- start_date=Timestamp('1981-09-09'),
1308
- end_date=Timestamp('1981-09-09'),
1309
- )
1310
-
1311
- # http://en.wikipedia.org/wiki/Hurricane_Gloria
1312
- HurricaneGloriaClosings1985= [Timestamp('1985-09-27', tz='UTC')]
1313
-
1314
-
1315
- # 1987
1316
- Backlog2pmEarlyCloses1987 = date_range('1987-10-23', '1987-10-30', tz='UTC')
1317
- Backlog230pmEarlyCloses1987 = date_range('1987-11-02', '1987-11-04', tz='UTC')
1318
- Backlog3pmEarlyCloses1987 = date_range('1987-11-05', '1987-11-06', tz='UTC')
1319
- Backlog330pmEarlyCloses1987 = date_range('1987-11-09', '1987-11-11', tz='UTC')
1320
-
1321
- # 1989
1322
- Fire11amLateOpen1989 = Holiday(
1323
- 'Electrical Fire',
1324
- month=11,
1325
- day=10,
1326
- start_date=Timestamp('1989-11-10'),
1327
- end_date=Timestamp('1989-11-10'),
1328
- )
1329
-
1330
- # 1990
1331
-
1332
- ConEdXformer931amLateOpen1990 = Holiday(
1333
- 'Con Edison transformer explosion',
1334
- month=12,
1335
- day=27,
1336
- start_date=Timestamp('1990-12-27'),
1337
- end_date=Timestamp('1990-12-27'),
1338
- )
1339
-
1340
- # 1991
1341
- TroopsInGulf931LateOpens1991 = [
1342
- Timestamp("1991-01-17", tz='UTC'),
1343
- Timestamp("1991-02-25", tz='UTC')
1344
- ]
1345
-
1346
- # 1994
1347
- Snow230pmEarlyClose1994 = Holiday(
1348
- 'Snowstorm',
1349
- month=2,
1350
- day=11,
1351
- start_date=Timestamp('1994-02-11'),
1352
- end_date=Timestamp('1994-02-11'),
1353
- )
1354
-
1355
- NixonFuneral1994 = [Timestamp('1994-04-27', tz='UTC'),]
1356
-
1357
- # 1995
1358
- Computer1030LateOpen1995 = Holiday(
1359
- 'Computer Systems Troubles',
1360
- month=12,
1361
- day=18,
1362
- start_date=Timestamp('1995-12-18'),
1363
- end_date=Timestamp('1995-12-18'),
1364
- )
1365
-
1366
- # 1996
1367
- Snow11amLateOpen1996 = Holiday(
1368
- 'Snow',
1369
- month=1,
1370
- day=8,
1371
- start_date=Timestamp('1996-01-08'),
1372
- end_date=Timestamp('1996-01-08'),
1373
- )
1374
-
1375
- Snow2pmEarlyClose1996 = Holiday(
1376
- 'Snow',
1377
- month=1,
1378
- day=8,
1379
- start_date=Timestamp('1996-01-08'),
1380
- end_date=Timestamp('1996-01-08'),
1381
- )
1382
-
1383
- CircuitBreakerTriggered330pmEarlyClose1997 = Holiday(
1384
- 'Oct 27 1997 Stock Market Drop Circuit Breaker Triggered',
1385
- month=10,
1386
- day=27,
1387
- start_date=Timestamp('1997-10-27'),
1388
- end_date=Timestamp('1997-10-27'),
1389
- )
1390
-
1391
- # 2001
1392
- # http://en.wikipedia.org/wiki/Aftermath_of_the_September_11_attacks
1393
- September11Closings2001 = [
1394
- Timestamp("2001-09-11", tz='UTC'),
1395
- Timestamp("2001-09-12", tz='UTC'),
1396
- Timestamp("2001-09-13", tz='UTC'),
1397
- Timestamp("2001-09-14", tz='UTC')
1398
- ]
1399
-
1400
- Sept11MomentSilence933amLateOpen2001 = Holiday(
1401
- 'Moment of silence for terrorist attacks on 9/11',
1402
- month=9,
1403
- day=17,
1404
- start_date=Timestamp('2001-09-17'),
1405
- end_date=Timestamp('2001-09-17'),
1406
- )
1407
-
1408
- EnduringFreedomMomentSilence931amLateOpen2001 = Holiday(
1409
- 'Moment of silence for Enduring Freedom troops',
1410
- month=10,
1411
- day=8,
1412
- start_date=Timestamp('2001-10-08'),
1413
- end_date=Timestamp('2001-10-08'),
1414
- )
1415
- # 2002
1416
- Sept11Anniversary12pmLateOpen2002 = Holiday(
1417
- '1 year anniversary of terrorist attacks on 9/11',
1418
- month=9,
1419
- day=11,
1420
- start_date=Timestamp('2002-09-11'),
1421
- end_date=Timestamp('2002-09-11'),
1422
- )
1423
-
1424
- # 2003
1425
- IraqiFreedom932amLateOpen2003 = Holiday(
1426
- 'Operation Iraqi freedom moment of silence',
1427
- month=3,
1428
- day=20,
1429
- start_date=Timestamp('2003-03-20'),
1430
- end_date=Timestamp('2003-03-20'),
1431
- )
1432
-
1433
- # 2004
1434
- ReaganMomentSilence932amLateOpen2004 = Holiday(
1435
- 'Death of Former President Ronald Reagan moment of silence',
1436
- month=6,
1437
- day=7,
1438
- start_date=Timestamp('2004-06-07'),
1439
- end_date=Timestamp('2004-06-07'),
1440
- )
1441
-
1442
- ReaganMourning2004 = [Timestamp('2004-06-11', tz="UTC")]
1443
-
1444
- # 2005
1445
- SystemProb356pmEarlyClose2005 = Holiday(
1446
- 'Systems Communication Problem',
1447
- month=6,
1448
- day=1,
1449
- start_date=Timestamp('2005-06-01'),
1450
- end_date=Timestamp('2005-06-01'),
1451
- )
1452
-
1453
- # 2006
1454
- FordMomentSilence932amLateOpen2006 = Holiday(
1455
- 'Former President Gerald Ford moment of silence',
1456
- month=12,
1457
- day=27,
1458
- start_date=Timestamp('2006-12-27'),
1459
- end_date=Timestamp('2006-12-27'),
1460
- )
1461
-
1462
- # 2007
1463
- FordMourning2007 = [Timestamp('2007-01-02', tz='UTC'),]
1464
-
1465
- # 2012
1466
- # http://en.wikipedia.org/wiki/Hurricane_sandy
1467
- HurricaneSandyClosings2012 = [Timestamp('2012-10-29', tz='UTC'),
1468
- Timestamp('2012-10-30', tz='UTC')]
1469
-
1470
- # 2018
1471
- GeorgeHWBushDeath2018 = [Timestamp('2018-12-05', tz='UTC'),]
1472
-
1
+ from datetime import timedelta
2
+
3
+ from dateutil.relativedelta import MO, TH, TU
4
+ from pandas import DateOffset, Timestamp, date_range
5
+ from pandas.tseries.holiday import Holiday, nearest_workday, sunday_to_monday, Easter
6
+ from pandas.tseries.offsets import Day, CustomBusinessDay
7
+
8
+ from pandas_market_calendars.market_calendar import (
9
+ MONDAY,
10
+ TUESDAY,
11
+ WEDNESDAY,
12
+ THURSDAY,
13
+ FRIDAY,
14
+ SATURDAY,
15
+ SUNDAY,
16
+ )
17
+
18
+
19
+ ################################################################################################
20
+ # main reference:
21
+ # https://github.com/rsheftel/pandas_market_calendars/files/6827110/Stocks.NYSE-Closings.pdf
22
+ #
23
+ # See nyse.py for details
24
+ #################################################################################################
25
+
26
+
27
+ def previous_saturday(dt):
28
+ """
29
+ If holiday falls on Sunday, Monday or Tuesday, Saturday there is no trading
30
+ """
31
+ if dt.weekday() == MONDAY:
32
+ return dt - timedelta(2)
33
+ elif dt.weekday() == TUESDAY:
34
+ return dt - timedelta(3)
35
+ elif dt.weekday() == SUNDAY:
36
+ return dt - timedelta(1)
37
+ return dt
38
+
39
+
40
+ def next_saturday(dt):
41
+ """
42
+ If holiday falls on Thursday or Friday, the next Saturday there is no trading
43
+ """
44
+ if dt.weekday() == THURSDAY:
45
+ return dt + timedelta(2)
46
+ elif dt.weekday() == FRIDAY:
47
+ return dt + timedelta(1)
48
+ return dt
49
+
50
+
51
+ ####################################################
52
+ # US New Years Day Jan 1
53
+ # Closed every year since the stock market opened
54
+ #####################################################
55
+ USNewYearsDayNYSEpost1952 = Holiday(
56
+ "New Years Day",
57
+ month=1,
58
+ day=1,
59
+ start_date=Timestamp("1952-09-29"),
60
+ # When Jan 1 is a Sunday, US markets observe the subsequent Monday.
61
+ # When Jan 1 is a Saturday (as in 2005 and 2011), no holiday is observed.
62
+ observance=sunday_to_monday,
63
+ days_of_week=(
64
+ MONDAY,
65
+ TUESDAY,
66
+ WEDNESDAY,
67
+ THURSDAY,
68
+ FRIDAY,
69
+ ),
70
+ )
71
+
72
+ USNewYearsDayNYSEpre1952 = Holiday(
73
+ "New Years Day Before Saturday Trading Ceased",
74
+ month=1,
75
+ day=1,
76
+ end_date=Timestamp("1952-09-28"),
77
+ observance=sunday_to_monday,
78
+ days_of_week=(
79
+ MONDAY,
80
+ TUESDAY,
81
+ WEDNESDAY,
82
+ THURSDAY,
83
+ FRIDAY,
84
+ SATURDAY,
85
+ ),
86
+ )
87
+
88
+ NewYearsEve1pmCloseAdhoc = [
89
+ # Timestamp('1999-12-31', tz='UTC'), # Disputed. Not in reference source
90
+ ]
91
+
92
+ # Not every Saturday before/after Christmas is a holiday
93
+ SatBeforeNewYearsAdhoc = [Timestamp("1916-12-30", tz="UTC")]
94
+
95
+ USMartinLutherKingJrAfter1998 = Holiday(
96
+ "Dr. Martin Luther King Jr. Day",
97
+ month=1,
98
+ day=1,
99
+ # The US markets didn't observe MLK day as a holiday until 1998.
100
+ start_date=Timestamp("1998-01-01"),
101
+ days_of_week=(
102
+ MONDAY,
103
+ TUESDAY,
104
+ WEDNESDAY,
105
+ THURSDAY,
106
+ FRIDAY,
107
+ ),
108
+ offset=DateOffset(weekday=MO(3)),
109
+ )
110
+ #########################################################################
111
+ # US Presidents Day Feb
112
+ # Lincoln's birthday closed every year 1896-1953
113
+ # Washington's birthday closed every year. Observed Mondays since 1971
114
+ # Grant's birthday was celebrated once in 1897
115
+ ##########################################################################
116
+ USPresidentsDay = Holiday(
117
+ "President" "s Day",
118
+ start_date=Timestamp("1971-01-01"),
119
+ month=2,
120
+ day=1,
121
+ days_of_week=(
122
+ MONDAY,
123
+ TUESDAY,
124
+ WEDNESDAY,
125
+ THURSDAY,
126
+ FRIDAY,
127
+ ),
128
+ offset=DateOffset(weekday=MO(3)),
129
+ )
130
+
131
+ USWashingtonsBirthDayBefore1952 = Holiday(
132
+ "Washington" "s Birthday",
133
+ month=2,
134
+ day=22,
135
+ end_date=Timestamp("1952-09-28"),
136
+ days_of_week=(
137
+ MONDAY,
138
+ TUESDAY,
139
+ WEDNESDAY,
140
+ THURSDAY,
141
+ FRIDAY,
142
+ SATURDAY,
143
+ ),
144
+ observance=sunday_to_monday,
145
+ )
146
+ USWashingtonsBirthDay1952to1963 = Holiday(
147
+ "Washington" "s Birthday",
148
+ month=2,
149
+ day=22,
150
+ start_date=Timestamp("1952-09-29"),
151
+ end_date=Timestamp("1963-12-31"),
152
+ days_of_week=(
153
+ MONDAY,
154
+ TUESDAY,
155
+ WEDNESDAY,
156
+ THURSDAY,
157
+ FRIDAY,
158
+ ),
159
+ observance=sunday_to_monday,
160
+ )
161
+
162
+ USWashingtonsBirthDay1964to1970 = Holiday(
163
+ "Washington" "s Birthday",
164
+ month=2,
165
+ day=22,
166
+ start_date=Timestamp("1964-01-01"),
167
+ end_date=Timestamp("1970-12-31"),
168
+ observance=nearest_workday,
169
+ )
170
+ # Not all Saturdays before Washingtons birthday were holidays (e.g. 1920)
171
+ SatBeforeWashingtonsBirthdayAdhoc = [
172
+ Timestamp("1903-02-21", tz="UTC"),
173
+ ]
174
+ # Not all Saturdays after Washington's brithday were holidays (e.g. 1918)
175
+ SatAfterWashingtonsBirthdayAdhoc = [
176
+ Timestamp("1901-02-23", tz="UTC"),
177
+ Timestamp("1907-02-23", tz="UTC"),
178
+ Timestamp("1929-02-23", tz="UTC"),
179
+ Timestamp("1946-02-23", tz="UTC"),
180
+ ]
181
+
182
+ USLincolnsBirthDayBefore1954 = Holiday(
183
+ "Lincoln" "s Birthday",
184
+ month=2,
185
+ day=12,
186
+ start_date=Timestamp("1896-01-01"),
187
+ end_date=Timestamp("1953-12-31"),
188
+ observance=sunday_to_monday,
189
+ )
190
+ # Not all Saturdays before/after Lincoln's birthday were holidays
191
+ SatBeforeAfterLincolnsBirthdayAdhoc = [
192
+ Timestamp("1899-02-11", tz="UTC"),
193
+ Timestamp("1909-02-13", tz="UTC"),
194
+ ]
195
+
196
+ # 1968-02-12. Offices were open but trading floor was closed
197
+ LincolnsBirthDayAdhoc = [Timestamp("1968-02-12", tz="UTC")]
198
+
199
+ GrantsBirthDayAdhoc = [Timestamp("1897-04-27", tz="UTC")]
200
+
201
+ ############################################################
202
+ # Good Friday
203
+ # closed every year except 1898, 1906, and 1907
204
+ ############################################################
205
+ GoodFriday = Holiday(
206
+ "Good Friday 1908+",
207
+ start_date=Timestamp("1908-01-01"),
208
+ month=1,
209
+ day=1,
210
+ offset=[Easter(), Day(-2)],
211
+ )
212
+ GoodFridayPre1898 = Holiday(
213
+ "Good Friday Before 1898",
214
+ start_date=Timestamp("1885-01-01"),
215
+ end_date=Timestamp("1897-12-31"),
216
+ month=1,
217
+ day=1,
218
+ offset=[Easter(), Day(-2)],
219
+ )
220
+ GoodFriday1899to1905 = Holiday(
221
+ "Good Friday 1899 to 1905",
222
+ start_date=Timestamp("1899-01-01"),
223
+ end_date=Timestamp("1905-12-31"),
224
+ month=1,
225
+ day=1,
226
+ offset=[Easter(), Day(-2)],
227
+ )
228
+ # Not every saturday after Good Friday is a holiday (e.g. 1904)
229
+ SatAfterGoodFridayAdhoc = [
230
+ Timestamp("1900-04-14", tz="UTC"),
231
+ Timestamp("1901-04-06", tz="UTC"),
232
+ Timestamp("1902-03-29", tz="UTC"),
233
+ Timestamp("1903-04-11", tz="UTC"),
234
+ Timestamp("1905-04-22", tz="UTC"),
235
+ Timestamp("1907-03-30", tz="UTC"),
236
+ Timestamp("1908-04-18", tz="UTC"),
237
+ Timestamp("1909-04-10", tz="UTC"),
238
+ Timestamp("1910-03-26", tz="UTC"),
239
+ Timestamp("1911-04-15", tz="UTC"),
240
+ Timestamp("1913-03-22", tz="UTC"),
241
+ Timestamp("1920-04-03", tz="UTC"),
242
+ Timestamp("1929-03-30", tz="UTC"),
243
+ Timestamp("1930-04-19", tz="UTC"),
244
+ ]
245
+
246
+ ##################################################
247
+ # US Memorial Day (Decoration Day) May 30
248
+ # Closed every year since 1873
249
+ # Observed on Monday since 1971
250
+ ##################################################
251
+ USMemorialDay = Holiday(
252
+ "Memorial Day",
253
+ month=5,
254
+ day=25,
255
+ start_date=Timestamp("1971-01-01"),
256
+ days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY),
257
+ offset=DateOffset(weekday=MO(1)),
258
+ )
259
+ USMemorialDayBefore1952 = Holiday(
260
+ "Memorial Day",
261
+ month=5,
262
+ day=30,
263
+ end_date=Timestamp("1952-09-28"),
264
+ observance=sunday_to_monday,
265
+ days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY),
266
+ )
267
+ USMemorialDay1952to1964 = Holiday(
268
+ "Memorial Day",
269
+ month=5,
270
+ day=30,
271
+ start_date=Timestamp("1952-09-29"),
272
+ end_date=Timestamp("1963-12-31"),
273
+ observance=sunday_to_monday,
274
+ days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY),
275
+ )
276
+
277
+ USMemorialDay1964to1969 = Holiday(
278
+ "Memorial Day",
279
+ month=5,
280
+ day=30,
281
+ start_date=Timestamp("1964-01-01"),
282
+ end_date=Timestamp("1969-12-31"),
283
+ observance=nearest_workday,
284
+ )
285
+
286
+ # Not all Saturdays before/after Decoration Day were observed
287
+ SatBeforeDecorationAdhoc = [
288
+ Timestamp("1904-05-28", tz="UTC"),
289
+ Timestamp("1909-05-29", tz="UTC"),
290
+ Timestamp("1910-05-28", tz="UTC"),
291
+ Timestamp("1921-05-28", tz="UTC"),
292
+ Timestamp("1926-05-29", tz="UTC"),
293
+ Timestamp("1937-05-29", tz="UTC"),
294
+ ]
295
+ SatAfterDecorationAdhoc = [
296
+ Timestamp("1902-05-31", tz="UTC"),
297
+ Timestamp("1913-05-31", tz="UTC"),
298
+ Timestamp("1919-05-31", tz="UTC"),
299
+ Timestamp("1924-05-31", tz="UTC"),
300
+ Timestamp("1930-05-31", tz="UTC"),
301
+ ]
302
+
303
+ DayBeforeDecorationAdhoc = [
304
+ Timestamp("1899-05-29", tz="UTC"),
305
+ Timestamp("1961-05-29", tz="UTC"),
306
+ ]
307
+
308
+ #######################################
309
+ # US Juneteenth (June 19th)
310
+ #######################################
311
+ USJuneteenthAfter2022 = Holiday(
312
+ "Juneteenth Starting at 2022",
313
+ start_date=Timestamp("2022-06-19"),
314
+ month=6,
315
+ day=19,
316
+ observance=nearest_workday,
317
+ )
318
+
319
+ #######################################
320
+ # US Independence Day July 4
321
+ #######################################
322
+ USIndependenceDay = Holiday(
323
+ "July 4th",
324
+ month=7,
325
+ day=4,
326
+ start_date=Timestamp("1954-01-01"),
327
+ days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY),
328
+ observance=nearest_workday,
329
+ )
330
+ USIndependenceDayPre1952 = Holiday(
331
+ "July 4th",
332
+ month=7,
333
+ day=4,
334
+ end_date=Timestamp("1952-09-28"),
335
+ days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY),
336
+ observance=sunday_to_monday,
337
+ )
338
+ USIndependenceDay1952to1954 = Holiday(
339
+ "July 4th",
340
+ month=7,
341
+ day=4,
342
+ start_date=Timestamp("1952-09-29"),
343
+ end_date=Timestamp("1953-12-31"),
344
+ days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY),
345
+ observance=sunday_to_monday,
346
+ )
347
+
348
+ MonTuesThursBeforeIndependenceDay = Holiday(
349
+ # When July 4th is a Tuesday, Wednesday, or Friday, the previous day is a
350
+ # half day.
351
+ "Mondays, Tuesdays, and Thursdays Before Independence Day",
352
+ month=7,
353
+ day=3,
354
+ days_of_week=(MONDAY, TUESDAY, THURSDAY),
355
+ start_date=Timestamp("1995-01-01"),
356
+ )
357
+
358
+ FridayAfterIndependenceDayNYSEpre2013 = Holiday(
359
+ # When July 4th is a Thursday, the next day is a half day prior to 2013.
360
+ # Since 2013 the early close is on Wednesday and Friday is a full day
361
+ "Fridays after Independence Day prior to 2013",
362
+ month=7,
363
+ day=5,
364
+ days_of_week=(FRIDAY,),
365
+ start_date=Timestamp("1996-01-01"),
366
+ end_date=Timestamp("2012-12-31"),
367
+ )
368
+
369
+ WednesdayBeforeIndependenceDayPost2013 = Holiday(
370
+ # When July 4th is a Thursday, the next day is a half day prior to 2013.
371
+ # Since 2013 the early close is on Wednesday and Friday is a full day
372
+ "Wednesdays Before Independence Day including and after 2013",
373
+ month=7,
374
+ day=3,
375
+ days_of_week=(WEDNESDAY,),
376
+ start_date=Timestamp("2013-01-01"),
377
+ )
378
+
379
+ MonBeforeIndependenceDayAdhoc = [
380
+ Timestamp("1899-07-03", tz="UTC"),
381
+ ]
382
+
383
+ # Not all Saturdays before/after Independence day are observed
384
+ SatBeforeIndependenceDayAdhoc = [
385
+ Timestamp("1887-07-02", tz="UTC"),
386
+ Timestamp("1892-07-02", tz="UTC"),
387
+ Timestamp("1898-07-02", tz="UTC"),
388
+ Timestamp("1904-07-02", tz="UTC"),
389
+ Timestamp("1909-07-03", tz="UTC"),
390
+ Timestamp("1910-07-02", tz="UTC"),
391
+ Timestamp("1920-07-03", tz="UTC"),
392
+ Timestamp("1921-07-02", tz="UTC"),
393
+ Timestamp("1926-07-03", tz="UTC"),
394
+ Timestamp("1932-07-02", tz="UTC"),
395
+ Timestamp("1937-07-03", tz="UTC"),
396
+ ]
397
+
398
+ SatAfterIndependenceDayAdhoc = [
399
+ Timestamp("1890-07-05", tz="UTC"),
400
+ Timestamp("1902-07-05", tz="UTC"),
401
+ Timestamp("1913-07-05", tz="UTC"),
402
+ Timestamp("1919-07-05", tz="UTC"),
403
+ Timestamp("1930-07-05", tz="UTC"),
404
+ ]
405
+
406
+ DaysAfterIndependenceDayAdhoc = [
407
+ Timestamp("1901-07-05", tz="UTC"),
408
+ Timestamp("1901-07-06", tz="UTC"),
409
+ Timestamp("1968-07-05", tz="UTC"),
410
+ ]
411
+
412
+ DaysBeforeIndependenceDay1pmEarlyCloseAdhoc = [Timestamp("2013-07-03", tz="UTC")]
413
+
414
+ #################################################
415
+ # US Labor Day Starting 1887
416
+ #################################################
417
+ USLaborDayStarting1887 = Holiday(
418
+ "Labor Day",
419
+ month=9,
420
+ day=1,
421
+ start_date=Timestamp("1887-01-01"),
422
+ offset=DateOffset(weekday=MO(1)),
423
+ )
424
+
425
+ # Not every Saturday before Labor Day is observed. 1894 is an example.
426
+ SatBeforeLaborDayAdhoc = [
427
+ Timestamp("1888-09-01", tz="UTC"),
428
+ Timestamp("1898-09-03", tz="UTC"),
429
+ Timestamp("1900-09-01", tz="UTC"),
430
+ Timestamp("1901-08-31", tz="UTC"),
431
+ Timestamp("1902-08-30", tz="UTC"),
432
+ Timestamp("1903-09-05", tz="UTC"),
433
+ Timestamp("1904-09-03", tz="UTC"),
434
+ Timestamp("1907-08-31", tz="UTC"),
435
+ Timestamp("1908-09-05", tz="UTC"),
436
+ Timestamp("1909-09-04", tz="UTC"),
437
+ Timestamp("1910-09-03", tz="UTC"),
438
+ Timestamp("1911-09-02", tz="UTC"),
439
+ Timestamp("1912-08-31", tz="UTC"),
440
+ Timestamp("1913-08-30", tz="UTC"),
441
+ Timestamp("1917-09-01", tz="UTC"),
442
+ Timestamp("1919-08-30", tz="UTC"),
443
+ Timestamp("1920-09-04", tz="UTC"),
444
+ Timestamp("1921-09-03", tz="UTC"),
445
+ Timestamp("1926-09-04", tz="UTC"),
446
+ Timestamp("1929-08-31", tz="UTC"),
447
+ Timestamp("1930-08-30", tz="UTC"),
448
+ Timestamp("1931-09-05", tz="UTC"),
449
+ ]
450
+
451
+ ###################################################
452
+ # US Election Day Nov 2
453
+ ###################################################
454
+ USElectionDay1848to1967 = Holiday(
455
+ "Election Day",
456
+ month=11,
457
+ day=2,
458
+ start_date=Timestamp("1848-1-1"),
459
+ end_date=Timestamp("1967-12-31"),
460
+ offset=DateOffset(weekday=TU(1)),
461
+ )
462
+
463
+ USElectionDay1968to1980Adhoc = [
464
+ Timestamp("1968-11-05", tz="UTC"),
465
+ Timestamp("1972-11-07", tz="UTC"),
466
+ Timestamp("1976-11-02", tz="UTC"),
467
+ Timestamp("1980-11-04", tz="UTC"),
468
+ ]
469
+
470
+ ################################################
471
+ # US Thanksgiving Nov 30
472
+ ################################################
473
+ USThanksgivingDay = Holiday(
474
+ "Thanksgiving",
475
+ start_date=Timestamp("1942-01-01"),
476
+ month=11,
477
+ day=1,
478
+ offset=DateOffset(weekday=TH(4)),
479
+ )
480
+
481
+ USThanksgivingDayBefore1939 = Holiday(
482
+ "Thanksgiving Before 1939",
483
+ start_date=Timestamp("1864-01-01"),
484
+ end_date=Timestamp("1938-12-31"),
485
+ month=11,
486
+ day=30,
487
+ offset=DateOffset(weekday=TH(-1)),
488
+ )
489
+
490
+ USThanksgivingDay1939to1941 = Holiday(
491
+ "Thanksgiving 1939 to 1941",
492
+ start_date=Timestamp("1939-01-01"),
493
+ end_date=Timestamp("1941-12-31"),
494
+ month=11,
495
+ day=30,
496
+ offset=DateOffset(weekday=TH(-2)),
497
+ )
498
+
499
+ DayAfterThanksgiving2pmEarlyCloseBefore1993 = Holiday(
500
+ "Black Friday",
501
+ month=11,
502
+ day=1,
503
+ # Black Friday was not observed until 1992.
504
+ start_date=Timestamp("1992-01-01"),
505
+ end_date=Timestamp("1993-01-01"),
506
+ offset=[DateOffset(weekday=TH(4)), Day(1)],
507
+ )
508
+
509
+ DayAfterThanksgiving1pmEarlyCloseInOrAfter1993 = Holiday(
510
+ "Black Friday",
511
+ month=11,
512
+ day=1,
513
+ start_date=Timestamp("1993-01-01"),
514
+ offset=[DateOffset(weekday=TH(4)), Day(1)],
515
+ )
516
+
517
+ FridayAfterThanksgivingAdHoc = [
518
+ Timestamp("1888-11-30", tz="UTC"),
519
+ ]
520
+
521
+ ################################
522
+ # Christmas Dec 25
523
+ ################################
524
+ ChristmasNYSE = Holiday(
525
+ "Christmas",
526
+ month=12,
527
+ day=25,
528
+ start_date=Timestamp("1999-01-01"),
529
+ observance=nearest_workday,
530
+ )
531
+
532
+ Christmas54to98NYSE = Holiday(
533
+ "Christmas",
534
+ month=12,
535
+ day=25,
536
+ start_date=Timestamp("1954-01-01"),
537
+ end_date=Timestamp("1998-12-31"),
538
+ observance=nearest_workday,
539
+ )
540
+
541
+ ChristmasBefore1954 = Holiday(
542
+ "Christmas",
543
+ month=12,
544
+ day=25,
545
+ end_date=Timestamp("1953-12-31"),
546
+ observance=sunday_to_monday,
547
+ )
548
+
549
+ # Only some Christmas Eve's were fully close
550
+ ChristmasEvesAdhoc = [
551
+ Timestamp("1900-12-24", tz="UTC"),
552
+ Timestamp("1945-12-24", tz="UTC"),
553
+ Timestamp("1956-12-24", tz="UTC"),
554
+ ]
555
+
556
+ DayAfterChristmasAdhoc = [
557
+ Timestamp("1958-12-26", tz="UTC"),
558
+ ]
559
+
560
+ DayAfterChristmas1pmEarlyCloseAdhoc = [
561
+ Timestamp("1997-12-26", tz="UTC"),
562
+ Timestamp("2003-12-26", tz="UTC"),
563
+ ]
564
+
565
+ ChristmasEvePost1999Early1pmClose = Holiday(
566
+ # When Christmas Eve is Mon-Thu it is a 1pm early close
567
+ "Mondays, Tuesdays, Wednesdays, and Thursdays Before Christmas",
568
+ month=12,
569
+ day=24,
570
+ days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY),
571
+ start_date=Timestamp("1999-01-01"),
572
+ )
573
+
574
+ ChristmasEve1pmEarlyCloseAdhoc = [
575
+ Timestamp("1951-12-24", tz="UTC"),
576
+ Timestamp("1996-12-24", tz="UTC"),
577
+ Timestamp("1997-12-24", tz="UTC"),
578
+ Timestamp("1998-12-24", tz="UTC"),
579
+ Timestamp("1999-12-24", tz="UTC"),
580
+ ]
581
+
582
+ # Only some Christmas Eve's were 2pm early close (1976-1979 were not)
583
+ ChristmasEve2pmEarlyCloseAdhoc = [
584
+ Timestamp("1974-12-24", tz="UTC"),
585
+ Timestamp("1975-12-24", tz="UTC"),
586
+ Timestamp(
587
+ "1990-12-24", tz="UTC"
588
+ ), # This one was also in the 1pm list, in the tests you check for 2pm
589
+ Timestamp("1991-12-24", tz="UTC"),
590
+ Timestamp("1992-12-24", tz="UTC"),
591
+ ]
592
+
593
+ # Not every Saturday before/after Christmas is a holiday
594
+ SatBeforeChristmasAdhoc = [
595
+ Timestamp("1887-12-24", tz="UTC"),
596
+ Timestamp("1898-12-24", tz="UTC"),
597
+ Timestamp("1904-12-24", tz="UTC"),
598
+ Timestamp("1910-12-24", tz="UTC"),
599
+ Timestamp("1911-12-23", tz="UTC"),
600
+ Timestamp("1922-12-23", tz="UTC"),
601
+ Timestamp("1949-12-24", tz="UTC"),
602
+ Timestamp("1950-12-23", tz="UTC"),
603
+ ]
604
+
605
+ SatAfterChristmasAdhoc = [
606
+ Timestamp("1891-12-26", tz="UTC"),
607
+ Timestamp("1896-12-26", tz="UTC"),
608
+ Timestamp("1903-12-26", tz="UTC"),
609
+ Timestamp("1908-12-26", tz="UTC"),
610
+ Timestamp("1925-12-26", tz="UTC"),
611
+ Timestamp("1931-12-26", tz="UTC"),
612
+ Timestamp("1936-12-26", tz="UTC"),
613
+ ]
614
+
615
+ #####################################
616
+ # Retired holidays
617
+ #####################################
618
+ # Armistice/Veterans day
619
+ USVeteransDay1934to1953 = Holiday(
620
+ "Veteran Day",
621
+ month=11,
622
+ day=11,
623
+ start_date=Timestamp("1934-1-1"),
624
+ end_date=Timestamp("1953-12-31"),
625
+ observance=sunday_to_monday,
626
+ )
627
+
628
+ USVetransDayAdHoc = [
629
+ Timestamp("1921-11-11", tz="UTC"),
630
+ Timestamp("1968-11-11", tz="UTC"),
631
+ ]
632
+
633
+ USColumbusDayBefore1954 = Holiday(
634
+ "Columbus Day",
635
+ month=10,
636
+ day=12,
637
+ start_date=Timestamp("1909-01-01"),
638
+ end_date=Timestamp("1953-12-31"),
639
+ observance=sunday_to_monday,
640
+ )
641
+
642
+ SatAfterColumbusDayAdHoc = [
643
+ Timestamp("1917-10-13", tz="UTC"),
644
+ Timestamp("1945-10-13", tz="UTC"),
645
+ ]
646
+
647
+ ##########################
648
+ # Non-recurring holidays
649
+ ##########################
650
+
651
+ # 1885
652
+ UlyssesGrantFuneral1885 = [Timestamp("1885-08-08", tz="UTC")]
653
+
654
+ # 1888
655
+ GreatBlizzardOf1888 = [
656
+ Timestamp("1888-03-12", tz="UTC"),
657
+ Timestamp("1888-03-13", tz="UTC"),
658
+ ]
659
+
660
+ # 1889
661
+ WashingtonInaugurationCentennialCelebration1889 = [
662
+ Timestamp("1889-04-29", tz="UTC"),
663
+ Timestamp("1889-04-30", tz="UTC"),
664
+ Timestamp("1889-05-01", tz="UTC"),
665
+ ]
666
+
667
+ # 1892
668
+ ColumbianCelebration1892 = [
669
+ Timestamp("1892-10-12", tz="UTC"),
670
+ Timestamp("1892-10-21", tz="UTC"),
671
+ Timestamp("1892-10-22", tz="UTC"),
672
+ Timestamp("1893-04-27", tz="UTC"),
673
+ ]
674
+
675
+ # 1898
676
+ # NYC's 5 boroughs founded as NYC
677
+ # Not actually celebrated due to Spanish-American war but market was closed
678
+ CharterDay1898 = [Timestamp("1898-05-04", tz="UTC")]
679
+
680
+ WelcomeNavalCommander1898 = [Timestamp("1898-08-20", tz="UTC")]
681
+
682
+ # 1899
683
+ AdmiralDeweyCelebration1899 = [
684
+ Timestamp("1899-09-29", tz="UTC"),
685
+ Timestamp("1899-09-30", tz="UTC"),
686
+ ]
687
+
688
+ GarretHobartFuneral1899 = [Timestamp("1899-11-25", tz="UTC")]
689
+
690
+ # 1901
691
+ QueenVictoriaFuneral1901 = [Timestamp("1901-02-02", tz="UTC")]
692
+
693
+ MovedToProduceExchange1901 = [Timestamp("1901-04-27", tz="UTC")]
694
+
695
+ EnlargedProduceExchange1901 = [Timestamp("1901-05-11", tz="UTC")]
696
+
697
+ McKinleyDeathAndFuneral1901 = [
698
+ Timestamp("1901-09-14", tz="UTC"),
699
+ Timestamp("1901-09-19", tz="UTC"),
700
+ ]
701
+
702
+ # 1902
703
+ KingEdwardVIIcoronation1902 = [Timestamp("1902-08-09", tz="UTC")]
704
+
705
+ # 1903
706
+ NYSEnewBuildingOpen1903 = [Timestamp("1903-04-22", tz="UTC")]
707
+
708
+ # 1908
709
+ GroverClevelandFuneral1pmClose1908 = Holiday(
710
+ "Funeral of Grover Cleveland 1908 1pm Close",
711
+ month=6,
712
+ day=26,
713
+ start_date=Timestamp("1908-06-26"),
714
+ end_date=Timestamp("1908-06-26"),
715
+ )
716
+
717
+ # 1909
718
+ # 300th anniversary of Hudson discovering the Hudson river and
719
+ # 100th anniversary of Fulton inventing the paddle steamer
720
+ HudsonFultonCelebration1909 = [Timestamp("1909-09-25", tz="UTC")]
721
+
722
+ # 1910
723
+ KingEdwardDeath11amyClose1910 = Holiday(
724
+ "King Edward VII Death May 7, 1910",
725
+ month=5,
726
+ day=7,
727
+ start_date=Timestamp("1910-05-07"),
728
+ end_date=Timestamp("1910-05-07"),
729
+ )
730
+
731
+ KingEdwardFuneral12pmOpen1910 = Holiday(
732
+ "King Edward VII Funeral 12pm late open May 20, 1910",
733
+ month=5,
734
+ day=20,
735
+ start_date=Timestamp("1910-05-20"),
736
+ end_date=Timestamp("1910-05-20"),
737
+ )
738
+
739
+ # 1912
740
+ JamesShermanFuneral1912 = [Timestamp("1912-11-02", tz="UTC")]
741
+
742
+ # 1913
743
+ JPMorganFuneral12pmOpen1913 = Holiday(
744
+ "JP Morgan Funeral 12pm late open April 14, 1913",
745
+ month=4,
746
+ day=14,
747
+ start_date=Timestamp("1913-04-14"),
748
+ end_date=Timestamp("1913-04-14"),
749
+ )
750
+
751
+ WilliamGaynorFuneral12pmOpen1913 = Holiday(
752
+ "Mayor William J. Gaynor Funeral 12pm late open Sept 22, 1913",
753
+ month=9,
754
+ day=22,
755
+ start_date=Timestamp("1913-09-22"),
756
+ end_date=Timestamp("1913-09-22"),
757
+ )
758
+
759
+ # 1914
760
+
761
+ # Reopened for trading bonds (with restrictions) Nov 27, 1914
762
+ # Reopened for trading stocks (with restrictions) Dec 12, 1914
763
+ # Restrictions remained in place until April 1, 1915
764
+ OnsetOfWWI1914 = date_range(
765
+ "1914-07-31",
766
+ "1914-12-11",
767
+ freq=CustomBusinessDay(weekmask="Mon Tue Wed Thu Fri Sat"),
768
+ tz="UTC",
769
+ )
770
+
771
+ # 1917
772
+ DraftRegistrationDay1917 = [Timestamp("1917-06-05", tz="UTC")]
773
+
774
+ WeatherHeatClosing1917 = [Timestamp("1917-08-04", tz="UTC")]
775
+
776
+ ParadeOfNationalGuardEarlyClose1917 = Holiday(
777
+ "Parade of National Guard 12pm Early Close Aug 29, 1917",
778
+ month=8,
779
+ day=29,
780
+ start_date=Timestamp("1917-08-29"),
781
+ end_date=Timestamp("1917-08-29"),
782
+ )
783
+
784
+ LibertyDay12pmEarlyClose1917 = Holiday(
785
+ "Liberty Day 12pm Early Close Oct 24, 1917",
786
+ month=10,
787
+ day=24,
788
+ start_date=Timestamp("1917-10-24"),
789
+ end_date=Timestamp("1917-10-24"),
790
+ )
791
+
792
+ # 1918
793
+ WeatherNoHeatClosing1918 = [
794
+ Timestamp("1918-01-28", tz="UTC"),
795
+ Timestamp("1918-02-04", tz="UTC"),
796
+ Timestamp("1918-02-11", tz="UTC"),
797
+ ]
798
+
799
+ LibertyDay12pmEarlyClose1918 = Holiday(
800
+ "Liberty Day 12pm Early Close April 26, 1918",
801
+ month=4,
802
+ day=26,
803
+ start_date=Timestamp("1918-04-26"),
804
+ end_date=Timestamp("1918-04-26"),
805
+ )
806
+
807
+ DraftRegistrationDay1918 = [Timestamp("1918-09-12", tz="UTC")]
808
+
809
+ FalseArmisticeReport1430EarlyClose1918 = Holiday(
810
+ "False Armistice Report 2:30pm Early Close Nov 7, 1918",
811
+ month=11,
812
+ day=7,
813
+ start_date=Timestamp("1918-11-07"),
814
+ end_date=Timestamp("1918-11-07"),
815
+ )
816
+ ArmisticeSigned1918 = [Timestamp("1918-11-11", tz="UTC")]
817
+
818
+ # 1919
819
+ RooseveltFuneral1230EarlyClose1919 = Holiday(
820
+ "Former President Roosevelt funeral 12:30pm Early Close Jan 7, 1919",
821
+ month=1,
822
+ day=7,
823
+ start_date=Timestamp("1919-01-07"),
824
+ end_date=Timestamp("1919-01-07"),
825
+ )
826
+
827
+ Homecoming27Division1919 = [Timestamp("1919-03-25", tz="UTC")]
828
+
829
+ ParadeOf77thDivision1919 = [Timestamp("1919-05-06", tz="UTC")]
830
+
831
+ BacklogRelief1919 = [
832
+ Timestamp("1919-07-19", tz="UTC"),
833
+ Timestamp("1919-08-02", tz="UTC"),
834
+ Timestamp("1919-08-16", tz="UTC"),
835
+ ]
836
+
837
+ GeneralPershingReturn1919 = [Timestamp("1919-09-10", tz="UTC")]
838
+
839
+ TrafficBlockLateOpen1919 = Holiday(
840
+ "Traffic Block 10:30am late open Dec. 30, 1919",
841
+ month=12,
842
+ day=30,
843
+ start_date=Timestamp("1919-12-30"),
844
+ end_date=Timestamp("1919-12-30"),
845
+ )
846
+
847
+ # 1920
848
+ TrafficBlockLateOpen1920 = Holiday(
849
+ "Traffic Block 10:30am late open Feb. 6, 1920",
850
+ month=2,
851
+ day=6,
852
+ start_date=Timestamp("1920-02-06"),
853
+ end_date=Timestamp("1920-02-06"),
854
+ )
855
+
856
+ OfficeLocationChange1920 = [Timestamp("1920-05-01", tz="UTC")]
857
+
858
+ WallStreetExplosionEarlyClose1920 = Holiday(
859
+ "Wall Street Explosion 12:00 Early Close Sept 16, 1920",
860
+ month=9,
861
+ day=16,
862
+ start_date=Timestamp("1920-09-16"),
863
+ end_date=Timestamp("1920-09-16"),
864
+ )
865
+
866
+ # 1921
867
+ AnnunciatorBoardFire1pmLateOpen1921 = Holiday(
868
+ "Annunciator Board Fire 1pm late open Aug 8, 1921",
869
+ month=8,
870
+ day=2,
871
+ start_date=Timestamp("1921-08-02"),
872
+ end_date=Timestamp("1921-08-02"),
873
+ )
874
+
875
+ # 1923
876
+ HardingDeath1923 = [Timestamp("1923-08-03", tz="UTC")]
877
+
878
+ HardingFuneral1923 = [Timestamp("1923-08-10", tz="UTC")]
879
+
880
+ # 1924
881
+ WoodrowWilsonFuneral1230EarlyClose1924 = Holiday(
882
+ "Former President Woodrow Wilson Funeral 12:30 Early Close Feb 6, 1924",
883
+ month=2,
884
+ day=6,
885
+ start_date=Timestamp("1924-02-06"),
886
+ end_date=Timestamp("1924-02-06"),
887
+ )
888
+
889
+ # 1925
890
+ EclipseOfSunLateOpen1925 = Holiday(
891
+ "Eclipse of Sun 10:45am late open Jan 25, 1925",
892
+ month=1,
893
+ day=24,
894
+ start_date=Timestamp("1925-01-24"),
895
+ end_date=Timestamp("1925-01-24"),
896
+ )
897
+
898
+ CromwellFuneral1430EarlyClose1925 = Holiday(
899
+ "Former NYSE President Seymour L. Cromwell Funeral 2:30pm Early Close Sept 18, 1925",
900
+ month=9,
901
+ day=18,
902
+ start_date=Timestamp("1925-09-18"),
903
+ end_date=Timestamp("1925-09-18"),
904
+ )
905
+
906
+ # 1927
907
+ LindberghParade1927 = [Timestamp("1927-06-13", tz="UTC")]
908
+
909
+ # 1928
910
+ BacklogRelief1928 = [
911
+ Timestamp("1928-04-07", tz="UTC"),
912
+ Timestamp("1928-04-21", tz="UTC"),
913
+ Timestamp("1928-05-05", tz="UTC"),
914
+ Timestamp("1928-05-12", tz="UTC"),
915
+ Timestamp("1928-05-19", tz="UTC"),
916
+ Timestamp("1928-05-26", tz="UTC"),
917
+ Timestamp("1928-11-24", tz="UTC"),
918
+ ]
919
+
920
+ BacklogRelief2pmEarlyClose1928 = date_range(
921
+ "1928-05-21",
922
+ "1928-05-25",
923
+ freq=CustomBusinessDay(weekmask="Mon Tue Wed Thu Fri Sat"),
924
+ tz="UTC",
925
+ )
926
+
927
+ # 1929
928
+ BacklogRelief1929 = [
929
+ Timestamp("1929-02-09", tz="UTC"),
930
+ Timestamp("1929-11-01", tz="UTC"),
931
+ Timestamp("1929-11-02", tz="UTC"),
932
+ Timestamp("1929-11-09", tz="UTC"),
933
+ Timestamp("1929-11-16", tz="UTC"),
934
+ Timestamp("1929-11-23", tz="UTC"),
935
+ Timestamp("1929-11-29", tz="UTC"),
936
+ Timestamp("1929-11-30", tz="UTC"),
937
+ ]
938
+
939
+ BacklogRelief1pmEarlyClose1929 = [
940
+ Timestamp("1929-11-06", tz="UTC"),
941
+ Timestamp("1929-11-07", tz="UTC"),
942
+ Timestamp("1929-11-08", tz="UTC"),
943
+ Timestamp("1929-11-11", tz="UTC"),
944
+ Timestamp("1929-11-12", tz="UTC"),
945
+ Timestamp("1929-11-13", tz="UTC"),
946
+ Timestamp("1929-11-14", tz="UTC"),
947
+ Timestamp("1929-11-15", tz="UTC"),
948
+ Timestamp("1929-11-18", tz="UTC"),
949
+ Timestamp("1929-11-19", tz="UTC"),
950
+ Timestamp("1929-11-20", tz="UTC"),
951
+ Timestamp("1929-11-21", tz="UTC"),
952
+ Timestamp("1929-11-22", tz="UTC"),
953
+ ]
954
+
955
+ BacklogRelief12pmLateOpen1929 = [
956
+ Timestamp("1929-10-31", tz="UTC"),
957
+ ]
958
+
959
+ # 1930
960
+ TaftFuneral1230EarlyClose1930 = Holiday(
961
+ "Former President William Howard Taft Funeral 12:30pm Early Close Mar 11, 1930",
962
+ month=3,
963
+ day=11,
964
+ start_date=Timestamp("1930-03-11"),
965
+ end_date=Timestamp("1930-03-11"),
966
+ )
967
+
968
+ # 1933
969
+ CoolidgeFuneral1933 = [
970
+ Timestamp("1933-01-07", tz="UTC"),
971
+ ]
972
+
973
+ BankHolidays1933 = [
974
+ Timestamp("1933-03-04", tz="UTC"),
975
+ Timestamp("1933-03-06", tz="UTC"),
976
+ Timestamp("1933-03-07", tz="UTC"),
977
+ Timestamp("1933-03-08", tz="UTC"),
978
+ Timestamp("1933-03-09", tz="UTC"),
979
+ Timestamp("1933-03-10", tz="UTC"),
980
+ Timestamp("1933-03-11", tz="UTC"),
981
+ Timestamp("1933-03-12", tz="UTC"),
982
+ Timestamp("1933-03-13", tz="UTC"),
983
+ Timestamp("1933-03-14", tz="UTC"),
984
+ ]
985
+
986
+ GasFumesOnTradingFloor1230EarlyClose1933 = Holiday(
987
+ "Gas Fumes on Trading Floor 12:30pm Early Close Aug 4, 1933",
988
+ month=8,
989
+ day=4,
990
+ start_date=Timestamp("1933-08-04"),
991
+ end_date=Timestamp("1933-08-04"),
992
+ )
993
+
994
+ HeavyVolume1933 = [
995
+ Timestamp("1933-07-29", tz="UTC"),
996
+ Timestamp("1933-08-05", tz="UTC"),
997
+ Timestamp("1933-08-12", tz="UTC"),
998
+ Timestamp("1933-08-19", tz="UTC"),
999
+ Timestamp("1933-08-26", tz="UTC"),
1000
+ Timestamp("1933-09-02", tz="UTC"),
1001
+ ]
1002
+
1003
+ HeavyVolume12pmLateOpen1933 = [
1004
+ Timestamp("1933-07-24", tz="UTC"),
1005
+ Timestamp("1933-07-25", tz="UTC"),
1006
+ ]
1007
+
1008
+ HeavyVolume11amLateOpen1933 = [
1009
+ Timestamp("1933-07-26", tz="UTC"),
1010
+ Timestamp("1933-07-27", tz="UTC"),
1011
+ Timestamp("1933-07-28", tz="UTC"),
1012
+ ]
1013
+
1014
+ HeavyVolume2pmEarlyClose1933 = [
1015
+ Timestamp("1933-07-26", tz="UTC"),
1016
+ Timestamp("1933-07-27", tz="UTC"),
1017
+ Timestamp("1933-07-28", tz="UTC"),
1018
+ ]
1019
+
1020
+ NRAdemonstration12pmEarlyClose1933 = Holiday(
1021
+ "NRA Demonstration 12:00 noon Early Close Sept 13, 1933",
1022
+ month=9,
1023
+ day=13,
1024
+ start_date=Timestamp("1933-09-13"),
1025
+ end_date=Timestamp("1933-09-13"),
1026
+ )
1027
+
1028
+ # 1934
1029
+ Snow11amLateOpen1934 = Holiday(
1030
+ "Severe Snowstorm 11:00am late open Feb 20, 1934",
1031
+ month=2,
1032
+ day=20,
1033
+ start_date=Timestamp("1934-02-20"),
1034
+ end_date=Timestamp("1934-02-20"),
1035
+ )
1036
+
1037
+ # 1936
1038
+ KingGeorgeVFuneral11amLateOpen1936 = Holiday(
1039
+ "King George V of England 11:00am late open Jan 28, 1936",
1040
+ month=1,
1041
+ day=28,
1042
+ start_date=Timestamp("1936-01-28"),
1043
+ end_date=Timestamp("1936-01-28"),
1044
+ )
1045
+
1046
+ # 1944
1047
+ SatClosings1944 = [
1048
+ Timestamp("1944-08-19", tz="UTC"),
1049
+ Timestamp("1944-08-26", tz="UTC"),
1050
+ Timestamp("1944-09-02", tz="UTC"),
1051
+ ]
1052
+
1053
+ # 1945
1054
+ RooseveltDayOfMourning1945 = [
1055
+ Timestamp("1945-04-14", tz="UTC"),
1056
+ ]
1057
+
1058
+ # Starting in 1945, no Saturday trading over the summer
1059
+ SatClosings1945 = date_range("1945-07-07", "1945-09-01", freq="W-SAT", tz="UTC")
1060
+
1061
+ VJday1945 = [
1062
+ Timestamp("1945-08-15", tz="UTC"),
1063
+ Timestamp("1945-08-16", tz="UTC"),
1064
+ ]
1065
+
1066
+ NavyDay1945 = [
1067
+ Timestamp("1945-10-27", tz="UTC"),
1068
+ ]
1069
+
1070
+ RailroadStrike1946 = [
1071
+ Timestamp("1946-05-25", tz="UTC"),
1072
+ ]
1073
+
1074
+ # 1946
1075
+ SatClosings1946 = date_range("1946-06-01", "1946-09-28", freq="W-SAT", tz="UTC")
1076
+
1077
+ # 1947
1078
+ SatClosings1947 = date_range("1947-05-31", "1947-09-27", freq="W-SAT", tz="UTC")
1079
+
1080
+ # 1948
1081
+ SevereWeather1948 = [
1082
+ Timestamp("1948-01-03", tz="UTC"),
1083
+ ]
1084
+
1085
+ SatClosings1948 = date_range("1948-05-29", "1948-09-25", freq="W-SAT", tz="UTC")
1086
+
1087
+ # 1949
1088
+ SatClosings1949 = date_range("1949-05-28", "1949-09-24", freq="W-SAT", tz="UTC")
1089
+
1090
+ # 1950
1091
+ SatClosings1950 = date_range("1950-06-03", "1950-09-30", freq="W-SAT", tz="UTC")
1092
+
1093
+ # 1951
1094
+ SatClosings1951 = date_range("1951-06-02", "1951-09-29", freq="W-SAT", tz="UTC")
1095
+
1096
+ # 1952
1097
+ SatClosings1952 = date_range("1952-05-31", "1952-09-27", freq="W-SAT", tz="UTC")
1098
+
1099
+ # 1960
1100
+ Snow11amLateOpening1960 = Holiday(
1101
+ "Severe Snow 11am Late Opening on Dec 12, 1960",
1102
+ month=12,
1103
+ day=12,
1104
+ start_date=Timestamp("1960-12-12"),
1105
+ end_date=Timestamp("1960-12-12"),
1106
+ )
1107
+
1108
+ # 1963
1109
+ KennedyAssassination1407EarlyClose = Holiday(
1110
+ "President John F. Kennedy Assassination",
1111
+ month=11,
1112
+ day=22,
1113
+ start_date=Timestamp("1963-11-22"),
1114
+ end_date=Timestamp("1963-11-22"),
1115
+ )
1116
+
1117
+ KennedyFuneral1963 = [Timestamp("1963-11-25", tz="UTC")]
1118
+
1119
+ # 1964
1120
+ HooverFuneral1400EarlyClose1964 = Holiday(
1121
+ "Former President Herbert C. Hoover Funeral",
1122
+ month=10,
1123
+ day=23,
1124
+ start_date=Timestamp("1964-10-23"),
1125
+ end_date=Timestamp("1964-10-23"),
1126
+ )
1127
+
1128
+ # 1965
1129
+ PowerFail1105LateOpen = Holiday(
1130
+ "Power Failure in NY grid supply",
1131
+ month=11,
1132
+ day=10,
1133
+ start_date=Timestamp("1965-11-10"),
1134
+ end_date=Timestamp("1965-11-10"),
1135
+ )
1136
+
1137
+ # 1966
1138
+ TransitStrike2pmEarlyClose1966 = date_range(
1139
+ "1966-01-06",
1140
+ "1966-01-14",
1141
+ freq=CustomBusinessDay(weekmask="Mon Tue Wed Thu Fri"),
1142
+ tz="UTC",
1143
+ )
1144
+
1145
+ # 1967
1146
+ Snow1015LateOpen1967 = Holiday(
1147
+ "Late Open due to snow",
1148
+ month=2,
1149
+ day=7,
1150
+ start_date=Timestamp("1967-02-07"),
1151
+ end_date=Timestamp("1967-02-07"),
1152
+ )
1153
+ Snow2pmEarlyClose1967 = Holiday(
1154
+ "Late Open due to snow",
1155
+ month=2,
1156
+ day=7,
1157
+ start_date=Timestamp("1967-02-07"),
1158
+ end_date=Timestamp("1967-02-07"),
1159
+ )
1160
+ Backlog2pmEarlyCloses1967 = date_range(
1161
+ "1967-08-09",
1162
+ "1967-08-18",
1163
+ freq=CustomBusinessDay(weekmask="Mon Tue Wed Thu Fri"),
1164
+ tz="UTC",
1165
+ )
1166
+
1167
+ # 1968
1168
+ Backlog2pmEarlyCloses1968 = date_range(
1169
+ "1968-01-22",
1170
+ "1968-03-01",
1171
+ freq=CustomBusinessDay(weekmask="Mon Tue Wed Thu Fri"),
1172
+ tz="UTC",
1173
+ )
1174
+
1175
+ MLKdayOfMourning1968 = [
1176
+ Timestamp("1968-04-09", tz="UTC"),
1177
+ ]
1178
+
1179
+ PaperworkCrisis1968 = [
1180
+ Timestamp("1968-06-12", tz="UTC"),
1181
+ Timestamp("1968-06-19", tz="UTC"),
1182
+ Timestamp("1968-06-26", tz="UTC"),
1183
+ Timestamp("1968-07-10", tz="UTC"),
1184
+ Timestamp("1968-07-17", tz="UTC"),
1185
+ Timestamp("1968-07-24", tz="UTC"),
1186
+ Timestamp("1968-07-31", tz="UTC"),
1187
+ Timestamp("1968-08-07", tz="UTC"),
1188
+ Timestamp("1968-08-14", tz="UTC"),
1189
+ Timestamp("1968-08-21", tz="UTC"),
1190
+ Timestamp("1968-08-28", tz="UTC"),
1191
+ Timestamp("1968-09-11", tz="UTC"),
1192
+ Timestamp("1968-09-18", tz="UTC"),
1193
+ Timestamp("1968-09-25", tz="UTC"),
1194
+ Timestamp("1968-10-02", tz="UTC"),
1195
+ Timestamp("1968-10-09", tz="UTC"),
1196
+ Timestamp("1968-10-16", tz="UTC"),
1197
+ Timestamp("1968-10-23", tz="UTC"),
1198
+ Timestamp("1968-10-30", tz="UTC"),
1199
+ Timestamp("1968-11-20", tz="UTC"),
1200
+ Timestamp("1968-12-04", tz="UTC"),
1201
+ Timestamp("1968-12-11", tz="UTC"),
1202
+ Timestamp("1968-12-18", tz="UTC"),
1203
+ ]
1204
+
1205
+ # 1969
1206
+ PaperworkCrisis2pmEarlyCloses1969 = date_range(
1207
+ "1969-01-01",
1208
+ "1969-07-03",
1209
+ freq=CustomBusinessDay(weekmask="Mon Tue Wed Thu Fri"),
1210
+ tz="UTC",
1211
+ )
1212
+
1213
+ SnowClosing1969 = [Timestamp("1969-02-10", tz="UTC")]
1214
+
1215
+ Snow11amLateOpen1969 = Holiday(
1216
+ "Late Open due to snow",
1217
+ month=2,
1218
+ day=11,
1219
+ start_date=Timestamp("1969-02-11"),
1220
+ end_date=Timestamp("1969-02-11"),
1221
+ )
1222
+
1223
+ EisenhowerFuneral1969 = [
1224
+ Timestamp("1969-03-31", tz="UTC"),
1225
+ ]
1226
+
1227
+ Storm1045LateOpen1969 = Holiday(
1228
+ "Late Open due to storm",
1229
+ month=6,
1230
+ day=2,
1231
+ start_date=Timestamp("1969-06-02"),
1232
+ end_date=Timestamp("1969-06-02"),
1233
+ )
1234
+
1235
+ PaperworkCrisis230pmEarlyCloses1969 = date_range(
1236
+ "1969-07-07",
1237
+ "1969-09-26",
1238
+ freq=CustomBusinessDay(weekmask="Mon Tue Wed Thu Fri"),
1239
+ tz="UTC",
1240
+ )
1241
+
1242
+ FirstLunarLandingClosing1969 = [Timestamp("1969-07-21", tz="UTC")]
1243
+
1244
+ PaperworkCrisis3pmEarlyCloses1969to1970 = date_range(
1245
+ "1969-09-29",
1246
+ "1970-05-01",
1247
+ freq=CustomBusinessDay(weekmask="Mon Tue Wed Thu Fri"),
1248
+ tz="UTC",
1249
+ )
1250
+
1251
+ # 1972
1252
+ TrumanFuneral1972 = [
1253
+ Timestamp("1972-12-28", tz="UTC"),
1254
+ ]
1255
+
1256
+ # 1973
1257
+ JohnsonFuneral1973 = [
1258
+ Timestamp("1973-01-25", tz="UTC"),
1259
+ ]
1260
+
1261
+ Ice11amLateOpen1973 = Holiday(
1262
+ "Late Open due to storm",
1263
+ month=12,
1264
+ day=17,
1265
+ start_date=Timestamp("1973-12-17"),
1266
+ end_date=Timestamp("1973-12-17"),
1267
+ )
1268
+
1269
+ # 1974
1270
+ MerrillLynchComputer1015LateOpen1974 = Holiday(
1271
+ "Late Open due to Merrill Lynch Computer trouble",
1272
+ month=1,
1273
+ day=16,
1274
+ start_date=Timestamp("1974-01-16"),
1275
+ end_date=Timestamp("1974-01-16"),
1276
+ )
1277
+ FireDrill1015LateOpen1974 = Holiday(
1278
+ "Late Open due to Merrill Lynch Computer trouble",
1279
+ month=11,
1280
+ day=22,
1281
+ start_date=Timestamp("1974-11-22"),
1282
+ end_date=Timestamp("1974-11-22"),
1283
+ )
1284
+
1285
+ # 1975
1286
+ Snow230EarlyClose1975 = Holiday(
1287
+ "Early Close at 2:30pm due to snow",
1288
+ month=2,
1289
+ day=12,
1290
+ start_date=Timestamp("1975-02-12"),
1291
+ end_date=Timestamp("1975-02-12"),
1292
+ )
1293
+
1294
+ # 1976
1295
+ Storm1115LateOpen1976 = Holiday(
1296
+ "Late Open 11:15am due to storm",
1297
+ month=2,
1298
+ day=2,
1299
+ start_date=Timestamp("1976-02-02"),
1300
+ end_date=Timestamp("1976-02-02"),
1301
+ )
1302
+
1303
+ FireDrill1015LateOpen1976 = Holiday(
1304
+ "Late Open 10:15am due to fire drill",
1305
+ month=6,
1306
+ day=8,
1307
+ start_date=Timestamp("1976-06-08"),
1308
+ end_date=Timestamp("1976-06-08"),
1309
+ )
1310
+
1311
+ HurricaneWatch3pmEarlyClose1976 = Holiday(
1312
+ "Early Close 3pm for Hurricane Watch",
1313
+ month=8,
1314
+ day=9,
1315
+ start_date=Timestamp("1976-08-09"),
1316
+ end_date=Timestamp("1976-08-09"),
1317
+ )
1318
+
1319
+ # 1977
1320
+ NewYorkCityBlackout77 = [Timestamp("1977-07-14", tz="UTC")]
1321
+
1322
+ # 1978
1323
+ Snow12pmLateOpen1978 = Holiday(
1324
+ "Late Open due to snow",
1325
+ month=1,
1326
+ day=20,
1327
+ start_date=Timestamp("1978-01-20"),
1328
+ end_date=Timestamp("1978-01-20"),
1329
+ )
1330
+
1331
+ Snow2pmEarlyClose1978 = Holiday(
1332
+ "Early close due to snow",
1333
+ month=2,
1334
+ day=6,
1335
+ start_date=Timestamp("1978-02-06"),
1336
+ end_date=Timestamp("1978-02-06"),
1337
+ )
1338
+
1339
+ Snow11amLateOpen1978 = Holiday(
1340
+ "Late Open due to snow",
1341
+ month=2,
1342
+ day=7,
1343
+ start_date=Timestamp("1978-02-07"),
1344
+ end_date=Timestamp("1978-02-07"),
1345
+ )
1346
+
1347
+ # 1981
1348
+ ReaganAssassAttempt317pmEarlyClose1981 = Holiday(
1349
+ "President Reagan Assassination Attempt",
1350
+ month=3,
1351
+ day=30,
1352
+ start_date=Timestamp("1981-03-30"),
1353
+ end_date=Timestamp("1981-03-30"),
1354
+ )
1355
+
1356
+ ConEdPowerFail328pmEarlyClose1981 = Holiday(
1357
+ "Con Edison power failure",
1358
+ month=9,
1359
+ day=9,
1360
+ start_date=Timestamp("1981-09-09"),
1361
+ end_date=Timestamp("1981-09-09"),
1362
+ )
1363
+
1364
+ # http://en.wikipedia.org/wiki/Hurricane_Gloria
1365
+ HurricaneGloriaClosings1985 = [Timestamp("1985-09-27", tz="UTC")]
1366
+
1367
+ # 1987
1368
+ Backlog2pmEarlyCloses1987 = date_range("1987-10-23", "1987-10-30", tz="UTC")
1369
+ Backlog230pmEarlyCloses1987 = date_range("1987-11-02", "1987-11-04", tz="UTC")
1370
+ Backlog3pmEarlyCloses1987 = date_range("1987-11-05", "1987-11-06", tz="UTC")
1371
+ Backlog330pmEarlyCloses1987 = date_range("1987-11-09", "1987-11-11", tz="UTC")
1372
+
1373
+ # 1989
1374
+ Fire11amLateOpen1989 = Holiday(
1375
+ "Electrical Fire",
1376
+ month=11,
1377
+ day=10,
1378
+ start_date=Timestamp("1989-11-10"),
1379
+ end_date=Timestamp("1989-11-10"),
1380
+ )
1381
+
1382
+ # 1990
1383
+
1384
+ ConEdXformer931amLateOpen1990 = Holiday(
1385
+ "Con Edison transformer explosion",
1386
+ month=12,
1387
+ day=27,
1388
+ start_date=Timestamp("1990-12-27"),
1389
+ end_date=Timestamp("1990-12-27"),
1390
+ )
1391
+
1392
+ # 1991
1393
+ TroopsInGulf931LateOpens1991 = [
1394
+ Timestamp("1991-01-17", tz="UTC"),
1395
+ Timestamp("1991-02-25", tz="UTC"),
1396
+ ]
1397
+
1398
+ # 1994
1399
+ Snow230pmEarlyClose1994 = Holiday(
1400
+ "Snowstorm",
1401
+ month=2,
1402
+ day=11,
1403
+ start_date=Timestamp("1994-02-11"),
1404
+ end_date=Timestamp("1994-02-11"),
1405
+ )
1406
+
1407
+ NixonFuneral1994 = [
1408
+ Timestamp("1994-04-27", tz="UTC"),
1409
+ ]
1410
+
1411
+ # 1995
1412
+ Computer1030LateOpen1995 = Holiday(
1413
+ "Computer Systems Troubles",
1414
+ month=12,
1415
+ day=18,
1416
+ start_date=Timestamp("1995-12-18"),
1417
+ end_date=Timestamp("1995-12-18"),
1418
+ )
1419
+
1420
+ # 1996
1421
+ Snow11amLateOpen1996 = Holiday(
1422
+ "Snow",
1423
+ month=1,
1424
+ day=8,
1425
+ start_date=Timestamp("1996-01-08"),
1426
+ end_date=Timestamp("1996-01-08"),
1427
+ )
1428
+
1429
+ Snow2pmEarlyClose1996 = Holiday(
1430
+ "Snow",
1431
+ month=1,
1432
+ day=8,
1433
+ start_date=Timestamp("1996-01-08"),
1434
+ end_date=Timestamp("1996-01-08"),
1435
+ )
1436
+
1437
+ CircuitBreakerTriggered330pmEarlyClose1997 = Holiday(
1438
+ "Oct 27 1997 Stock Market Drop Circuit Breaker Triggered",
1439
+ month=10,
1440
+ day=27,
1441
+ start_date=Timestamp("1997-10-27"),
1442
+ end_date=Timestamp("1997-10-27"),
1443
+ )
1444
+
1445
+ # 2001
1446
+ # http://en.wikipedia.org/wiki/Aftermath_of_the_September_11_attacks
1447
+ September11Closings2001 = [
1448
+ Timestamp("2001-09-11", tz="UTC"),
1449
+ Timestamp("2001-09-12", tz="UTC"),
1450
+ Timestamp("2001-09-13", tz="UTC"),
1451
+ Timestamp("2001-09-14", tz="UTC"),
1452
+ ]
1453
+
1454
+ Sept11MomentSilence933amLateOpen2001 = Holiday(
1455
+ "Moment of silence for terrorist attacks on 9/11",
1456
+ month=9,
1457
+ day=17,
1458
+ start_date=Timestamp("2001-09-17"),
1459
+ end_date=Timestamp("2001-09-17"),
1460
+ )
1461
+
1462
+ EnduringFreedomMomentSilence931amLateOpen2001 = Holiday(
1463
+ "Moment of silence for Enduring Freedom troops",
1464
+ month=10,
1465
+ day=8,
1466
+ start_date=Timestamp("2001-10-08"),
1467
+ end_date=Timestamp("2001-10-08"),
1468
+ )
1469
+ # 2002
1470
+ Sept11Anniversary12pmLateOpen2002 = Holiday(
1471
+ "1 year anniversary of terrorist attacks on 9/11",
1472
+ month=9,
1473
+ day=11,
1474
+ start_date=Timestamp("2002-09-11"),
1475
+ end_date=Timestamp("2002-09-11"),
1476
+ )
1477
+
1478
+ # 2003
1479
+ IraqiFreedom932amLateOpen2003 = Holiday(
1480
+ "Operation Iraqi freedom moment of silence",
1481
+ month=3,
1482
+ day=20,
1483
+ start_date=Timestamp("2003-03-20"),
1484
+ end_date=Timestamp("2003-03-20"),
1485
+ )
1486
+
1487
+ # 2004
1488
+ ReaganMomentSilence932amLateOpen2004 = Holiday(
1489
+ "Death of Former President Ronald Reagan moment of silence",
1490
+ month=6,
1491
+ day=7,
1492
+ start_date=Timestamp("2004-06-07"),
1493
+ end_date=Timestamp("2004-06-07"),
1494
+ )
1495
+
1496
+ ReaganMourning2004 = [Timestamp("2004-06-11", tz="UTC")]
1497
+
1498
+ # 2005
1499
+ SystemProb356pmEarlyClose2005 = Holiday(
1500
+ "Systems Communication Problem",
1501
+ month=6,
1502
+ day=1,
1503
+ start_date=Timestamp("2005-06-01"),
1504
+ end_date=Timestamp("2005-06-01"),
1505
+ )
1506
+
1507
+ # 2006
1508
+ FordMomentSilence932amLateOpen2006 = Holiday(
1509
+ "Former President Gerald Ford moment of silence",
1510
+ month=12,
1511
+ day=27,
1512
+ start_date=Timestamp("2006-12-27"),
1513
+ end_date=Timestamp("2006-12-27"),
1514
+ )
1515
+
1516
+ # 2007
1517
+ FordMourning2007 = [
1518
+ Timestamp("2007-01-02", tz="UTC"),
1519
+ ]
1520
+
1521
+ # 2012
1522
+ # http://en.wikipedia.org/wiki/Hurricane_sandy
1523
+ HurricaneSandyClosings2012 = [
1524
+ Timestamp("2012-10-29", tz="UTC"),
1525
+ Timestamp("2012-10-30", tz="UTC"),
1526
+ ]
1527
+
1528
+ # 2018
1529
+ GeorgeHWBushDeath2018 = [
1530
+ Timestamp("2018-12-05", tz="UTC"),
1531
+ ]