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