pandas-market-calendars 4.1.3__py3-none-any.whl → 4.2.0__py3-none-any.whl

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