pandas-market-calendars 5.0.0__py3-none-any.whl → 5.1.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. pandas_market_calendars/__init__.py +39 -39
  2. pandas_market_calendars/calendar_registry.py +57 -57
  3. pandas_market_calendars/calendar_utils.py +1151 -1147
  4. pandas_market_calendars/calendars/asx.py +77 -70
  5. pandas_market_calendars/calendars/bmf.py +226 -219
  6. pandas_market_calendars/calendars/bse.py +432 -425
  7. pandas_market_calendars/calendars/cboe.py +156 -149
  8. pandas_market_calendars/calendars/cme.py +412 -405
  9. pandas_market_calendars/calendars/cme_globex_agriculture.py +172 -172
  10. pandas_market_calendars/calendars/cme_globex_base.py +126 -119
  11. pandas_market_calendars/calendars/cme_globex_crypto.py +165 -158
  12. pandas_market_calendars/calendars/cme_globex_energy_and_metals.py +223 -216
  13. pandas_market_calendars/calendars/cme_globex_equities.py +130 -123
  14. pandas_market_calendars/calendars/cme_globex_fixed_income.py +136 -136
  15. pandas_market_calendars/calendars/cme_globex_fx.py +101 -101
  16. pandas_market_calendars/calendars/eurex.py +138 -131
  17. pandas_market_calendars/calendars/eurex_fixed_income.py +105 -98
  18. pandas_market_calendars/calendars/hkex.py +438 -431
  19. pandas_market_calendars/calendars/ice.py +88 -81
  20. pandas_market_calendars/calendars/iex.py +162 -155
  21. pandas_market_calendars/calendars/jpx.py +124 -117
  22. pandas_market_calendars/calendars/lse.py +125 -118
  23. pandas_market_calendars/calendars/mirror.py +144 -144
  24. pandas_market_calendars/calendars/nyse.py +1472 -1466
  25. pandas_market_calendars/calendars/ose.py +125 -118
  26. pandas_market_calendars/calendars/sifma.py +390 -356
  27. pandas_market_calendars/calendars/six.py +143 -136
  28. pandas_market_calendars/calendars/sse.py +322 -315
  29. pandas_market_calendars/calendars/tase.py +231 -224
  30. pandas_market_calendars/calendars/tsx.py +192 -185
  31. pandas_market_calendars/class_registry.py +115 -115
  32. pandas_market_calendars/holidays/cme.py +385 -385
  33. pandas_market_calendars/holidays/cme_globex.py +214 -214
  34. pandas_market_calendars/holidays/cn.py +1476 -1476
  35. pandas_market_calendars/holidays/jp.py +401 -401
  36. pandas_market_calendars/holidays/jpx_equinox.py +506 -506
  37. pandas_market_calendars/holidays/nyse.py +1536 -1536
  38. pandas_market_calendars/holidays/oz.py +63 -63
  39. pandas_market_calendars/holidays/sifma.py +350 -350
  40. pandas_market_calendars/holidays/us.py +376 -376
  41. pandas_market_calendars/market_calendar.py +1008 -1008
  42. {pandas_market_calendars-5.0.0.dist-info → pandas_market_calendars-5.1.1.dist-info}/METADATA +3 -1
  43. pandas_market_calendars-5.1.1.dist-info/RECORD +50 -0
  44. {pandas_market_calendars-5.0.0.dist-info → pandas_market_calendars-5.1.1.dist-info}/WHEEL +1 -1
  45. pandas_market_calendars-5.0.0.dist-info/RECORD +0 -50
  46. {pandas_market_calendars-5.0.0.dist-info → pandas_market_calendars-5.1.1.dist-info}/licenses/LICENSE +0 -0
  47. {pandas_market_calendars-5.0.0.dist-info → pandas_market_calendars-5.1.1.dist-info}/licenses/NOTICE +0 -0
  48. {pandas_market_calendars-5.0.0.dist-info → pandas_market_calendars-5.1.1.dist-info}/top_level.txt +0 -0
@@ -1,1466 +1,1472 @@
1
- #
2
- # Copyright 2016 Quantopian, Inc.
3
- #
4
- # Licensed under the Apache License, Version 2.0 (the "License");
5
- # you may not use this file except in compliance with the License.
6
- # You may obtain a copy of the License at
7
- #
8
- # http://www.apache.org/licenses/LICENSE-2.0
9
- #
10
- # Unless required by applicable law or agreed to in writing, software
11
- # distributed under the License is distributed on an "AS IS" BASIS,
12
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- # See the License for the specific language governing permissions and
14
- # limitations under the License.
15
-
16
- from datetime import time
17
- from itertools import chain
18
- from typing import Literal, Union
19
- from zoneinfo import ZoneInfo
20
-
21
- import pandas as pd
22
- from pandas.tseries.holiday import AbstractHolidayCalendar
23
- from pandas.tseries.offsets import CustomBusinessDay
24
- from zoneinfo import ZoneInfo
25
-
26
- from pandas_market_calendars import calendar_utils as u
27
- from pandas_market_calendars.holidays.nyse import (
28
- # Always Celebrated Holidays
29
- USNewYearsDayNYSEpost1952,
30
- USNewYearsDayNYSEpre1952,
31
- SatBeforeNewYearsAdhoc,
32
- USPresidentsDay,
33
- USWashingtonsBirthDay1964to1970,
34
- USWashingtonsBirthDayBefore1952,
35
- USWashingtonsBirthDay1952to1963,
36
- USLincolnsBirthDayBefore1954,
37
- LincolnsBirthDayAdhoc,
38
- SatBeforeWashingtonsBirthdayAdhoc,
39
- SatAfterWashingtonsBirthdayAdhoc,
40
- SatBeforeAfterLincolnsBirthdayAdhoc,
41
- GrantsBirthDayAdhoc,
42
- USMartinLutherKingJrAfter1998,
43
- GoodFriday,
44
- GoodFridayPre1898,
45
- GoodFriday1899to1905,
46
- SatAfterGoodFridayAdhoc,
47
- USMemorialDay,
48
- USMemorialDayBefore1952,
49
- USMemorialDay1952to1964,
50
- USMemorialDay1964to1969,
51
- SatBeforeDecorationAdhoc,
52
- SatAfterDecorationAdhoc,
53
- DayBeforeDecorationAdhoc,
54
- USJuneteenthAfter2022,
55
- USIndependenceDay,
56
- USIndependenceDayPre1952,
57
- USIndependenceDay1952to1954,
58
- SatBeforeIndependenceDayAdhoc,
59
- SatAfterIndependenceDayAdhoc,
60
- MonTuesThursBeforeIndependenceDay,
61
- FridayAfterIndependenceDayNYSEpre2013,
62
- WednesdayBeforeIndependenceDayPost2013,
63
- MonBeforeIndependenceDayAdhoc,
64
- DaysAfterIndependenceDayAdhoc,
65
- # DaysBeforeIndependenceDay1pmEarlyCloseAdhoc,
66
- USColumbusDayBefore1954,
67
- USElectionDay1848to1967,
68
- USLaborDayStarting1887,
69
- SatBeforeLaborDayAdhoc,
70
- USThanksgivingDay,
71
- USThanksgivingDay1939to1941,
72
- USThanksgivingDayBefore1939,
73
- DayAfterThanksgiving2pmEarlyCloseBefore1993,
74
- DayAfterThanksgiving1pmEarlyCloseInOrAfter1993,
75
- FridayAfterThanksgivingAdHoc,
76
- USElectionDay1968to1980Adhoc,
77
- ChristmasNYSE,
78
- Christmas54to98NYSE,
79
- ChristmasBefore1954,
80
- ChristmasEvesAdhoc,
81
- DayAfterChristmasAdhoc,
82
- DayAfterChristmas1pmEarlyCloseAdhoc,
83
- ChristmasEvePost1999Early1pmClose,
84
- ChristmasEve1pmEarlyCloseAdhoc,
85
- ChristmasEve2pmEarlyCloseAdhoc,
86
- SatBeforeChristmasAdhoc,
87
- SatAfterChristmasAdhoc,
88
- # Retired Holidays
89
- USVetransDayAdHoc,
90
- SatAfterColumbusDayAdHoc,
91
- USVeteransDay1934to1953,
92
- # Adhoc Holidays
93
- # 1885
94
- UlyssesGrantFuneral1885,
95
- # 1892
96
- ColumbianCelebration1892,
97
- # 1888
98
- GreatBlizzardOf1888,
99
- # 1889
100
- WashingtonInaugurationCentennialCelebration1889,
101
- # 1898
102
- CharterDay1898,
103
- WelcomeNavalCommander1898,
104
- # 1899
105
- AdmiralDeweyCelebration1899,
106
- GarretHobartFuneral1899,
107
- # 1901
108
- McKinleyDeathAndFuneral1901,
109
- QueenVictoriaFuneral1901,
110
- MovedToProduceExchange1901,
111
- EnlargedProduceExchange1901,
112
- # 1902
113
- KingEdwardVIIcoronation1902,
114
- # 1903
115
- NYSEnewBuildingOpen1903,
116
- # 1908
117
- GroverClevelandFuneral1pmClose1908,
118
- # 1909
119
- HudsonFultonCelebration1909,
120
- # 1910
121
- KingEdwardDeath11amyClose1910,
122
- KingEdwardFuneral12pmOpen1910,
123
- # 1912
124
- JamesShermanFuneral1912,
125
- # 1913
126
- JPMorganFuneral12pmOpen1913,
127
- WilliamGaynorFuneral12pmOpen1913,
128
- # 1914
129
- OnsetOfWWI1914,
130
- # 1917
131
- WeatherHeatClosing1917,
132
- ParadeOfNationalGuardEarlyClose1917,
133
- LibertyDay12pmEarlyClose1917,
134
- DraftRegistrationDay1917,
135
- # 1918
136
- WeatherNoHeatClosing1918,
137
- DraftRegistrationDay1918,
138
- LibertyDay12pmEarlyClose1918,
139
- FalseArmisticeReport1430EarlyClose1918,
140
- ArmisticeSigned1918,
141
- # 1919
142
- RooseveltFuneral1230EarlyClose1919,
143
- Homecoming27Division1919,
144
- ParadeOf77thDivision1919,
145
- BacklogRelief1919,
146
- GeneralPershingReturn1919,
147
- TrafficBlockLateOpen1919,
148
- # 1920
149
- TrafficBlockLateOpen1920,
150
- OfficeLocationChange1920,
151
- WallStreetExplosionEarlyClose1920,
152
- # 1921
153
- AnnunciatorBoardFire1pmLateOpen1921,
154
- # 1923
155
- HardingDeath1923,
156
- HardingFuneral1923,
157
- # 1924
158
- WoodrowWilsonFuneral1230EarlyClose1924,
159
- # 1925
160
- EclipseOfSunLateOpen1925,
161
- CromwellFuneral1430EarlyClose1925,
162
- # 1927
163
- LindberghParade1927,
164
- # 1928
165
- BacklogRelief1928,
166
- BacklogRelief2pmEarlyClose1928,
167
- # 1929
168
- BacklogRelief1929,
169
- BacklogRelief1pmEarlyClose1929,
170
- BacklogRelief12pmLateOpen1929,
171
- # 1930
172
- TaftFuneral1230EarlyClose1930,
173
- # 1933
174
- CoolidgeFuneral1933,
175
- BankHolidays1933,
176
- GasFumesOnTradingFloor1230EarlyClose1933,
177
- HeavyVolume1933,
178
- HeavyVolume12pmLateOpen1933,
179
- HeavyVolume11amLateOpen1933,
180
- HeavyVolume2pmEarlyClose1933,
181
- NRAdemonstration12pmEarlyClose1933,
182
- # 1924
183
- Snow11amLateOpen1934,
184
- # 1936
185
- KingGeorgeVFuneral11amLateOpen1936,
186
- # 1944
187
- SatClosings1944,
188
- # 1945
189
- RooseveltDayOfMourning1945,
190
- SatClosings1945,
191
- VJday1945,
192
- NavyDay1945,
193
- # 1946
194
- RailroadStrike1946,
195
- SatClosings1946,
196
- # 1947
197
- SatClosings1947,
198
- # 1948
199
- SatClosings1948,
200
- SevereWeather1948,
201
- # 1949
202
- SatClosings1949,
203
- # 1950
204
- SatClosings1950,
205
- # 1951
206
- SatClosings1951,
207
- # 1952
208
- SatClosings1952,
209
- # 1960
210
- Snow11amLateOpening1960,
211
- # 1963
212
- KennedyAssassination1407EarlyClose,
213
- KennedyFuneral1963,
214
- # 1964
215
- HooverFuneral1400EarlyClose1964,
216
- # 1965
217
- PowerFail1105LateOpen,
218
- # 1966
219
- TransitStrike2pmEarlyClose1966,
220
- # 1967
221
- Snow1015LateOpen1967,
222
- Snow2pmEarlyClose1967,
223
- Backlog2pmEarlyCloses1967,
224
- # 1968
225
- Backlog2pmEarlyCloses1968,
226
- MLKdayOfMourning1968,
227
- PaperworkCrisis1968,
228
- # 1969 - 1970
229
- PaperworkCrisis2pmEarlyCloses1969,
230
- SnowClosing1969,
231
- Snow11amLateOpen1969,
232
- EisenhowerFuneral1969,
233
- Storm1045LateOpen1969,
234
- PaperworkCrisis230pmEarlyCloses1969,
235
- FirstLunarLandingClosing1969,
236
- PaperworkCrisis3pmEarlyCloses1969to1970,
237
- # 1972
238
- TrumanFuneral1972,
239
- # 1973
240
- JohnsonFuneral1973,
241
- Ice11amLateOpen1973,
242
- # 1974
243
- MerrillLynchComputer1015LateOpen1974,
244
- FireDrill1015LateOpen1974,
245
- # 1975
246
- Snow230EarlyClose1975,
247
- # 1976
248
- Storm1115LateOpen1976,
249
- FireDrill1015LateOpen1976,
250
- HurricaneWatch3pmEarlyClose1976,
251
- # 1977
252
- NewYorkCityBlackout77,
253
- # 1978
254
- Snow12pmLateOpen1978,
255
- Snow2pmEarlyClose1978,
256
- Snow11amLateOpen1978,
257
- # 1981
258
- ReaganAssassAttempt317pmEarlyClose1981,
259
- ConEdPowerFail328pmEarlyClose1981,
260
- # 1985
261
- HurricaneGloriaClosings1985,
262
- # 1987
263
- Backlog2pmEarlyCloses1987,
264
- Backlog230pmEarlyCloses1987,
265
- Backlog3pmEarlyCloses1987,
266
- Backlog330pmEarlyCloses1987,
267
- # 1989
268
- Fire11amLateOpen1989,
269
- # 1990
270
- ConEdXformer931amLateOpen1990,
271
- # 1991
272
- TroopsInGulf931LateOpens1991,
273
- # 1994
274
- Snow230pmEarlyClose1994,
275
- NixonFuneral1994,
276
- # 1995
277
- Computer1030LateOpen1995,
278
- # 1996
279
- Snow11amLateOpen1996,
280
- Snow2pmEarlyClose1996,
281
- # 1997
282
- CircuitBreakerTriggered330pmEarlyClose1997,
283
- # 2001
284
- September11Closings2001,
285
- Sept11MomentSilence933amLateOpen2001,
286
- EnduringFreedomMomentSilence931amLateOpen2001,
287
- # 2002
288
- Sept11Anniversary12pmLateOpen2002,
289
- # 2003
290
- IraqiFreedom932amLateOpen2003,
291
- # 2004
292
- ReaganMomentSilence932amLateOpen2004,
293
- ReaganMourning2004,
294
- # 2005
295
- SystemProb356pmEarlyClose2005,
296
- # 2006
297
- FordMomentSilence932amLateOpen2006,
298
- # 2007
299
- FordMourning2007,
300
- # 2012
301
- HurricaneSandyClosings2012,
302
- # 2018
303
- GeorgeHWBushDeath2018,
304
- # 2025
305
- JimmyCarterDeath2025,
306
- )
307
- from pandas_market_calendars.market_calendar import MarketCalendar
308
-
309
- # Useful resources for making changes to this file:
310
- # http://www.nyse.com/pdfs/closings.pdf
311
- # http://www.stevemorse.org/jcal/whendid.html
312
-
313
- # Overwrite the default holiday calendar start_date of 1/1/70
314
- AbstractHolidayCalendar.start_date = "1885-01-01"
315
-
316
-
317
- class NYSEExchangeCalendar(MarketCalendar):
318
- """
319
- Exchange calendar for NYSE from 1885-01-01
320
- - Note: DJIA was first recorded 1885-02-16
321
-
322
- REFERENCES:
323
- - https://web.archive.org/web/20141224054812/http://www.nyse.com/about/history/timeline_trading.html
324
- - https://www.marketwatch.com/story/a-brief-history-of-trading-hours-on-wall-street-2015-05-29
325
- - http://www.ltadvisors.net/Info/research/closings.pdf
326
- - https://github.com/rsheftel/pandas_market_calendars/files/6827110/Stocks.NYSE-Closings.pdf
327
-
328
- NYSE OVERVIEW:
329
- - 1792: 5 securities traded
330
- - 1871: Continuous trading begins
331
- - 1885 to 1887: trading hours Mon-Sat 10am to variable 2pm thru 4pm (coded as 3pm)
332
- - 1887: trading hours Mon-Fri 10am-3pm Sat 10am-noon
333
- - 1952-09-29: trading hours Mon-Fri 10am-3:30pm,
334
- - Sat trading removed after Sept 27
335
- - Last effective Saturday traded was May 24, 1952
336
- - 1974: trading hours Mon-Fri 10am-4pm
337
- - 1985: trading hours Mon-Fri 9:30am-4pm
338
-
339
- #######################################
340
- Regularly-Observed Holidays as of 2021:
341
- #######################################
342
- - New Years Day (observed on monday when Jan 1 is a Sunday)
343
- - Martin Luther King Jr. Day (3rd Monday in January, only after 1998)
344
- - Lincoln's Birthday (February 12th, only before 1954 starting in 1896)
345
- - Washington's Birthday (February 22nd, before 1971 with rule change in 1964)
346
- - Washington's Birthday (aka President's Day, 3rd Monday in February, after 1970)
347
- - Good Friday (two days before Easter Sunday)
348
- - Memorial Day (May 30th, before 1970, with rule change in 1964)
349
- - Memorial Day (last Monday in May, after 1970)
350
- - Independence Day (July 4th Sunday to Monday, before 1954)
351
- - Independence Day (observed on the nearest weekday to July 4th, after 1953)
352
- - Election Day (First Tuesday starting on November 2nd, between 1848 and 1967)
353
- - Election Day (Every four years, first Tuesday starting on November 2nd, between 1968 and 1980)
354
- - Veterans Day (November 11th, between 1934 and 1953)
355
- - Columbus Day (October 12th, before 1954)
356
- - Labor Day (first Monday in September)
357
- - Thanksgiving (last Thursday in November, before 1939)
358
- - Thanksgiving (second to last Thursday in November, between 1939 and 1941)
359
- - Thanksgiving (fourth Thursday in November, after 1941)
360
- - Christmas (December 25th, Sunday to Monday, before 1954)
361
- - Christmas (observed on nearest weekday to December 25, after 1953)
362
-
363
- ################################
364
- Regularly-Observed Early Closes:
365
- ################################
366
- - July 3rd (Mondays, Tuesdays, and Thursdays, 1995 onward)
367
- - July 5th (Fridays, 1995 onward, except 2013)
368
- - Christmas Eve (except on Fridays, when the exchange is closed entirely)
369
- - Day After Thanksgiving (aka Black Friday, observed from 1992 onward)
370
-
371
- NOTE: Until 1993, the standard early close time for the NYSE was 2:00 PM.
372
- From 1993 onward, it has been 1:00 PM.
373
-
374
- ####################################
375
- Retired Regularly-Observed Holidays:
376
- ####################################
377
- - Columbus Day (after 1953)
378
- - Armistice/Veterans Day (after 1953)
379
-
380
- #################################
381
- Irregularities Openings/Closings:
382
- #################################
383
- begin reference: https://github.com/rsheftel/pandas_market_calendars/files/6827110/Stocks.NYSE-Closings.pdf
384
- - Closed on Aug 8, 1885 (Sat): President Ulysses S. Grant funeral
385
- - Closed on Jul 2, 1887 (Sat): Saturday before Independence Day
386
- - Closed on Dec 24, 1887 (Sat): Christmas Eve
387
- - Closed on Mar 12-13, 1888 (Mon-Tue): Blizzard of 1888
388
- - Closed on Sep 1, 1888 (Sat): Saturday before Labor Day
389
- - Closed on Nov 30, 1888 (Fri): Friday after Thanksgiving
390
- - Closed on Apr 29 - May 1, 1889 (Mon-Wed): Centennial celbration of Washington's inauguration
391
- - Closed on Jul 5, 1890 (Sat): Saturday after Independence Day
392
- - Closed on Dec 26, 1891 (Sat): Saturday after Christmas
393
- - Closed on Jul 2, 1892 (Sat): Saturday before Independence Day
394
- - Closed on Oct 12, 1892 (Wed) Columbian Celebration (Columbus discovery of America)
395
- - Closed on Oct 21-22, 1892 (Fri-Sat): Columbian Celebration
396
- - Closed on Apr 27, 1893 (Thu): Columbian Celebration
397
- - Closed on Dec 26, 1896 (Sat): Saturday after Christmas
398
- - Closed on Apr 27, 1897 (Tue): Grant's birthday
399
- - Closed on May 4, 1898 (Wed): NYC Charter Day
400
- - Closed on Jul 2, 1898 (Sat): Saturday before Independence Day
401
- - Closed on Aug 20, 1898 (Sat): Welcome of naval commanders
402
- - Closed on Sep 3, 1898 (Sat): Saturday before Labor Day
403
- - Closed on Dec 24, 1898 (Sat): Saturday before Christmas
404
- - Closed on Feb 11, 1899 (Sat): Saturday before Lincoln's birthday
405
- - Closed on May 29, 1899 (Mon): Monday before Decoration Day
406
- - Closed on Jul 3, 1899 (Mon): Monday before Independence Day
407
- - Closed on Sep 29-30, 1899 (Fri-Sat): Admiral Dewey Celebration
408
- - Closed on Nov 25, 1899 (Sat): Funeral of Vice-President Garret A. Hobart
409
- - Closed on Apr 14, 1900 (Sat): Saturday after Good Friday
410
- - Closed on Sep 1, 1900 (Sat): Saturday before Labor Day
411
- - Closed on Dec 24, 1900 (Mon): Christmas Eve
412
- - Closed on Feb 2, 1901 (Sat): Funderal of Queen Victoria of England
413
- - Closed on Feb 23, 1901 (Sat): Saturday after Washington's birthday
414
- - Closed on Apr 6, 1901 (Sat): Saturday after Good Friday
415
- - Closed on Apr 27, 1901 (Sat): Moved to temporary quarters in Produce Exchange
416
- - Closed on May 11, 1901 (Sat): Enlarged temporary quarters in Produce Exchange
417
- - Closed on Jul 5-6, 1901 (Fri-Sat): Days after Independence Day
418
- - Closed on Aug 31, 1901 (Sat): Saturday before Labor Day
419
- - Closed on Sep 14, 1901 (Sat): Death of President William McKinley
420
- - Closed on Sep 19, 1901 (Thu): Funeral of President William McKinley
421
- - Closed on Mar 29, 1902 (Sat): Saturday after Good Friday
422
- - Closed on May 31, 1902 (Sat): Saturday after Decoration Day
423
- - Closed on Jul 5, 1902 (Sat): Saturday after Independence Day
424
- - Closed on Aug 9, 1902 (Sat): Coronation of King Edward VII of England
425
- - Closed on Aug 30, 1902 (Sat): Saturday before Labor Day
426
- - Closed on Feb 21, 1903 (Sat): Saturday before Washington's birthday
427
- - Closed on Apr 11, 1903 (Sat): Saturday after Good Friday
428
- - Closed on Apr 22, 1903 (Wed): Opening of the new NYSE building
429
- - Closed on Sep 5, 1903 (Sat): Saturday before Labor Day
430
- - Closed on Dec 26, 1903 (Sat): Saturday after Christmas
431
- - Closed on May 28, 1904 (Sat): Saturday before Decoration Day
432
- - Closed on Jul 2, 1904 (Sat): Saturday before Independence Day
433
- - Closed on Sep 3, 1904 (Sat): Saturday before Labor Day
434
- - Closed on Dec 24, 1904 (Sat): Saturday before Christmas
435
- - Closed on Apr 22, 1905 (Sat): Saturday after Good Friday
436
- - Closed on Feb 23, 1907 (Sat): Saturday after Washington's birthday
437
- - Closed on Mar 30, 1907 (Sat): Saturday after Good Friday
438
- - Closed on Aug 31, 1907 (Sat): Saturday before Labor Day
439
- - Closed on Apr 18, 1908 (Sat): Saturday after Good Friday
440
- - Early Close 1pm on Jun 25, 1908 (Fri): Former President Grover Cleveland funeral
441
- - Closed on Sep 5, 1908 (Sat): Saturday before Labor Day
442
- - Closed on Dec 26, 1908 (Sat): Saturday after Christmas
443
- - Closed on Feb 13, 1909 (Sat): Saturday after Lincoln's birthday
444
- - Closed on Apr 10, 1909 (Sat): Saturday after Good Friday
445
- - Closed on May 29, 1909 (Sat): Saturday before Decoration Day
446
- - Closed on Jul 3, 1909 (Sat): Saturday before Independence Day
447
- - Closed on Sep 4, 1909 (Sat) Saturday before Labor Day
448
- - Closed on Sep 25, 1909 (Sat): Reception Day of the Hudson-Fulton Celebration
449
- - Closed on Mar 26, 1910 (Sat): Saturday after Good Friday
450
- - Early Close 11am on May 7, 1910 (Sat): King Edward VII of England Death
451
- - Late Open 12pm on May 20, 1910 (Fri): King Edward VII of England Funeral
452
- - Closed on May 28, 1910 (Sat): Saturday before Decoration Day
453
- - Closed on Jul 2, 1910 (Sat): Saturday before Independence Day
454
- - Closed on Sep 3, 1910 (Sat): Saturday before Labor Day
455
- - Closed on Dec 24, 1910 (Sat): Saturday before Christmas
456
- - Closed on Apr 15, 1911 (Sat): Saturday after Good Friday
457
- - Closed on Sep 2, 1911 (Sat): Saturday before Labor Day
458
- - Closed on Dec 23, 1911 (Sat): Saturday before Christmas
459
- - Closed on Aug 31, 1912 (Sat): Saturday before Labor Day
460
- - Closed on Nov 2, 1912 (Sat): Vice-President James S. Sherman funeral
461
- - Closed on Mar 22, 1913 (Sat): Saturday after Good Friday
462
- - Late Open 12pm on Apr 14, 1913 (Mon): JP Morgan funeral
463
- - Closed on May 31, 1913 (Sat): Saturday after Decoration Day
464
- - Closed on Jul 5, 1913 (Sat): Saturday after Independence Day
465
- - Closed on Aug 30, 1913 (Sat): Saturday before Labor Day
466
- - Late Open 12pm on Sep 22, 1913 (Mon): Mayor William J. Gaynor funeral
467
- - Closed on Jul 31-Dec 11, 1914: Pending outbreak of World War I.
468
- - Bonds reopn Nov 28, 1914 for limited trading with restrictions
469
- - Stocks (limited in number) reopen Dec 12, 1914 with restrictions
470
- - Stocks (all stocks) reopen Dec 14, 1914 with restrictions
471
- - Restrictions removed on Apr 1, 1915
472
- - Closed on Dec 30, 1916 (Sat): Saturday before New Year's Day
473
- - Closed on Jun 5, 1917 (Tue): Draft Registraion Day
474
- - Closed on Aug 4, 1917 (Sat): Heat
475
- - Early Close 12pm on Aug 29, 1917 (Wed): Parade of National Guard
476
- - Closed on Sep 1, 1917 (Sat): Saturday before Labor Day
477
- - Closed on Oct 13, 1917 (Sat): Saturday after Columbus Day
478
- - Early Close 12pm on Oct 24, 1917 (Wed): Liberty Day
479
- - Closed on Jan 28, 1918 (Mon): Heatless day
480
- - Closed on Feb 4, 1918 (Mon): Heatless day
481
- - Closed on Feb 11, 1918 (Mon): Heatless day
482
- - Early Close 12pm on Apr 26, 1918 (Fri): Liberty Day
483
- - NOT IMPLEMENTED: Break from 11am to 12pm on Jul 11, 1918 (Thu): Former Mayor John Purroy Mitchell funeral
484
- - Closed on Sep 12, 1918 (Thu): Draft registration day
485
- - Early Close 2:30pm on Nov 7, 1918 (Thu): False armistice report
486
- - Closed on Nov 11, 1918 (Mon): Armistice signed
487
- - Early Close 12:30pm on Jan 7, 1919 (Tue): Former President Theodore Roosevelt funeral
488
- - Closed on Mar 25, 1919 (Tue): Homecoming of 27th Division
489
- - Closed on May 6, 1919 (Tue): Parade of 77th Division
490
- - Closed on May 31, 1919 (Sat): Saturday after Decoratin Day
491
- - Closed on Jul 5, 1919 (Sat): Saturday after Independence Day
492
- - Closed on Jul 19, 1919 (Sat): Heat and backlog catch up
493
- - Closed on Aug 2, 1919 (Sat): Backlog catch up
494
- - Closed on Aug 16, 1919 (Sat): Backlog catch up
495
- - Closed on Aug 30, 1919 (Sat): Saturday before Labor Day
496
- - Closed on Sep 10, 1919 (Wed): Return of General John J. Pershing
497
- - Late Open 10:30am on Dec 30, 1919 (Tue): Traffic block
498
- - Late Open 10:30am on Feb 6, 1920 (Fri): Traffic block
499
- - Closed on Apr 3, 1920 (Sat): Saturday after Good Friday
500
- - Closed on May 1, 1920 (Sat): Many firms changed office locations
501
- - Closed on Jul 3, 1920 (Sat): Saturday before Independence Day
502
- - Closed on Sep 4, 1920 (Sat): Saturday before Labor Day
503
- - Early Close 12pm on Sep 16, 1920 (Thu): Wall Street explosion
504
- - Closed on May 28, 1921 (Sat): Saturday before Decoration Day
505
- - Closed on Jul 2, 1921 (Sat): Saturday before Independence Day
506
- - Late Open 1pm on Aug 2, 1921 (Tue): Fire in annunciator board
507
- - Closed on Sep 3, 1921 (Sat): Saturday before Labor Day
508
- - Closed on Dec 23, 1922 (Sat): Saturday before Christmas
509
- - Closed on Aug 3, 1923 (Fri): President Warren G. Harding death
510
- - NOT IMPLEMENTED: Break 11am to 12:30pm on Aug 8, 1923 (Wed): President Warren G. Harding funeral
511
- - Closed on Aug 10, 1923 (Fri): President Warren G. Harding funeral
512
- - Early Close 12:30pm on Feb 6, 1924 (Wed): Former President Woodrow Wilson funderal
513
- - Closed on May 31, 1924 (Sat): Saturday after Decoration Day
514
- - Late Open 10:45am on Jan 24, 1925 (Sat): Eclipse of sun
515
- - Early Close 2:30pm on Sep 18, 1925 (Fri): Seymour L. Cromwell funeral (former NYSE president)
516
- - Closed on Dec 26, 1925 (Sat): Saturday after Christmas
517
- - Closed on May 29, 1926 (Sat): Saturday before Decoration Day
518
- - Closed on Jul 3, 1926 (Sat): Saturday before Independence Day
519
- - Closed on Sep 4, 1926 (Sat): Saturday before Labor Day
520
- - Closed on Jun 13, 1927 (Mon): Colonel Charles A. Lindberg parade
521
- - Closed on Apr 7, 1928 (Sat): Backlog catch up
522
- - Closed on Apr 21, 1928 (Sat): Backlog catch up
523
- - Closed on May 5, 1928 (Sat): Backlog catch up
524
- - Closed on May 12, 1928 (Sat): Backlog catch up
525
- - Closed on May 19, 1928 (Sat): Backlog catch up
526
- - Early Closes May 21-25, 1928 (Mon-Fri): Backlog catch up
527
- - Closed on May 26, 1928 (Sat): Backlog catch up
528
- - Closed on Nov 24, 1928 (Sat): Backlog catch up
529
- - Closed on Feb 9, 1929 (Sat): Backlog catch up
530
- - Closed on Feb 23, 1929 (Sat): Saturday after Washington's birthday
531
- - Closed on Mar 30, 1929 (Sat): Saturday after Good Friday
532
- - Closed on Aug 31, 1929 (Sat): Saturday before Labor Day
533
- - Late Open 12pm on Oct 31, 1929 (Thu): Backlog catch up and relieve personnel
534
- - Closed on Nov 1-2, 1929 (Fri-Sat): Backlog catch up and relieve personnel
535
- - Early Closes 1pm on Nov 6-8, 1929 (Wed-Fri): Backlog catch up and relieve personnel
536
- - Closed on Nov 9, 1929 (Sat): Backlog catch up and relieve personnel
537
- - Early Closes 1pm on Nov 11-15, 1929 (Mon-Fri): Backlog catch up and relieve personnel
538
- - Closed on Nov 16, 1929 (Sat): Backlog catch up and relieve personnel
539
- - Closed on Nov 18-22, 1929 (Mon-Fri): Backlog catch up and relieve personnel
540
- - Closed on Nov 23, 1929 (Sat): Backlog catch up and relieve personnel
541
- - Closed on Nov 29-30, 1929 (Fri-Sat): Backlog catch up and relieve personnel
542
- - Early Close 12:30pm on Mar 11, 1930 (Tue): Former President William Howard Taft funeral
543
- - Closed on Apr 19, 1930 (Sat): Saturday after Good Friday
544
- - Closed on May 31, 1930 (Sat): Saturday after Decoration Dday
545
- - Closed on Jul 5, 1930 (Sat): Saturday after Independence Day
546
- - Closed on Aug 30, 1930 (Sat): Saturday before Labor Day
547
- - Closed on Sep 5, 1931 (Sat): Saturday before Labor Day
548
- - Closed on Dec 26, 1931 (Sat): Saturday after Christmas
549
- - Closed on Jul 2, 1932 (Sat): Saturday before Independence Day
550
- - Closed on Jan 7, 1933 (Sat): Former President Calvin Coolidge funeral
551
- - Closed on Mar 4, 1933 (Sat): State banking holiday
552
- - Closed on Mar 6-14, 1933 (Mon-Tue): National banking holiday
553
- - Late Open 12pm on Jul 24-25, 1933 (Mon-Tue): Volume activity
554
- - Late Opens AND Early Closes on Jul 26-28, 1933 (Wed-Fri): Volume activity
555
- - Closed on July 29, 1933 (Sat): Volume activity
556
- - Early Close 12:30pm on Aug 4, 1933 (Fri): Gas fumes on trading floor
557
- - Closed on Aug 5, 1933 (Sat): Volume activity
558
- - Closed on Aug 12, 1933 (Sat): Volume activity
559
- - Closed on Aug 19, 1933 (Sat): Volume activity
560
- - Closed on Aug 26, 1933 (Sat): Volume activity
561
- - Closed on Sep 2, 1933 (Sat): Volume activity
562
- - Early Close 12pm on Sep 13, 1933 (Wed): NRA demonstration
563
- - Late Open 11am on Feb 20, 1934 (Tue): severe snowstorm
564
- - Late Open 11am on Jan 28, 1936 (Tue): King George V of England funeral
565
- - Closed on Dec 26, 1936 (Sat): Saturday after Christmas
566
- - Closed on May 29, 1937 (Sat): Saturday before Decoration Day
567
- - Closed on Jul 3, 1937 (Sat): Saturday before Independence Day
568
- - NOT IMPLEMENTED Break from 12-13:00 on May 18, 1942 (Mon): NYSE 150th anniversary
569
- - NOT IMPLEMENTED Break from 14:32-14:58 on Oct 22, 1942 (Thu): Civil Defense drill
570
- - NOT IMPLEMENTED Break from 14:38-14:59 on Oct 26, 1943 (Tue): Civil Defense drill
571
- - Reopened from 15:20-15:40 under special rule of the Board
572
- - Closed on Aug 19, 1944 (Sat)
573
- - Closed on Aug 26, 1944 (Sat)
574
- - Closed on Sep 2, 1944 (Sat)
575
- - Closed on Apr 14, 1945 (Sat): President Franklin D. Roosevelt National Day of mourning
576
- - NOT IMPLEMENTED Break 11:00-13:00 on Jun 19, 1945 (Tue): Parade for General Eisenhower
577
- - Closed on Saturdays Jul 7-Sep 1, 1945
578
- - Closed on Aug 15-16, 1945 (Wed-Thu): VJ Day. End of World War II
579
- - Closed on Oct 13, 1945 (Sat): Saturday after Columbus Day
580
- - Closed on Oct 27, 1945 (Sat): Navy Day
581
- - Closed on Dec 24, 1945 (Mon): Christmas Eve
582
- - Closed on Feb 23, 1946 (Sat): Saturday after Washington's birthday
583
- - Closed on May 25, 1946 (Sat): Railroad strike
584
- - Closed on Saturdays Jun 1-Sep 28, 1946 (Sat-Sat)
585
- - Closed on Saturdays May 31-Sep 27, 1947 (Sat-Sat)
586
- - Closed on Jan 3, 1948 (Sat): severe weather
587
- - Closed on Saturdays May 29-Sep 25, 1948 (Sat-Sat)
588
- - Closed on Saturdays May 28-Sep 4, 1948 (Sat-Sat)
589
- - Cosed on Dec 24, 1949 (Sat): Christmas Eve
590
- - Closed on Saturdays Jun 3-Sep 30, 1950 (Sat-Sat)
591
- - Closed on Dec 12, 1950 (Sat): Saturday before Christmas Eve
592
- - NOT IMPLEMENTED Break from 11:00-13:00 on Apr 20, 1951 (Fri): Parade for General MacArthur
593
- - Closed on Saturdays Jun 2-Sep 29, 1951 (Sat-Sat)
594
- - NOT IMPLEMENTED Break from 10:33-11:05 (Wed): Civil Defense Drill
595
- - Early Close 1pm on Dec 24, 1951 (Mon): Christmas Eve
596
- - Closed on Saturdays May 31-Sep 27, 1952 (Sat-Sat)
597
- - As of Sep 29, 1952 Saturdays were retired as trading days
598
- - As of Sep 29, 1952, M-F trading closes at 3:30pm (30 minutes longer)
599
- - NOT IMPLEMENTED Break 10:02-10:32 on Jun 14, 1954 (Mon): Civil Defense drill
600
- - Closed on Dec 24, 1954 (Fri): Christmas Eve
601
- - NOT IMPLEMENTED Break 14:05-14:35 on Jun 15, 1955 (Wed): Civil Defense drill
602
- - Closed on Dec 24, 1956 (Mon): Christmas Eve
603
- - NOT IMPLEMENTED Break 13:45-14:15 on Jul 12, 1957 (Fri): Civil Defense drill
604
- - NOT IMPLEMENTED Break 10:30-10:50 on May 6, 1958 (Tue): Civil Defense drill
605
- - Closed on Dec 26, 1958 (Fri): Day after Christmas
606
- - NOT IMPLEMENTED Break 13:30-13:50 on Apr 17, 1959 (Fri): Civil Defense drill
607
- - NOT IMPLEMENTED Break 14:16-14:40 on May 3, 1960 (Tue): Civil Defense drill
608
- - Late Open 11:00 on Dec 12, 1960 (Mon): severe snowstorm
609
- - Closed on May 29, 1961 (Mon): Day before Decoration Day
610
- - Early Close 14:07 on Nov 22, 1963 (Fri): President John F. Kennedy assassintion
611
- - Closed on Nov 25, 1963 (Mon): President John F. Kennedy funeral
612
- - Early Close 14:00 on Oct 23, 1964 (Fri): Former President Herbert C. Hoover funeral
613
- - NOT IMPLEMENTED Break 11:00-11:02 on Jan 25, 1965 (Mon): Sir Winston Churchill 2 minutes of silence
614
- - Late Open 11:05 on Nov 10, 1965 (Wed): Power failure in NY grid supply
615
- - Closed on Dec 24, 1965 (Fri): Christmas Eve
616
- - Early Closes 14:00 on Jan 6-14, 1966 (Thu-Fri): Transit strike
617
- - NOT IMPLEMENTED Break 13:00-13:01 on Feb 3, 1967 (Fri): Apollo I disaster moment of silence
618
- - Late Open 10:15 AND Early Close 14:00 on Feb 7, 1967 (Tue): snowstorm
619
- - NOT IMPLEMENTED Break 12:58-13:13 on May 17, 1967 (Wed): Vice President Humphrey spoke in honor of NYSE's 175th anniversary
620
- - Early Closes 14:00 on Aug 8-18, 1967 (Tue-Fri): Backlog catch up
621
- - Early Closes 14:00 on Jan 22-Mar 1, 1968 (Mon-Fri): Backlog catch up
622
- - Closed on Feb 12, 1968 (Mon): Lincoln's birthday (offices open, trading closed)
623
- - NOT IMPLEMENTED Break 11:00-11:01 on Apr 5, 1968 (Fri): Dr. Martin Luther King, Jr. moment of silence
624
- - Closed on Apr 9, 1968 (Tue): Martin Luther King, Jr. day or mourning
625
- - NOT IMPLEMENTED Break 11:00-11:02 on Jun 6, 1968 (Fri): Senator Robert F. Kennedy moment of silence
626
- - 4 day workweek Closed on a Wednesday OR Holiday from Jun 12-Dec 31, 1968: Paperwork crisis
627
- - Closed on July 5, 1968 (Fri): Day after Independence Day
628
- - Early Closes 14:00 on Jan 2-Jul 3, 1969: Paperwork Crisis
629
- - Closed on Feb 10, 1969 (Mon): heavy snow
630
- - Late open 11am on Feb 11, 1969 (Tue): heavy snow
631
- - NOT IMPLEMENTED Break 13:30-13:32 on Mar 28, 1969 (Fri): Former President Dwight D. Eisenhower moment of silence
632
- - Closed on Mar 31, 1969 (Mon): Former President Dwight D. Eisenhower funeral
633
- - Late Open 10:45 on Jun 2, 1969 (Mon): storm
634
- - Early Closes 14:30 on Jul 7-Sep 26,1969 (Mon-Fri): Paperwork Crisis
635
- - Closed on Jul 21, 1969 (Mon): National Day of Participation for lunar exploration
636
- - NOT IMPLEMENTED Break 12:35-13:05 on Sep 3, 1969 (Wed): power failure
637
- - Early Closes 15:00 on Sep 29, 1969 to May 1, 1970: Paperwork Crisis
638
- - Closed on Dec 28, 1972 (Thu): Former President Harry S. Truman funeral
639
- - Closed on Jan 25, 1973 (Thu): Former President Lyndon B. Johnson funeral
640
- - Late Open 11am on Dec 17, 1973 (Mon): ice storm
641
- - Late Open 10:15 on Jan 16, 1974 (Wed): Merrill Lynch computer trouble
642
- - NOT IMPLEMENTED Break 11:09-11:35 on Apr 10, 1974 (Wed): computer malfunction
643
- - NOT IMPLEMENTED Break 11:46-12:22 on Oct 15, 1974 (Wed): Ticker down at 11:37 to 12:22
644
- - Late Open 10:15 on Nov 22, 1974 (Fri): Fire drill
645
- - Early Close 14:00 on Dec 24, 1974 (Tue): Christmas Eve
646
- - NOT IMPLEMENTED Break 10:07-10:50 on Jan 7, 1975 (Tue): Computer stopped
647
- - NOT IMPLEMENTED Break 13:24-13:45 on Jan 15, 1975 (Wed): Computer stopped
648
- - NOT IMPLEMENTED Break 10:24-11:00 on Feb 7, 1975 (Fri): Computer failure
649
- - Early Close 14:30 on Feb 12, 1975 (Wed): snowstorm
650
- - NOT IMPLEMENTED Break 10:09-10:35 on Apr 9, 1975 (Wed): Computer stopped
651
- - Early Close 14:00 on Dec 24, 1975 (Wed): Christmas Eve
652
- - Late Open 11:15 on Feb 2, 1976 (Mon): storm
653
- - Late Open UNKNOWN (coded as 10:15) on Jun 8, 1976 (Tue): fire drill
654
- - Early Close 15:00 on Aug 9, 1976 (Mon): hurricane watch
655
- - NOT IMPLEMENTED Break 1 minute time UNKNOWN on Nov 4, 1976 (Thu): Former NYSE Chair Gustave L. Levy moment of silence
656
- - NOT IMPLEMENTED Break 11:00-11:01 on Feb 24, 1977 (Thu): Former NYSE Chair John A. Coleman moment of silence
657
- - NOT IMPLEMENTED Break 10:24-11:45 on Mar 1, 1977 (Tue): Fire on moving ramp between trading floor and Blue Room
658
- - Closed on July 14, 1977 (Thu): Power failure in NYC
659
- - Late Open 12pm on Jan 20, 1978 (Fri): snowstorm
660
- - Early Close 2pm on Feb 6, 1978 (Mon): snowstorm
661
- - Late Open 11am on Feb 7, 1978 (Tue): snowstorm
662
- - NOT IMPLEMENTED Break 1 minute time UNKNOWN on Dec 13, 1979 (Thu): Former NYSE Chair Robert L. Stott minute of silence
663
- - NOT IMPLEMENTED Break 11:11-12:04 on Oct 13, 1980 (Mon): Computer malfunction
664
- - NOT IMPLEMENTED Break 1 minute time UNKNOWN on Dec 30, 1980 (Tue): Former NYSE Chair James Crane Kellogg III moment of silence
665
- - Early Close 3:17pm on Mar 30, 1981 (Mon): President Reagan assassination attempt
666
- - Early Close 3:28pm on Sep 9, 1981 (Wed): Con Edison power failure
667
- - NOT IMPLEMENTED Break 12:26-12:45pm on Sep 16, 1981 (Wed): Fire alarm malfunction
668
- - NOT IMPLEMENTED Break 10:25-11:00am on Dec 28, 1982 (Tue): small fire
669
- - NOT IMPLEMENTED Break 13:51-15:30 on Oct 13, 1983 (Thu): low speed ticker malfunction
670
- - Closed on Sep 27, 1985 (Fri): Hurricane Gloria
671
- - NOT IMPLEMENTED Break 11:00-11:01 on Jan 29, 1986 (Wed): Challenger space crew moment of silence
672
- - Early Closes 2pm on Oct 23-30, 1987 (Fri-Fri): October 19th break volume
673
- - Early Closes 2:30pm on Nov 2-4, 1987 (Mon-Wed): reason not given volume assumed
674
- - Early Closes 3pm on Nov 5-6, 1987 (Thu-Fri): reason not given volume assumed
675
- - Early Closes 3:30pm on Nov 9-11, 1987 (Mon-Wed): Trading floor and clerical staff strike
676
- - Late Open 11am on Nov 10, 1989 (Fri): Electrical fire
677
- - NOT IMPLEMENTED Break 9:41-11:15 on Nov 23, 1990 (Fri): Internal power failure
678
- - Early Close 2pm on Dec 24, 1990 (Mon): Christmas Eve
679
- - Late Open 11am on Dec 27, 1990 (Thu): explosion of Con Edison transformer
680
- - Late Open 9:31am on Jan 17, 1991 (Thu): American troops in Persian Gulf moment of silence
681
- - Late Open 9:31am on Feb 25, 1991 (Thu): American troops in Persian Gulf moment of silence
682
- - NOT IMPLEMENTED Break 10:21-10:45am on Oct 22, 1991 (Tue): power dip
683
- - Early Close 2pm on Dec 24, 1991 (Tue): Christmas Eve
684
- - NOT IMPLEMENTED Break 1 minute time UNKNOWN on Mar 19, 1992 (Thu): Former NYSE Chair Bernard J. Lasker moment of silence
685
- - NOT IMPLEMENTED Break 1 minute time UNKNOWN on May 15, 1992 (Fri): Former NYSE President G. Keith Funston moment of silence
686
- - NOT IMPELMENTED Break 1 minute time UNKNOWN on Jun 15, 1992 (Mon): Former NYSE President Robert W. Haack moment of silence
687
- - Early Close 2pm on Nov 27, 1992 (Fri): Day after Thanksgiving
688
- - Early Close 2pm on Dec 24, 1992 (Thu): Christmas Eve
689
- - Early Close 1pm on Nov 26, 1993 (Fri): Day after Thanksgiving
690
- - Early Close 14:30 on Feb 11, 1994 (Fri): snowstorm
691
- - NOT IMPLEMENTED Break 12:00-12:02 on Apr 25, 1994 (Mon): Former President Richard M. Nixon moment of silence
692
- - Closed on Apr 27, 1994 (Wed): Former President Richard M. Nixon funderal
693
- - Early Close 1pm on Nov 25, 1994 (Fri): Day after Thanksgiving
694
- - NOT IMPLEMENTED Break 10:02-10:03 on Apr 26, 1995 (Wed): Oklahoma City bombing victims moment of silence
695
- - Early Close 1pm on Jul 3, 1995 (Mon): Day before Independence Day
696
- - Early Close 1pm on Nov 24, 1995 (Fri): Day after Thanksgiving
697
- - Late Open 10:30am on Dec 18, 1995 (Mon): Computer system troubles
698
- - Late Open 11am AND Early Close 2pm on Jan 8, 1996 (Mon): snowstorm
699
- - NOT IMPLEMENTED Break time UNKNOWN on Apr 4, 1996 (Thu): Commerce Secretary Ron Brown and others killed in Balkans plane crash
700
- - Early Close 1pm on July 5, 1996 (Fri): Day after Independence Day
701
- - Early Close 1pm on Nov 29, 1996 (Fri): Day after Thanksgiving
702
- - Early Close 1pm on Dec 24, 1996 (Tue): Christmas Eve
703
- - Early Close 1pm on Jul 3, 1997 (Thu): Day before Independence Day
704
- - NOT IMPLEMENTED Break 14:35-15:05 on Oct 27, 1997 (Mon): Circuit breaker triggered
705
- - Early Close 3:30pm on Oct 27, 1997 (Mon): Circuit breaker triggered
706
- - Early Close 1pm on Nov 28, 1997 (Fri): Day after Thanksgiving
707
- - Early Close 1pm on Dec 24, 1997 (Wed): Christmas Eve
708
- - Early Close 1pm on Dec 26, 1997 (Fri): Friday after Christmas
709
- - NOT IMPLEMENTED Break time UNKNOWN on Jul 29, 1998 (Wed): Former NYSE President William McChesney Marting, Jr. moment of silence
710
- - NOT IMPLEMENTED Break 13:16-14:15 on Oct 26, 1998 (Mon): Computer switch malfunction
711
- - Early Close 1pm on Nov 27, 1998 (Fri): Day after Thanksgiving
712
- - Early Close 1pm on Dec 24, 1998 (Thu): Christmas Eve
713
- - NOT IMPLEMENTED Break 10:00-10:02 on Mar 25, 1999 (Thu): NATO troops in Kosovo minute of silence
714
- - NOT IMPLEMENTED Break 12:00-12:02 on Apr 26, 1999 (Mon): Columbine High School killings moment of silence
715
- - Early Close 1pm on Nov 26, 1999 (Fri): Day after Thanksgiving
716
- - Early Close 1pm on Dec 24, 1999 (Fri): Christmas Eve
717
- - NOT IMPLEMENTED Break 12:00-12:01 on Feb 16, 2000 (Wed): Former NYSE Chair Walter N. Frank moment of silence
718
- - NOT IMPLEMENTED Break 12:00-12:01 on May 4, 2000 (Thu): Archbishop of NY Cardinal John O'Connor moment of silence
719
- - Early Close 1pm on Jul 3, 2000 (Mon): Day before Independence Day
720
- - Early Close 1pm on Nov 24, 2000 (Fri): Day after Thanksgiving
721
- - NOT IMPLEMENTED Break 10:10-11:35 on Jun 8, 2001 (Fri): computer systems connectivity problem
722
- - Early Close 1pm on Jul 3, 2001 (Tue): Day before Independence Day
723
- - Closed on Sep 11-14, 2001 (Tue-Fri): Terrorist attack on World Trade Center
724
- - Late Open 9:33am on Sep 17, 2001 (Mon): 2 minutes silence in honor of lives lost on 9/11
725
- - Late Open 9:31am on Oct 8, 2001 (Mon): 1 minute silence for troops engaged in Operation Enduring Freedom
726
- - Early Close 1pm on Nov 23, 2001 (Fri): Day after Thanksgiving
727
- - Early Close 1pm on Dec 24, 2001 (Mon): Christmas Eve
728
- - NOT IMPLEMENTED Break 10:29-10:31 on May 30, 2002 (Thu): Commemorate end of recovery work at Ground Zero
729
- - Early Close 1pm on Jul 5, 2002 (Fri): Day after Independence Day
730
- - Late Opening 12:00pm on Sep 11, 2002 (Wed): 1 year anniversary of 9/11 attack
731
- - Early Close 1pm on Nov 29, 2002 (Fri): Day after Thanksgiving
732
- - Early Close 1pm on Dec 24, 2002 (Tue): Christmas Eve
733
- - NOT IMPLEMENTED Break 11:00-11:02 on Feb 3, 2002 (Mon): Columbia Space Shuttle lives lost moment of silence
734
- - Late Opening 9:32am on Mar 20, 2003 (Thu): Operation Iraqi Freedom Troops moment of silence
735
- - Early Close 1pm on Jul 3, 2003 (Thu): Day before Independence Day
736
- - NOT IMPLEMENTED multiple 1-minute Breaks 9:59 and 10:29 on Sep 11, 2003 (Thu): 9/11 Commemoration
737
- - Early Close 1pm on Nov 28, 2003 (Fri): Day after Thanksgiving
738
- - Early Close 1pm on Dec 24, 2003 (Wed): Christmas Eve
739
- - Early Close 1pm on Dec 26, 2003 (Fri): Friday after Christmas
740
- - Late Open 9:32am on Jun 7, 2004 (Mon): Former President Ronald Reagan death moment of silence
741
- - Closed on Jun 11, 2004 (Fri): Former President Ronald Reagan National Day of Mourning
742
- - Early Close 1pm on Nov 26, 2004 (Fri): Day after Thanksgiving
743
- - Early Close 3:56pm on Jun 1, 2005 (Wed): Systems communication problem
744
- - Early Close 1pm on Nov 25, 2005 (Fri): Day after Thanksgiving
745
- - Early Close 1pm on Jul 3, 2006 (Mon): Day before Independence Day
746
- - Early Close 1pm on Nov 24, 2006 (Fri): Day after Thanksgiving
747
- - Late Open 9:32am on Dec 27, 2006 (Wed): Former President Gerald Ford moment of silence
748
- - Closed on Jan 2, 2007 (Tue): Former President Gerald Ford National Day of Mourning
749
- - Early Close 1pm on Jul 3, 2007 (Tue): Day before Independence Day
750
- - Early Close 1pm on Nov 23, 2007 (Fri): Day after Thanksgiving
751
- - Early Close 1pm on Dec 24, 2007 (Mon): Christmas Eve
752
- - Early Close 1pm on Jul 4, 2008 (Thu): Day before Independence Day
753
- - Early Close 1pm on Nov 28, 2008 (Fri): Day after Thanksgiving
754
- - Early Close 1pm on Dec 24, 2008 (Wed): Christmas Eve
755
- - NOT IMPLEMENTED Extended Close 4:15pm on Jul 2, 2009 (Thu): Execute customer orders impacted by system irregularities
756
- - Early Close 1pm on Nov 27, 2009 (Fri): Day after Thanksgiving
757
- - Early Close 1pm on Dec 24, 2009 (Thu): Christmas Eve
758
- - Early Close 1pm on Nov 26, 2010 (Fri): Day after Thanksgiving
759
- - NOT IMPLEMENTED Break 11:00-11:01 on Jan 10, 2011 (Mon): Arizona shooting victims moment of silence
760
-
761
- end of reference: https://github.com/rsheftel/pandas_market_calendars/files/6827110/Stocks.NYSE-Closings.pdf
762
- *******************************************************************
763
-
764
- https://www.streetinsider.com/Insiders+Blog/NYSE+Releases+2010+and+2011+Holiday+Calendar/4915576.html
765
- - Early Close 1pm on Nov 25, 2011 (Fri): Day after Thanksgiving
766
-
767
- https://holidaystracker.com/stock-market/new-york-stock-exchange-holidays-2012/
768
- - Early Close 1pm on Jul 4, 2012 (Tue): Day before Independence Day
769
- - Closed on 10/29/2012 and 10/30/2012 due to Hurricane Sandy.
770
- - Early Close 1pm on Nov 23, 2012 (Fri): Day after Thanksgiving
771
- - Early Close 1pm on Dec 24, 2012 (Mon): Christmas Eve
772
-
773
- https://holidaystracker.com/stock-market/new-york-stock-exchange-nyse-holidays-2013/
774
- - Early Close 1pm on Jul 3, 2013 (Wed): Day before Independence Day
775
- - Early Close 1pm on Nov 29, 2013 (Fri): Day after Thanksgiving
776
- - Early Close 1pm on Dec 24, 2013 (Tue): Christmas Eve
777
-
778
- https://www.streetinsider.com/Insiders+Blog/NYSE+2014+and+2015+Holiday+Hours/8999575.html - Early Close 1pm on Jul 3, 2014 (Thu): Day before Independence Day
779
- - Early Close 1pm on Jul 3, 2014 (Thu): Day before Independence Day
780
- - Early Close 1pm on Nov 28, 2014 (Fri): Day after Thanksgiving
781
- - Early Close 1pm on Dec 24, 2014 (Wed): Christmas Eve
782
-
783
- https://www.businesswire.com/news/home/20141208006349/en/NYSE-Group-2016-Holiday-Calendar-and-Early-Closings
784
- - Early Close 1pm on Nov 27, 2015 (Fri): Day after Thanksgiving
785
- - Early Close 1pm on Dec 24, 2015 (Thu): Christmas Eve
786
- - Early Close 1pm on Nov 25, 2016 (Fri): Day after Thanksgiving
787
-
788
- https://www.stockinvestor.com/30380/stock-market-holidays-2017/
789
- - Early Close 1pm on Jul 3, 2017 (Mon): Day before Independence Day
790
- - Early Close 1pm on Nov 24, 2017 (Fri): Day after Thanksgiving
791
- - Early Close 1pm on Jul 3, 2018 (Tue): Day before Independence Day
792
- - Early Close 1pm on Nov 23, 2018 (Fri): Day after Thanksgiving
793
- - Closed on 12/5/2018 due to George H.W. Bush's death.
794
- - Early Close 1pm on Dec 24, 2018 (Tue): Christmas Eve
795
- - Early Close 1pm on Jul 3, 2019 (Wed): Day before Independence Day
796
- - Early Close 1pm on Nov 29, 2019 (Fri): Day after Thanksgiving
797
- - Early Close 1pm on Dec 24, 2019 (Wed): Christmas Eve
798
-
799
- https://holidaystracker.com/stock-market/new-york-stock-exchange-nyse-holidays-2020/
800
- - Early Close 1pm on Nov 27, 2020 (Fri): Day after Thanksgiving
801
- - Early Close 1pm on Dec 24, 2020 (Thu): Christmas Eve
802
-
803
-
804
- NOTE: The exchange was **not** closed early on Friday December 26, 2008,
805
- nor was it closed on Friday December 26, 2014. The next Thursday Christmas
806
- will be in 2025. If someone is still maintaining this code in 2025, then
807
- we've done alright...and we should check if it's a half day.
808
-
809
- """
810
-
811
- aliases = ["NYSE", "stock", "NASDAQ", "BATS", "DJIA", "DOW"]
812
-
813
- regular_market_times = {
814
- "pre": ((None, time(4)),),
815
- "market_open": ((None, time(10)), ("1985-01-01", time(9, 30))),
816
- "market_close": (
817
- (None, time(15)),
818
- ("1952-09-29", time(15, 30)),
819
- ("1974-01-01", time(16)),
820
- ),
821
- "post": ((None, time(20)),),
822
- }
823
-
824
- _saturday_close = time(12)
825
- _saturday_end = pd.Timestamp("1952-09-29", tz="UTC")
826
-
827
- @property
828
- def name(self):
829
- return "NYSE"
830
-
831
- @property
832
- def full_name(self):
833
- return "New York Stock Exchange"
834
-
835
- @property
836
- def tz(self):
837
- return ZoneInfo("America/New_York")
838
-
839
- @property
840
- def weekmask(self):
841
- return "Mon Tue Wed Thu Fri"
842
-
843
- @property
844
- def weekmask_pre_1952(self):
845
- return "Mon Tue Wed Thu Fri Sat"
846
-
847
- def holidays_pre_1952(self):
848
- """
849
- NYSE Market open on Saturdays pre 5/24/1952.
850
- CustomBusinessDay object that can be used inplace of holidays() for dates prior to crossover
851
-
852
- :return: CustomBusinessDay object of holidays
853
- """
854
- if hasattr(self, "_holidays_hist"):
855
- return self._holidays_hist
856
-
857
- self._holidays_hist = CustomBusinessDay(
858
- holidays=self.adhoc_holidays,
859
- calendar=self.regular_holidays,
860
- weekmask=self.weekmask_pre_1952,
861
- )
862
- return self._holidays_hist
863
-
864
- @property
865
- def regular_holidays(self):
866
- return AbstractHolidayCalendar(
867
- rules=[
868
- USNewYearsDayNYSEpost1952,
869
- USNewYearsDayNYSEpre1952,
870
- USMartinLutherKingJrAfter1998,
871
- USPresidentsDay,
872
- USWashingtonsBirthDayBefore1952,
873
- USWashingtonsBirthDay1952to1963,
874
- USWashingtonsBirthDay1964to1970,
875
- USLincolnsBirthDayBefore1954,
876
- GoodFriday,
877
- GoodFridayPre1898,
878
- GoodFriday1899to1905,
879
- USMemorialDay,
880
- USMemorialDayBefore1952,
881
- USMemorialDay1952to1964,
882
- USMemorialDay1964to1969,
883
- USIndependenceDay,
884
- USIndependenceDayPre1952,
885
- USIndependenceDay1952to1954,
886
- USLaborDayStarting1887,
887
- USColumbusDayBefore1954,
888
- USElectionDay1848to1967,
889
- USVeteransDay1934to1953,
890
- USThanksgivingDay,
891
- USThanksgivingDayBefore1939,
892
- USThanksgivingDay1939to1941,
893
- ChristmasNYSE,
894
- Christmas54to98NYSE,
895
- ChristmasBefore1954,
896
- USJuneteenthAfter2022,
897
- ]
898
- )
899
-
900
- @property
901
- def adhoc_holidays(self):
902
- return list(
903
- chain(
904
- # Recurring Holidays
905
- SatAfterGoodFridayAdhoc,
906
- MonBeforeIndependenceDayAdhoc,
907
- SatBeforeIndependenceDayAdhoc,
908
- SatAfterIndependenceDayAdhoc,
909
- DaysAfterIndependenceDayAdhoc,
910
- SatBeforeLaborDayAdhoc,
911
- USElectionDay1968to1980Adhoc,
912
- FridayAfterThanksgivingAdHoc,
913
- SatBeforeChristmasAdhoc,
914
- SatAfterChristmasAdhoc,
915
- ChristmasEvesAdhoc,
916
- DayAfterChristmasAdhoc,
917
- # Retired
918
- USVetransDayAdHoc,
919
- SatAfterColumbusDayAdHoc,
920
- LincolnsBirthDayAdhoc,
921
- GrantsBirthDayAdhoc,
922
- SatBeforeNewYearsAdhoc,
923
- SatBeforeWashingtonsBirthdayAdhoc,
924
- SatAfterWashingtonsBirthdayAdhoc,
925
- SatBeforeAfterLincolnsBirthdayAdhoc,
926
- SatBeforeDecorationAdhoc,
927
- SatAfterDecorationAdhoc,
928
- DayBeforeDecorationAdhoc,
929
- # Irregularities
930
- UlyssesGrantFuneral1885,
931
- ColumbianCelebration1892,
932
- GreatBlizzardOf1888,
933
- WashingtonInaugurationCentennialCelebration1889,
934
- CharterDay1898,
935
- WelcomeNavalCommander1898,
936
- AdmiralDeweyCelebration1899,
937
- GarretHobartFuneral1899,
938
- QueenVictoriaFuneral1901,
939
- MovedToProduceExchange1901,
940
- EnlargedProduceExchange1901,
941
- McKinleyDeathAndFuneral1901,
942
- KingEdwardVIIcoronation1902,
943
- NYSEnewBuildingOpen1903,
944
- HudsonFultonCelebration1909,
945
- JamesShermanFuneral1912,
946
- OnsetOfWWI1914,
947
- WeatherHeatClosing1917,
948
- DraftRegistrationDay1917,
949
- WeatherNoHeatClosing1918,
950
- DraftRegistrationDay1918,
951
- ArmisticeSigned1918,
952
- Homecoming27Division1919,
953
- ParadeOf77thDivision1919,
954
- BacklogRelief1919,
955
- GeneralPershingReturn1919,
956
- OfficeLocationChange1920,
957
- HardingDeath1923,
958
- HardingFuneral1923,
959
- LindberghParade1927,
960
- BacklogRelief1928,
961
- BacklogRelief1929,
962
- CoolidgeFuneral1933,
963
- BankHolidays1933,
964
- HeavyVolume1933,
965
- SatClosings1944,
966
- RooseveltDayOfMourning1945,
967
- SatClosings1945,
968
- VJday1945,
969
- NavyDay1945,
970
- RailroadStrike1946,
971
- SatClosings1946,
972
- SatClosings1947,
973
- SatClosings1948,
974
- SevereWeather1948,
975
- SatClosings1949,
976
- SatClosings1950,
977
- SatClosings1951,
978
- SatClosings1952,
979
- KennedyFuneral1963,
980
- MLKdayOfMourning1968,
981
- PaperworkCrisis1968,
982
- SnowClosing1969,
983
- EisenhowerFuneral1969,
984
- FirstLunarLandingClosing1969,
985
- TrumanFuneral1972,
986
- JohnsonFuneral1973,
987
- NewYorkCityBlackout77,
988
- HurricaneGloriaClosings1985,
989
- NixonFuneral1994,
990
- ReaganMourning2004,
991
- FordMourning2007,
992
- September11Closings2001,
993
- HurricaneSandyClosings2012,
994
- GeorgeHWBushDeath2018,
995
- JimmyCarterDeath2025,
996
- )
997
- )
998
-
999
- @property
1000
- def special_closes(self):
1001
- return [
1002
- (
1003
- time(11, tzinfo=ZoneInfo("America/New_York")),
1004
- AbstractHolidayCalendar(
1005
- rules=[
1006
- KingEdwardDeath11amyClose1910,
1007
- ]
1008
- ),
1009
- ),
1010
- (
1011
- time(12, tzinfo=ZoneInfo("America/New_York")),
1012
- AbstractHolidayCalendar(
1013
- rules=[
1014
- ParadeOfNationalGuardEarlyClose1917,
1015
- LibertyDay12pmEarlyClose1917,
1016
- LibertyDay12pmEarlyClose1918,
1017
- WallStreetExplosionEarlyClose1920,
1018
- NRAdemonstration12pmEarlyClose1933,
1019
- ]
1020
- ),
1021
- ),
1022
- (
1023
- time(hour=12, minute=30, tzinfo=ZoneInfo("America/New_York")),
1024
- AbstractHolidayCalendar(
1025
- rules=[
1026
- RooseveltFuneral1230EarlyClose1919,
1027
- WoodrowWilsonFuneral1230EarlyClose1924,
1028
- TaftFuneral1230EarlyClose1930,
1029
- GasFumesOnTradingFloor1230EarlyClose1933,
1030
- ]
1031
- ),
1032
- ),
1033
- (
1034
- time(13, tzinfo=ZoneInfo("America/New_York")),
1035
- AbstractHolidayCalendar(
1036
- rules=[
1037
- FridayAfterIndependenceDayNYSEpre2013,
1038
- MonTuesThursBeforeIndependenceDay,
1039
- WednesdayBeforeIndependenceDayPost2013,
1040
- DayAfterThanksgiving1pmEarlyCloseInOrAfter1993,
1041
- ChristmasEvePost1999Early1pmClose,
1042
- GroverClevelandFuneral1pmClose1908,
1043
- ]
1044
- ),
1045
- ),
1046
- (
1047
- time(14, tzinfo=ZoneInfo("America/New_York")),
1048
- AbstractHolidayCalendar(
1049
- rules=[
1050
- DayAfterThanksgiving2pmEarlyCloseBefore1993,
1051
- HooverFuneral1400EarlyClose1964,
1052
- Snow2pmEarlyClose1967,
1053
- Snow2pmEarlyClose1978,
1054
- Snow2pmEarlyClose1996,
1055
- ]
1056
- ),
1057
- ),
1058
- (
1059
- time(14, 7, tzinfo=ZoneInfo("America/New_York")),
1060
- AbstractHolidayCalendar(
1061
- rules=[
1062
- KennedyAssassination1407EarlyClose,
1063
- ]
1064
- ),
1065
- ),
1066
- (
1067
- time(hour=14, minute=30, tzinfo=ZoneInfo("America/New_York")),
1068
- AbstractHolidayCalendar(
1069
- rules=[
1070
- FalseArmisticeReport1430EarlyClose1918,
1071
- CromwellFuneral1430EarlyClose1925,
1072
- Snow230EarlyClose1975,
1073
- Snow230pmEarlyClose1994,
1074
- ]
1075
- ),
1076
- ),
1077
- (
1078
- time(15, tzinfo=ZoneInfo("America/New_York")),
1079
- AbstractHolidayCalendar(
1080
- rules=[
1081
- HurricaneWatch3pmEarlyClose1976,
1082
- ]
1083
- ),
1084
- ),
1085
- (
1086
- time(15, 17, tzinfo=ZoneInfo("America/New_York")),
1087
- AbstractHolidayCalendar(
1088
- rules=[
1089
- ReaganAssassAttempt317pmEarlyClose1981,
1090
- ]
1091
- ),
1092
- ),
1093
- (
1094
- time(15, 28, tzinfo=ZoneInfo("America/New_York")),
1095
- AbstractHolidayCalendar(
1096
- rules=[
1097
- ConEdPowerFail328pmEarlyClose1981,
1098
- ]
1099
- ),
1100
- ),
1101
- (
1102
- time(15, 30, tzinfo=ZoneInfo("America/New_York")),
1103
- AbstractHolidayCalendar(
1104
- rules=[
1105
- CircuitBreakerTriggered330pmEarlyClose1997,
1106
- ]
1107
- ),
1108
- ),
1109
- (
1110
- time(15, 56, tzinfo=ZoneInfo("America/New_York")),
1111
- AbstractHolidayCalendar(
1112
- rules=[
1113
- SystemProb356pmEarlyClose2005,
1114
- ]
1115
- ),
1116
- ),
1117
- ]
1118
-
1119
- @property
1120
- def special_closes_adhoc(self):
1121
- def _union_many(indexes):
1122
- # Merges a list of pd.DatetimeIndex objects, returns merged DatetimeIndex
1123
- union_index = pd.DatetimeIndex([], tz="UTC")
1124
- for index in indexes:
1125
- union_index = union_index.union(index)
1126
- return union_index
1127
-
1128
- return [
1129
- (
1130
- time(13, tzinfo=ZoneInfo("America/New_York")),
1131
- # DaysBeforeIndependenceDay1pmEarlyCloseAdhoc # list
1132
- ChristmasEve1pmEarlyCloseAdhoc
1133
- + DayAfterChristmas1pmEarlyCloseAdhoc
1134
- + BacklogRelief1pmEarlyClose1929,
1135
- ),
1136
- (
1137
- time(14, tzinfo=ZoneInfo("America/New_York")),
1138
- _union_many(
1139
- [
1140
- pd.DatetimeIndex(
1141
- ChristmasEve2pmEarlyCloseAdhoc
1142
- + HeavyVolume2pmEarlyClose1933
1143
- )
1144
- ]
1145
- + [
1146
- BacklogRelief2pmEarlyClose1928,
1147
- TransitStrike2pmEarlyClose1966, # index
1148
- Backlog2pmEarlyCloses1967, # index
1149
- Backlog2pmEarlyCloses1968, # index
1150
- PaperworkCrisis2pmEarlyCloses1969, # index
1151
- Backlog2pmEarlyCloses1987,
1152
- ]
1153
- ), # index
1154
- ),
1155
- (
1156
- time(14, 30, tzinfo=ZoneInfo("America/New_York")),
1157
- _union_many(
1158
- [PaperworkCrisis230pmEarlyCloses1969, Backlog230pmEarlyCloses1987]
1159
- ), # index
1160
- ),
1161
- (
1162
- time(15, tzinfo=ZoneInfo("America/New_York")),
1163
- _union_many(
1164
- [PaperworkCrisis3pmEarlyCloses1969to1970, Backlog3pmEarlyCloses1987]
1165
- ), # index
1166
- ),
1167
- (
1168
- time(15, 30, tzinfo=ZoneInfo("America/New_York")),
1169
- Backlog330pmEarlyCloses1987, # index
1170
- ),
1171
- ]
1172
-
1173
- @property
1174
- def special_opens(self):
1175
- return [
1176
- (
1177
- time(hour=9, minute=31, tzinfo=ZoneInfo("America/New_York")),
1178
- AbstractHolidayCalendar(
1179
- rules=[
1180
- ConEdXformer931amLateOpen1990,
1181
- EnduringFreedomMomentSilence931amLateOpen2001,
1182
- ]
1183
- ),
1184
- ),
1185
- (
1186
- time(hour=9, minute=32, tzinfo=ZoneInfo("America/New_York")),
1187
- AbstractHolidayCalendar(
1188
- rules=[
1189
- IraqiFreedom932amLateOpen2003,
1190
- ReaganMomentSilence932amLateOpen2004,
1191
- FordMomentSilence932amLateOpen2006,
1192
- ]
1193
- ),
1194
- ),
1195
- (
1196
- time(hour=9, minute=33, tzinfo=ZoneInfo("America/New_York")),
1197
- AbstractHolidayCalendar(
1198
- rules=[
1199
- Sept11MomentSilence933amLateOpen2001,
1200
- ]
1201
- ),
1202
- ),
1203
- (
1204
- time(hour=10, minute=15, tzinfo=ZoneInfo("America/New_York")),
1205
- AbstractHolidayCalendar(
1206
- rules=[
1207
- Snow1015LateOpen1967,
1208
- MerrillLynchComputer1015LateOpen1974,
1209
- FireDrill1015LateOpen1974,
1210
- FireDrill1015LateOpen1976,
1211
- ]
1212
- ),
1213
- ),
1214
- (
1215
- time(hour=10, minute=30, tzinfo=ZoneInfo("America/New_York")),
1216
- AbstractHolidayCalendar(
1217
- rules=[
1218
- TrafficBlockLateOpen1919,
1219
- TrafficBlockLateOpen1920,
1220
- Computer1030LateOpen1995,
1221
- ]
1222
- ),
1223
- ),
1224
- (
1225
- time(hour=10, minute=45, tzinfo=ZoneInfo("America/New_York")),
1226
- AbstractHolidayCalendar(
1227
- rules=[
1228
- EclipseOfSunLateOpen1925,
1229
- Storm1045LateOpen1969,
1230
- ]
1231
- ),
1232
- ),
1233
- (
1234
- time(11, tzinfo=ZoneInfo("America/New_York")),
1235
- AbstractHolidayCalendar(
1236
- rules=[
1237
- Snow11amLateOpen1934,
1238
- KingGeorgeVFuneral11amLateOpen1936,
1239
- Snow11amLateOpening1960,
1240
- Snow11amLateOpen1969,
1241
- Ice11amLateOpen1973,
1242
- Snow11amLateOpen1978,
1243
- Fire11amLateOpen1989,
1244
- Snow11amLateOpen1996,
1245
- ]
1246
- ),
1247
- ),
1248
- (
1249
- time(11, 5, tzinfo=ZoneInfo("America/New_York")),
1250
- AbstractHolidayCalendar(
1251
- rules=[
1252
- PowerFail1105LateOpen,
1253
- ]
1254
- ),
1255
- ),
1256
- (
1257
- time(11, 15, tzinfo=ZoneInfo("America/New_York")),
1258
- AbstractHolidayCalendar(
1259
- rules=[
1260
- Storm1115LateOpen1976,
1261
- ]
1262
- ),
1263
- ),
1264
- (
1265
- time(12, tzinfo=ZoneInfo("America/New_York")),
1266
- AbstractHolidayCalendar(
1267
- rules=[
1268
- KingEdwardFuneral12pmOpen1910,
1269
- JPMorganFuneral12pmOpen1913,
1270
- WilliamGaynorFuneral12pmOpen1913,
1271
- Snow12pmLateOpen1978,
1272
- Sept11Anniversary12pmLateOpen2002,
1273
- ]
1274
- ),
1275
- ),
1276
- (
1277
- time(13, tzinfo=ZoneInfo("America/New_York")),
1278
- AbstractHolidayCalendar(
1279
- rules=[
1280
- AnnunciatorBoardFire1pmLateOpen1921,
1281
- ]
1282
- ),
1283
- ),
1284
- ]
1285
-
1286
- @property
1287
- def special_opens_adhoc(self):
1288
- return [
1289
- (
1290
- time(9, 31, tzinfo=ZoneInfo("America/New_York")),
1291
- TroopsInGulf931LateOpens1991,
1292
- ),
1293
- (
1294
- time(11, tzinfo=ZoneInfo("America/New_York")),
1295
- HeavyVolume11amLateOpen1933,
1296
- ),
1297
- (
1298
- time(12, tzinfo=ZoneInfo("America/New_York")),
1299
- BacklogRelief12pmLateOpen1929 + HeavyVolume12pmLateOpen1933,
1300
- ),
1301
- ]
1302
-
1303
- # Override market_calendar.py to split calc between pre & post 1952 Saturday Close
1304
- def valid_days(self, start_date, end_date, tz="UTC"):
1305
- """
1306
- Get a DatetimeIndex of valid open business days.
1307
-
1308
- :param start_date: start date
1309
- :param end_date: end date
1310
- :param tz: time zone in either string or pytz.timezone
1311
- :return: DatetimeIndex of valid business days
1312
- """
1313
- start_date = pd.Timestamp(start_date)
1314
- end_date = pd.Timestamp(end_date)
1315
- start_date = start_date.tz_convert(tz) if start_date.tz else start_date.tz_localize(tz)
1316
- end_date = end_date.tz_convert(tz) if end_date.tz else end_date.tz_localize(tz)
1317
-
1318
- # Starting Monday Sept. 29, 1952, no more saturday trading days
1319
- if tz is None:
1320
- saturday_end = self._saturday_end.tz_localize(None)
1321
- else:
1322
- saturday_end = self._saturday_end
1323
-
1324
- # Don't care about Saturdays. Call super.
1325
- if start_date > saturday_end:
1326
- return super().valid_days(start_date, end_date, tz=tz)
1327
-
1328
- # Full Date Range is pre 1952. Augment the Super call
1329
- if end_date <= saturday_end:
1330
- return pd.date_range(
1331
- start_date,
1332
- end_date,
1333
- freq=self.holidays_pre_1952(),
1334
- normalize=True,
1335
- tz=tz,
1336
- )
1337
-
1338
- # Range is split across 1952. Concatenate Two different Date_Range calls
1339
- days_pre = pd.date_range(
1340
- start_date,
1341
- saturday_end,
1342
- freq=self.holidays_pre_1952(),
1343
- normalize=True,
1344
- tz=tz,
1345
- )
1346
- days_post = pd.date_range(saturday_end, end_date, freq=self.holidays(), normalize=True, tz=tz)
1347
- return days_pre.union(days_post)
1348
-
1349
- def days_at_time(self, days, market_time, day_offset=0):
1350
- days = super().days_at_time(days, market_time, day_offset=day_offset)
1351
-
1352
- if market_time == "market_close" and not self.is_custom(market_time):
1353
- days = days.dt.tz_convert(self.tz)
1354
- days = days.where(
1355
- days.dt.weekday != 5,
1356
- days.dt.normalize() + self._tdelta(self._saturday_close),
1357
- )
1358
- days = days.dt.tz_convert("UTC")
1359
- return days
1360
-
1361
- def date_range_htf(
1362
- self,
1363
- frequency: Union[str, pd.Timedelta, int, float],
1364
- start: Union[str, pd.Timestamp, int, float, None] = None,
1365
- end: Union[str, pd.Timestamp, int, float, None] = None,
1366
- periods: Union[int, None] = None,
1367
- closed: Union[Literal["left", "right"], None] = "right",
1368
- *,
1369
- day_anchor: u.Day_Anchor = "SUN",
1370
- month_anchor: u.Month_Anchor = "JAN",
1371
- ) -> pd.DatetimeIndex:
1372
- # __doc__ = MarketCalendar.date_range_htf.__doc__
1373
-
1374
- start, end, periods = u._error_check_htf_range(start, end, periods)
1375
-
1376
- args = {
1377
- "frequency": frequency,
1378
- "start": start,
1379
- "end": end,
1380
- "periods": periods,
1381
- "closed": closed,
1382
- "day_anchor": day_anchor,
1383
- "month_anchor": month_anchor,
1384
- }
1385
-
1386
- saturday_end = self._saturday_end.tz_localize(None)
1387
-
1388
- # All Dates post 1952 This is the most common use case so return it first
1389
- if start is not None and start > saturday_end:
1390
- return u.date_range_htf(self.holidays(), **args)
1391
-
1392
- # ---- Start-Date to End-Date w/ pre-1952 ----
1393
- if start is not None and end is not None:
1394
- if end <= saturday_end:
1395
- # All pre 1952 Dates
1396
- return u.date_range_htf(self.holidays_pre_1952(), **args)
1397
- else:
1398
- # Split Range Across 1952
1399
- pre = u.date_range_htf( # Only Generate to the last saturday
1400
- self.holidays_pre_1952(), **(args | {"end": saturday_end})
1401
- )
1402
- post = u.date_range_htf( # start generating from the last date of 'pre'
1403
- self.holidays(), **(args | {"start": pre[-1]})
1404
- )
1405
- return pd.DatetimeIndex(pre.union(post), dtype="datetime64[ns]")
1406
-
1407
- # ---- Periods from Start-Date w/ pre-1952 ----
1408
- elif start is not None and periods is not None:
1409
- # Start prior to 1952 & Number of periods given
1410
- rtn_dt = u.date_range_htf(self.holidays_pre_1952(), **args)
1411
- if rtn_dt[-1] <= saturday_end:
1412
- return rtn_dt # never passed 1952, good to return
1413
-
1414
- # Date Range Split.
1415
- pre = rtn_dt[rtn_dt <= saturday_end]
1416
- post = u.date_range_htf(
1417
- self.holidays(),
1418
- **(args | {"start": pre[-1], "periods": periods - len(pre) + 1}),
1419
- )
1420
- return pd.DatetimeIndex(pre.union(post)[:periods], dtype="datetime64[ns]")
1421
-
1422
- # ---- Periods from End-Date ----
1423
- elif end is not None and periods is not None:
1424
- if end <= saturday_end:
1425
- # All Dates pre-1952, Good to return the normal call
1426
- return u.date_range_htf(self.holidays_pre_1952(), **args)
1427
- else:
1428
- rtn_dt = u.date_range_htf(self.holidays(), **args)
1429
-
1430
- if rtn_dt[0] > saturday_end:
1431
- return rtn_dt # never passed 1952, good to return
1432
-
1433
- # Date Range Split
1434
- post = rtn_dt[rtn_dt > saturday_end]
1435
- _, period_code = u._standardize_htf_freq(frequency)
1436
- altered_args = {
1437
- # This nonsense is to realign the schedules as best as possible. This
1438
- # essentially creates the 'pre-1952' equivalent date to the last generated 'post-1952'
1439
- # date. Start the Range from there, then pre[0:-1] trims off that extra date where we
1440
- # started from
1441
- "end": post[0].to_period(period_code).end_time.normalize(),
1442
- "periods": periods - len(post) + 2,
1443
- }
1444
- pre = u.date_range_htf(
1445
- self.holidays_pre_1952(),
1446
- **(args | altered_args),
1447
- )
1448
-
1449
- return pd.DatetimeIndex(pre[:-1].union(post)[-periods:], dtype="datetime64[ns]")
1450
- else:
1451
- _, _ = u._standardize_htf_freq(frequency)
1452
- raise ValueError("This should never be raised, the above call should error first")
1453
-
1454
- def early_closes(self, schedule):
1455
- """
1456
- Get a DataFrame of the dates that are an early close.
1457
-
1458
- :param schedule: schedule DataFrame
1459
- :return: schedule DataFrame with rows that are early closes
1460
- """
1461
- early = super().early_closes(schedule)
1462
-
1463
- # make sure saturdays are not considered early closes if they are >= 12pm
1464
- mc = early.market_close.dt.tz_convert(self.tz)
1465
- after_noon = (mc - mc.dt.normalize()).ge(self._tdelta(self._saturday_close))
1466
- return early[~(mc.dt.weekday.eq(5) & after_noon)]
1
+ #
2
+ # Copyright 2016 Quantopian, Inc.
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+
16
+ from datetime import time
17
+ from itertools import chain
18
+ from typing import Literal, Union
19
+ import sys
20
+ # check python versiOn aNd import accordingly
21
+ if sys.version_info >= (3, 9):
22
+ # For Python 3.9 and later, import directly
23
+ from zoneinfo import ZoneInfo
24
+ else:
25
+ # For Python 3.8 and earlier, import from backports
26
+ from backports.zoneinfo import ZoneInfo
27
+
28
+ import pandas as pd
29
+ from pandas.tseries.holiday import AbstractHolidayCalendar
30
+ from pandas.tseries.offsets import CustomBusinessDay
31
+
32
+ from pandas_market_calendars import calendar_utils as u
33
+ from pandas_market_calendars.holidays.nyse import (
34
+ # Always Celebrated Holidays
35
+ USNewYearsDayNYSEpost1952,
36
+ USNewYearsDayNYSEpre1952,
37
+ SatBeforeNewYearsAdhoc,
38
+ USPresidentsDay,
39
+ USWashingtonsBirthDay1964to1970,
40
+ USWashingtonsBirthDayBefore1952,
41
+ USWashingtonsBirthDay1952to1963,
42
+ USLincolnsBirthDayBefore1954,
43
+ LincolnsBirthDayAdhoc,
44
+ SatBeforeWashingtonsBirthdayAdhoc,
45
+ SatAfterWashingtonsBirthdayAdhoc,
46
+ SatBeforeAfterLincolnsBirthdayAdhoc,
47
+ GrantsBirthDayAdhoc,
48
+ USMartinLutherKingJrAfter1998,
49
+ GoodFriday,
50
+ GoodFridayPre1898,
51
+ GoodFriday1899to1905,
52
+ SatAfterGoodFridayAdhoc,
53
+ USMemorialDay,
54
+ USMemorialDayBefore1952,
55
+ USMemorialDay1952to1964,
56
+ USMemorialDay1964to1969,
57
+ SatBeforeDecorationAdhoc,
58
+ SatAfterDecorationAdhoc,
59
+ DayBeforeDecorationAdhoc,
60
+ USJuneteenthAfter2022,
61
+ USIndependenceDay,
62
+ USIndependenceDayPre1952,
63
+ USIndependenceDay1952to1954,
64
+ SatBeforeIndependenceDayAdhoc,
65
+ SatAfterIndependenceDayAdhoc,
66
+ MonTuesThursBeforeIndependenceDay,
67
+ FridayAfterIndependenceDayNYSEpre2013,
68
+ WednesdayBeforeIndependenceDayPost2013,
69
+ MonBeforeIndependenceDayAdhoc,
70
+ DaysAfterIndependenceDayAdhoc,
71
+ # DaysBeforeIndependenceDay1pmEarlyCloseAdhoc,
72
+ USColumbusDayBefore1954,
73
+ USElectionDay1848to1967,
74
+ USLaborDayStarting1887,
75
+ SatBeforeLaborDayAdhoc,
76
+ USThanksgivingDay,
77
+ USThanksgivingDay1939to1941,
78
+ USThanksgivingDayBefore1939,
79
+ DayAfterThanksgiving2pmEarlyCloseBefore1993,
80
+ DayAfterThanksgiving1pmEarlyCloseInOrAfter1993,
81
+ FridayAfterThanksgivingAdHoc,
82
+ USElectionDay1968to1980Adhoc,
83
+ ChristmasNYSE,
84
+ Christmas54to98NYSE,
85
+ ChristmasBefore1954,
86
+ ChristmasEvesAdhoc,
87
+ DayAfterChristmasAdhoc,
88
+ DayAfterChristmas1pmEarlyCloseAdhoc,
89
+ ChristmasEvePost1999Early1pmClose,
90
+ ChristmasEve1pmEarlyCloseAdhoc,
91
+ ChristmasEve2pmEarlyCloseAdhoc,
92
+ SatBeforeChristmasAdhoc,
93
+ SatAfterChristmasAdhoc,
94
+ # Retired Holidays
95
+ USVetransDayAdHoc,
96
+ SatAfterColumbusDayAdHoc,
97
+ USVeteransDay1934to1953,
98
+ # Adhoc Holidays
99
+ # 1885
100
+ UlyssesGrantFuneral1885,
101
+ # 1892
102
+ ColumbianCelebration1892,
103
+ # 1888
104
+ GreatBlizzardOf1888,
105
+ # 1889
106
+ WashingtonInaugurationCentennialCelebration1889,
107
+ # 1898
108
+ CharterDay1898,
109
+ WelcomeNavalCommander1898,
110
+ # 1899
111
+ AdmiralDeweyCelebration1899,
112
+ GarretHobartFuneral1899,
113
+ # 1901
114
+ McKinleyDeathAndFuneral1901,
115
+ QueenVictoriaFuneral1901,
116
+ MovedToProduceExchange1901,
117
+ EnlargedProduceExchange1901,
118
+ # 1902
119
+ KingEdwardVIIcoronation1902,
120
+ # 1903
121
+ NYSEnewBuildingOpen1903,
122
+ # 1908
123
+ GroverClevelandFuneral1pmClose1908,
124
+ # 1909
125
+ HudsonFultonCelebration1909,
126
+ # 1910
127
+ KingEdwardDeath11amyClose1910,
128
+ KingEdwardFuneral12pmOpen1910,
129
+ # 1912
130
+ JamesShermanFuneral1912,
131
+ # 1913
132
+ JPMorganFuneral12pmOpen1913,
133
+ WilliamGaynorFuneral12pmOpen1913,
134
+ # 1914
135
+ OnsetOfWWI1914,
136
+ # 1917
137
+ WeatherHeatClosing1917,
138
+ ParadeOfNationalGuardEarlyClose1917,
139
+ LibertyDay12pmEarlyClose1917,
140
+ DraftRegistrationDay1917,
141
+ # 1918
142
+ WeatherNoHeatClosing1918,
143
+ DraftRegistrationDay1918,
144
+ LibertyDay12pmEarlyClose1918,
145
+ FalseArmisticeReport1430EarlyClose1918,
146
+ ArmisticeSigned1918,
147
+ # 1919
148
+ RooseveltFuneral1230EarlyClose1919,
149
+ Homecoming27Division1919,
150
+ ParadeOf77thDivision1919,
151
+ BacklogRelief1919,
152
+ GeneralPershingReturn1919,
153
+ TrafficBlockLateOpen1919,
154
+ # 1920
155
+ TrafficBlockLateOpen1920,
156
+ OfficeLocationChange1920,
157
+ WallStreetExplosionEarlyClose1920,
158
+ # 1921
159
+ AnnunciatorBoardFire1pmLateOpen1921,
160
+ # 1923
161
+ HardingDeath1923,
162
+ HardingFuneral1923,
163
+ # 1924
164
+ WoodrowWilsonFuneral1230EarlyClose1924,
165
+ # 1925
166
+ EclipseOfSunLateOpen1925,
167
+ CromwellFuneral1430EarlyClose1925,
168
+ # 1927
169
+ LindberghParade1927,
170
+ # 1928
171
+ BacklogRelief1928,
172
+ BacklogRelief2pmEarlyClose1928,
173
+ # 1929
174
+ BacklogRelief1929,
175
+ BacklogRelief1pmEarlyClose1929,
176
+ BacklogRelief12pmLateOpen1929,
177
+ # 1930
178
+ TaftFuneral1230EarlyClose1930,
179
+ # 1933
180
+ CoolidgeFuneral1933,
181
+ BankHolidays1933,
182
+ GasFumesOnTradingFloor1230EarlyClose1933,
183
+ HeavyVolume1933,
184
+ HeavyVolume12pmLateOpen1933,
185
+ HeavyVolume11amLateOpen1933,
186
+ HeavyVolume2pmEarlyClose1933,
187
+ NRAdemonstration12pmEarlyClose1933,
188
+ # 1924
189
+ Snow11amLateOpen1934,
190
+ # 1936
191
+ KingGeorgeVFuneral11amLateOpen1936,
192
+ # 1944
193
+ SatClosings1944,
194
+ # 1945
195
+ RooseveltDayOfMourning1945,
196
+ SatClosings1945,
197
+ VJday1945,
198
+ NavyDay1945,
199
+ # 1946
200
+ RailroadStrike1946,
201
+ SatClosings1946,
202
+ # 1947
203
+ SatClosings1947,
204
+ # 1948
205
+ SatClosings1948,
206
+ SevereWeather1948,
207
+ # 1949
208
+ SatClosings1949,
209
+ # 1950
210
+ SatClosings1950,
211
+ # 1951
212
+ SatClosings1951,
213
+ # 1952
214
+ SatClosings1952,
215
+ # 1960
216
+ Snow11amLateOpening1960,
217
+ # 1963
218
+ KennedyAssassination1407EarlyClose,
219
+ KennedyFuneral1963,
220
+ # 1964
221
+ HooverFuneral1400EarlyClose1964,
222
+ # 1965
223
+ PowerFail1105LateOpen,
224
+ # 1966
225
+ TransitStrike2pmEarlyClose1966,
226
+ # 1967
227
+ Snow1015LateOpen1967,
228
+ Snow2pmEarlyClose1967,
229
+ Backlog2pmEarlyCloses1967,
230
+ # 1968
231
+ Backlog2pmEarlyCloses1968,
232
+ MLKdayOfMourning1968,
233
+ PaperworkCrisis1968,
234
+ # 1969 - 1970
235
+ PaperworkCrisis2pmEarlyCloses1969,
236
+ SnowClosing1969,
237
+ Snow11amLateOpen1969,
238
+ EisenhowerFuneral1969,
239
+ Storm1045LateOpen1969,
240
+ PaperworkCrisis230pmEarlyCloses1969,
241
+ FirstLunarLandingClosing1969,
242
+ PaperworkCrisis3pmEarlyCloses1969to1970,
243
+ # 1972
244
+ TrumanFuneral1972,
245
+ # 1973
246
+ JohnsonFuneral1973,
247
+ Ice11amLateOpen1973,
248
+ # 1974
249
+ MerrillLynchComputer1015LateOpen1974,
250
+ FireDrill1015LateOpen1974,
251
+ # 1975
252
+ Snow230EarlyClose1975,
253
+ # 1976
254
+ Storm1115LateOpen1976,
255
+ FireDrill1015LateOpen1976,
256
+ HurricaneWatch3pmEarlyClose1976,
257
+ # 1977
258
+ NewYorkCityBlackout77,
259
+ # 1978
260
+ Snow12pmLateOpen1978,
261
+ Snow2pmEarlyClose1978,
262
+ Snow11amLateOpen1978,
263
+ # 1981
264
+ ReaganAssassAttempt317pmEarlyClose1981,
265
+ ConEdPowerFail328pmEarlyClose1981,
266
+ # 1985
267
+ HurricaneGloriaClosings1985,
268
+ # 1987
269
+ Backlog2pmEarlyCloses1987,
270
+ Backlog230pmEarlyCloses1987,
271
+ Backlog3pmEarlyCloses1987,
272
+ Backlog330pmEarlyCloses1987,
273
+ # 1989
274
+ Fire11amLateOpen1989,
275
+ # 1990
276
+ ConEdXformer931amLateOpen1990,
277
+ # 1991
278
+ TroopsInGulf931LateOpens1991,
279
+ # 1994
280
+ Snow230pmEarlyClose1994,
281
+ NixonFuneral1994,
282
+ # 1995
283
+ Computer1030LateOpen1995,
284
+ # 1996
285
+ Snow11amLateOpen1996,
286
+ Snow2pmEarlyClose1996,
287
+ # 1997
288
+ CircuitBreakerTriggered330pmEarlyClose1997,
289
+ # 2001
290
+ September11Closings2001,
291
+ Sept11MomentSilence933amLateOpen2001,
292
+ EnduringFreedomMomentSilence931amLateOpen2001,
293
+ # 2002
294
+ Sept11Anniversary12pmLateOpen2002,
295
+ # 2003
296
+ IraqiFreedom932amLateOpen2003,
297
+ # 2004
298
+ ReaganMomentSilence932amLateOpen2004,
299
+ ReaganMourning2004,
300
+ # 2005
301
+ SystemProb356pmEarlyClose2005,
302
+ # 2006
303
+ FordMomentSilence932amLateOpen2006,
304
+ # 2007
305
+ FordMourning2007,
306
+ # 2012
307
+ HurricaneSandyClosings2012,
308
+ # 2018
309
+ GeorgeHWBushDeath2018,
310
+ # 2025
311
+ JimmyCarterDeath2025,
312
+ )
313
+ from pandas_market_calendars.market_calendar import MarketCalendar
314
+
315
+ # Useful resources for making changes to this file:
316
+ # http://www.nyse.com/pdfs/closings.pdf
317
+ # http://www.stevemorse.org/jcal/whendid.html
318
+
319
+ # Overwrite the default holiday calendar start_date of 1/1/70
320
+ AbstractHolidayCalendar.start_date = "1885-01-01"
321
+
322
+
323
+ class NYSEExchangeCalendar(MarketCalendar):
324
+ """
325
+ Exchange calendar for NYSE from 1885-01-01
326
+ - Note: DJIA was first recorded 1885-02-16
327
+
328
+ REFERENCES:
329
+ - https://web.archive.org/web/20141224054812/http://www.nyse.com/about/history/timeline_trading.html
330
+ - https://www.marketwatch.com/story/a-brief-history-of-trading-hours-on-wall-street-2015-05-29
331
+ - http://www.ltadvisors.net/Info/research/closings.pdf
332
+ - https://github.com/rsheftel/pandas_market_calendars/files/6827110/Stocks.NYSE-Closings.pdf
333
+
334
+ NYSE OVERVIEW:
335
+ - 1792: 5 securities traded
336
+ - 1871: Continuous trading begins
337
+ - 1885 to 1887: trading hours Mon-Sat 10am to variable 2pm thru 4pm (coded as 3pm)
338
+ - 1887: trading hours Mon-Fri 10am-3pm Sat 10am-noon
339
+ - 1952-09-29: trading hours Mon-Fri 10am-3:30pm,
340
+ - Sat trading removed after Sept 27
341
+ - Last effective Saturday traded was May 24, 1952
342
+ - 1974: trading hours Mon-Fri 10am-4pm
343
+ - 1985: trading hours Mon-Fri 9:30am-4pm
344
+
345
+ #######################################
346
+ Regularly-Observed Holidays as of 2021:
347
+ #######################################
348
+ - New Years Day (observed on monday when Jan 1 is a Sunday)
349
+ - Martin Luther King Jr. Day (3rd Monday in January, only after 1998)
350
+ - Lincoln's Birthday (February 12th, only before 1954 starting in 1896)
351
+ - Washington's Birthday (February 22nd, before 1971 with rule change in 1964)
352
+ - Washington's Birthday (aka President's Day, 3rd Monday in February, after 1970)
353
+ - Good Friday (two days before Easter Sunday)
354
+ - Memorial Day (May 30th, before 1970, with rule change in 1964)
355
+ - Memorial Day (last Monday in May, after 1970)
356
+ - Independence Day (July 4th Sunday to Monday, before 1954)
357
+ - Independence Day (observed on the nearest weekday to July 4th, after 1953)
358
+ - Election Day (First Tuesday starting on November 2nd, between 1848 and 1967)
359
+ - Election Day (Every four years, first Tuesday starting on November 2nd, between 1968 and 1980)
360
+ - Veterans Day (November 11th, between 1934 and 1953)
361
+ - Columbus Day (October 12th, before 1954)
362
+ - Labor Day (first Monday in September)
363
+ - Thanksgiving (last Thursday in November, before 1939)
364
+ - Thanksgiving (second to last Thursday in November, between 1939 and 1941)
365
+ - Thanksgiving (fourth Thursday in November, after 1941)
366
+ - Christmas (December 25th, Sunday to Monday, before 1954)
367
+ - Christmas (observed on nearest weekday to December 25, after 1953)
368
+
369
+ ################################
370
+ Regularly-Observed Early Closes:
371
+ ################################
372
+ - July 3rd (Mondays, Tuesdays, and Thursdays, 1995 onward)
373
+ - July 5th (Fridays, 1995 onward, except 2013)
374
+ - Christmas Eve (except on Fridays, when the exchange is closed entirely)
375
+ - Day After Thanksgiving (aka Black Friday, observed from 1992 onward)
376
+
377
+ NOTE: Until 1993, the standard early close time for the NYSE was 2:00 PM.
378
+ From 1993 onward, it has been 1:00 PM.
379
+
380
+ ####################################
381
+ Retired Regularly-Observed Holidays:
382
+ ####################################
383
+ - Columbus Day (after 1953)
384
+ - Armistice/Veterans Day (after 1953)
385
+
386
+ #################################
387
+ Irregularities Openings/Closings:
388
+ #################################
389
+ begin reference: https://github.com/rsheftel/pandas_market_calendars/files/6827110/Stocks.NYSE-Closings.pdf
390
+ - Closed on Aug 8, 1885 (Sat): President Ulysses S. Grant funeral
391
+ - Closed on Jul 2, 1887 (Sat): Saturday before Independence Day
392
+ - Closed on Dec 24, 1887 (Sat): Christmas Eve
393
+ - Closed on Mar 12-13, 1888 (Mon-Tue): Blizzard of 1888
394
+ - Closed on Sep 1, 1888 (Sat): Saturday before Labor Day
395
+ - Closed on Nov 30, 1888 (Fri): Friday after Thanksgiving
396
+ - Closed on Apr 29 - May 1, 1889 (Mon-Wed): Centennial celbration of Washington's inauguration
397
+ - Closed on Jul 5, 1890 (Sat): Saturday after Independence Day
398
+ - Closed on Dec 26, 1891 (Sat): Saturday after Christmas
399
+ - Closed on Jul 2, 1892 (Sat): Saturday before Independence Day
400
+ - Closed on Oct 12, 1892 (Wed) Columbian Celebration (Columbus discovery of America)
401
+ - Closed on Oct 21-22, 1892 (Fri-Sat): Columbian Celebration
402
+ - Closed on Apr 27, 1893 (Thu): Columbian Celebration
403
+ - Closed on Dec 26, 1896 (Sat): Saturday after Christmas
404
+ - Closed on Apr 27, 1897 (Tue): Grant's birthday
405
+ - Closed on May 4, 1898 (Wed): NYC Charter Day
406
+ - Closed on Jul 2, 1898 (Sat): Saturday before Independence Day
407
+ - Closed on Aug 20, 1898 (Sat): Welcome of naval commanders
408
+ - Closed on Sep 3, 1898 (Sat): Saturday before Labor Day
409
+ - Closed on Dec 24, 1898 (Sat): Saturday before Christmas
410
+ - Closed on Feb 11, 1899 (Sat): Saturday before Lincoln's birthday
411
+ - Closed on May 29, 1899 (Mon): Monday before Decoration Day
412
+ - Closed on Jul 3, 1899 (Mon): Monday before Independence Day
413
+ - Closed on Sep 29-30, 1899 (Fri-Sat): Admiral Dewey Celebration
414
+ - Closed on Nov 25, 1899 (Sat): Funeral of Vice-President Garret A. Hobart
415
+ - Closed on Apr 14, 1900 (Sat): Saturday after Good Friday
416
+ - Closed on Sep 1, 1900 (Sat): Saturday before Labor Day
417
+ - Closed on Dec 24, 1900 (Mon): Christmas Eve
418
+ - Closed on Feb 2, 1901 (Sat): Funderal of Queen Victoria of England
419
+ - Closed on Feb 23, 1901 (Sat): Saturday after Washington's birthday
420
+ - Closed on Apr 6, 1901 (Sat): Saturday after Good Friday
421
+ - Closed on Apr 27, 1901 (Sat): Moved to temporary quarters in Produce Exchange
422
+ - Closed on May 11, 1901 (Sat): Enlarged temporary quarters in Produce Exchange
423
+ - Closed on Jul 5-6, 1901 (Fri-Sat): Days after Independence Day
424
+ - Closed on Aug 31, 1901 (Sat): Saturday before Labor Day
425
+ - Closed on Sep 14, 1901 (Sat): Death of President William McKinley
426
+ - Closed on Sep 19, 1901 (Thu): Funeral of President William McKinley
427
+ - Closed on Mar 29, 1902 (Sat): Saturday after Good Friday
428
+ - Closed on May 31, 1902 (Sat): Saturday after Decoration Day
429
+ - Closed on Jul 5, 1902 (Sat): Saturday after Independence Day
430
+ - Closed on Aug 9, 1902 (Sat): Coronation of King Edward VII of England
431
+ - Closed on Aug 30, 1902 (Sat): Saturday before Labor Day
432
+ - Closed on Feb 21, 1903 (Sat): Saturday before Washington's birthday
433
+ - Closed on Apr 11, 1903 (Sat): Saturday after Good Friday
434
+ - Closed on Apr 22, 1903 (Wed): Opening of the new NYSE building
435
+ - Closed on Sep 5, 1903 (Sat): Saturday before Labor Day
436
+ - Closed on Dec 26, 1903 (Sat): Saturday after Christmas
437
+ - Closed on May 28, 1904 (Sat): Saturday before Decoration Day
438
+ - Closed on Jul 2, 1904 (Sat): Saturday before Independence Day
439
+ - Closed on Sep 3, 1904 (Sat): Saturday before Labor Day
440
+ - Closed on Dec 24, 1904 (Sat): Saturday before Christmas
441
+ - Closed on Apr 22, 1905 (Sat): Saturday after Good Friday
442
+ - Closed on Feb 23, 1907 (Sat): Saturday after Washington's birthday
443
+ - Closed on Mar 30, 1907 (Sat): Saturday after Good Friday
444
+ - Closed on Aug 31, 1907 (Sat): Saturday before Labor Day
445
+ - Closed on Apr 18, 1908 (Sat): Saturday after Good Friday
446
+ - Early Close 1pm on Jun 25, 1908 (Fri): Former President Grover Cleveland funeral
447
+ - Closed on Sep 5, 1908 (Sat): Saturday before Labor Day
448
+ - Closed on Dec 26, 1908 (Sat): Saturday after Christmas
449
+ - Closed on Feb 13, 1909 (Sat): Saturday after Lincoln's birthday
450
+ - Closed on Apr 10, 1909 (Sat): Saturday after Good Friday
451
+ - Closed on May 29, 1909 (Sat): Saturday before Decoration Day
452
+ - Closed on Jul 3, 1909 (Sat): Saturday before Independence Day
453
+ - Closed on Sep 4, 1909 (Sat) Saturday before Labor Day
454
+ - Closed on Sep 25, 1909 (Sat): Reception Day of the Hudson-Fulton Celebration
455
+ - Closed on Mar 26, 1910 (Sat): Saturday after Good Friday
456
+ - Early Close 11am on May 7, 1910 (Sat): King Edward VII of England Death
457
+ - Late Open 12pm on May 20, 1910 (Fri): King Edward VII of England Funeral
458
+ - Closed on May 28, 1910 (Sat): Saturday before Decoration Day
459
+ - Closed on Jul 2, 1910 (Sat): Saturday before Independence Day
460
+ - Closed on Sep 3, 1910 (Sat): Saturday before Labor Day
461
+ - Closed on Dec 24, 1910 (Sat): Saturday before Christmas
462
+ - Closed on Apr 15, 1911 (Sat): Saturday after Good Friday
463
+ - Closed on Sep 2, 1911 (Sat): Saturday before Labor Day
464
+ - Closed on Dec 23, 1911 (Sat): Saturday before Christmas
465
+ - Closed on Aug 31, 1912 (Sat): Saturday before Labor Day
466
+ - Closed on Nov 2, 1912 (Sat): Vice-President James S. Sherman funeral
467
+ - Closed on Mar 22, 1913 (Sat): Saturday after Good Friday
468
+ - Late Open 12pm on Apr 14, 1913 (Mon): JP Morgan funeral
469
+ - Closed on May 31, 1913 (Sat): Saturday after Decoration Day
470
+ - Closed on Jul 5, 1913 (Sat): Saturday after Independence Day
471
+ - Closed on Aug 30, 1913 (Sat): Saturday before Labor Day
472
+ - Late Open 12pm on Sep 22, 1913 (Mon): Mayor William J. Gaynor funeral
473
+ - Closed on Jul 31-Dec 11, 1914: Pending outbreak of World War I.
474
+ - Bonds reopn Nov 28, 1914 for limited trading with restrictions
475
+ - Stocks (limited in number) reopen Dec 12, 1914 with restrictions
476
+ - Stocks (all stocks) reopen Dec 14, 1914 with restrictions
477
+ - Restrictions removed on Apr 1, 1915
478
+ - Closed on Dec 30, 1916 (Sat): Saturday before New Year's Day
479
+ - Closed on Jun 5, 1917 (Tue): Draft Registraion Day
480
+ - Closed on Aug 4, 1917 (Sat): Heat
481
+ - Early Close 12pm on Aug 29, 1917 (Wed): Parade of National Guard
482
+ - Closed on Sep 1, 1917 (Sat): Saturday before Labor Day
483
+ - Closed on Oct 13, 1917 (Sat): Saturday after Columbus Day
484
+ - Early Close 12pm on Oct 24, 1917 (Wed): Liberty Day
485
+ - Closed on Jan 28, 1918 (Mon): Heatless day
486
+ - Closed on Feb 4, 1918 (Mon): Heatless day
487
+ - Closed on Feb 11, 1918 (Mon): Heatless day
488
+ - Early Close 12pm on Apr 26, 1918 (Fri): Liberty Day
489
+ - NOT IMPLEMENTED: Break from 11am to 12pm on Jul 11, 1918 (Thu): Former Mayor John Purroy Mitchell funeral
490
+ - Closed on Sep 12, 1918 (Thu): Draft registration day
491
+ - Early Close 2:30pm on Nov 7, 1918 (Thu): False armistice report
492
+ - Closed on Nov 11, 1918 (Mon): Armistice signed
493
+ - Early Close 12:30pm on Jan 7, 1919 (Tue): Former President Theodore Roosevelt funeral
494
+ - Closed on Mar 25, 1919 (Tue): Homecoming of 27th Division
495
+ - Closed on May 6, 1919 (Tue): Parade of 77th Division
496
+ - Closed on May 31, 1919 (Sat): Saturday after Decoratin Day
497
+ - Closed on Jul 5, 1919 (Sat): Saturday after Independence Day
498
+ - Closed on Jul 19, 1919 (Sat): Heat and backlog catch up
499
+ - Closed on Aug 2, 1919 (Sat): Backlog catch up
500
+ - Closed on Aug 16, 1919 (Sat): Backlog catch up
501
+ - Closed on Aug 30, 1919 (Sat): Saturday before Labor Day
502
+ - Closed on Sep 10, 1919 (Wed): Return of General John J. Pershing
503
+ - Late Open 10:30am on Dec 30, 1919 (Tue): Traffic block
504
+ - Late Open 10:30am on Feb 6, 1920 (Fri): Traffic block
505
+ - Closed on Apr 3, 1920 (Sat): Saturday after Good Friday
506
+ - Closed on May 1, 1920 (Sat): Many firms changed office locations
507
+ - Closed on Jul 3, 1920 (Sat): Saturday before Independence Day
508
+ - Closed on Sep 4, 1920 (Sat): Saturday before Labor Day
509
+ - Early Close 12pm on Sep 16, 1920 (Thu): Wall Street explosion
510
+ - Closed on May 28, 1921 (Sat): Saturday before Decoration Day
511
+ - Closed on Jul 2, 1921 (Sat): Saturday before Independence Day
512
+ - Late Open 1pm on Aug 2, 1921 (Tue): Fire in annunciator board
513
+ - Closed on Sep 3, 1921 (Sat): Saturday before Labor Day
514
+ - Closed on Dec 23, 1922 (Sat): Saturday before Christmas
515
+ - Closed on Aug 3, 1923 (Fri): President Warren G. Harding death
516
+ - NOT IMPLEMENTED: Break 11am to 12:30pm on Aug 8, 1923 (Wed): President Warren G. Harding funeral
517
+ - Closed on Aug 10, 1923 (Fri): President Warren G. Harding funeral
518
+ - Early Close 12:30pm on Feb 6, 1924 (Wed): Former President Woodrow Wilson funderal
519
+ - Closed on May 31, 1924 (Sat): Saturday after Decoration Day
520
+ - Late Open 10:45am on Jan 24, 1925 (Sat): Eclipse of sun
521
+ - Early Close 2:30pm on Sep 18, 1925 (Fri): Seymour L. Cromwell funeral (former NYSE president)
522
+ - Closed on Dec 26, 1925 (Sat): Saturday after Christmas
523
+ - Closed on May 29, 1926 (Sat): Saturday before Decoration Day
524
+ - Closed on Jul 3, 1926 (Sat): Saturday before Independence Day
525
+ - Closed on Sep 4, 1926 (Sat): Saturday before Labor Day
526
+ - Closed on Jun 13, 1927 (Mon): Colonel Charles A. Lindberg parade
527
+ - Closed on Apr 7, 1928 (Sat): Backlog catch up
528
+ - Closed on Apr 21, 1928 (Sat): Backlog catch up
529
+ - Closed on May 5, 1928 (Sat): Backlog catch up
530
+ - Closed on May 12, 1928 (Sat): Backlog catch up
531
+ - Closed on May 19, 1928 (Sat): Backlog catch up
532
+ - Early Closes May 21-25, 1928 (Mon-Fri): Backlog catch up
533
+ - Closed on May 26, 1928 (Sat): Backlog catch up
534
+ - Closed on Nov 24, 1928 (Sat): Backlog catch up
535
+ - Closed on Feb 9, 1929 (Sat): Backlog catch up
536
+ - Closed on Feb 23, 1929 (Sat): Saturday after Washington's birthday
537
+ - Closed on Mar 30, 1929 (Sat): Saturday after Good Friday
538
+ - Closed on Aug 31, 1929 (Sat): Saturday before Labor Day
539
+ - Late Open 12pm on Oct 31, 1929 (Thu): Backlog catch up and relieve personnel
540
+ - Closed on Nov 1-2, 1929 (Fri-Sat): Backlog catch up and relieve personnel
541
+ - Early Closes 1pm on Nov 6-8, 1929 (Wed-Fri): Backlog catch up and relieve personnel
542
+ - Closed on Nov 9, 1929 (Sat): Backlog catch up and relieve personnel
543
+ - Early Closes 1pm on Nov 11-15, 1929 (Mon-Fri): Backlog catch up and relieve personnel
544
+ - Closed on Nov 16, 1929 (Sat): Backlog catch up and relieve personnel
545
+ - Closed on Nov 18-22, 1929 (Mon-Fri): Backlog catch up and relieve personnel
546
+ - Closed on Nov 23, 1929 (Sat): Backlog catch up and relieve personnel
547
+ - Closed on Nov 29-30, 1929 (Fri-Sat): Backlog catch up and relieve personnel
548
+ - Early Close 12:30pm on Mar 11, 1930 (Tue): Former President William Howard Taft funeral
549
+ - Closed on Apr 19, 1930 (Sat): Saturday after Good Friday
550
+ - Closed on May 31, 1930 (Sat): Saturday after Decoration Dday
551
+ - Closed on Jul 5, 1930 (Sat): Saturday after Independence Day
552
+ - Closed on Aug 30, 1930 (Sat): Saturday before Labor Day
553
+ - Closed on Sep 5, 1931 (Sat): Saturday before Labor Day
554
+ - Closed on Dec 26, 1931 (Sat): Saturday after Christmas
555
+ - Closed on Jul 2, 1932 (Sat): Saturday before Independence Day
556
+ - Closed on Jan 7, 1933 (Sat): Former President Calvin Coolidge funeral
557
+ - Closed on Mar 4, 1933 (Sat): State banking holiday
558
+ - Closed on Mar 6-14, 1933 (Mon-Tue): National banking holiday
559
+ - Late Open 12pm on Jul 24-25, 1933 (Mon-Tue): Volume activity
560
+ - Late Opens AND Early Closes on Jul 26-28, 1933 (Wed-Fri): Volume activity
561
+ - Closed on July 29, 1933 (Sat): Volume activity
562
+ - Early Close 12:30pm on Aug 4, 1933 (Fri): Gas fumes on trading floor
563
+ - Closed on Aug 5, 1933 (Sat): Volume activity
564
+ - Closed on Aug 12, 1933 (Sat): Volume activity
565
+ - Closed on Aug 19, 1933 (Sat): Volume activity
566
+ - Closed on Aug 26, 1933 (Sat): Volume activity
567
+ - Closed on Sep 2, 1933 (Sat): Volume activity
568
+ - Early Close 12pm on Sep 13, 1933 (Wed): NRA demonstration
569
+ - Late Open 11am on Feb 20, 1934 (Tue): severe snowstorm
570
+ - Late Open 11am on Jan 28, 1936 (Tue): King George V of England funeral
571
+ - Closed on Dec 26, 1936 (Sat): Saturday after Christmas
572
+ - Closed on May 29, 1937 (Sat): Saturday before Decoration Day
573
+ - Closed on Jul 3, 1937 (Sat): Saturday before Independence Day
574
+ - NOT IMPLEMENTED Break from 12-13:00 on May 18, 1942 (Mon): NYSE 150th anniversary
575
+ - NOT IMPLEMENTED Break from 14:32-14:58 on Oct 22, 1942 (Thu): Civil Defense drill
576
+ - NOT IMPLEMENTED Break from 14:38-14:59 on Oct 26, 1943 (Tue): Civil Defense drill
577
+ - Reopened from 15:20-15:40 under special rule of the Board
578
+ - Closed on Aug 19, 1944 (Sat)
579
+ - Closed on Aug 26, 1944 (Sat)
580
+ - Closed on Sep 2, 1944 (Sat)
581
+ - Closed on Apr 14, 1945 (Sat): President Franklin D. Roosevelt National Day of mourning
582
+ - NOT IMPLEMENTED Break 11:00-13:00 on Jun 19, 1945 (Tue): Parade for General Eisenhower
583
+ - Closed on Saturdays Jul 7-Sep 1, 1945
584
+ - Closed on Aug 15-16, 1945 (Wed-Thu): VJ Day. End of World War II
585
+ - Closed on Oct 13, 1945 (Sat): Saturday after Columbus Day
586
+ - Closed on Oct 27, 1945 (Sat): Navy Day
587
+ - Closed on Dec 24, 1945 (Mon): Christmas Eve
588
+ - Closed on Feb 23, 1946 (Sat): Saturday after Washington's birthday
589
+ - Closed on May 25, 1946 (Sat): Railroad strike
590
+ - Closed on Saturdays Jun 1-Sep 28, 1946 (Sat-Sat)
591
+ - Closed on Saturdays May 31-Sep 27, 1947 (Sat-Sat)
592
+ - Closed on Jan 3, 1948 (Sat): severe weather
593
+ - Closed on Saturdays May 29-Sep 25, 1948 (Sat-Sat)
594
+ - Closed on Saturdays May 28-Sep 4, 1948 (Sat-Sat)
595
+ - Cosed on Dec 24, 1949 (Sat): Christmas Eve
596
+ - Closed on Saturdays Jun 3-Sep 30, 1950 (Sat-Sat)
597
+ - Closed on Dec 12, 1950 (Sat): Saturday before Christmas Eve
598
+ - NOT IMPLEMENTED Break from 11:00-13:00 on Apr 20, 1951 (Fri): Parade for General MacArthur
599
+ - Closed on Saturdays Jun 2-Sep 29, 1951 (Sat-Sat)
600
+ - NOT IMPLEMENTED Break from 10:33-11:05 (Wed): Civil Defense Drill
601
+ - Early Close 1pm on Dec 24, 1951 (Mon): Christmas Eve
602
+ - Closed on Saturdays May 31-Sep 27, 1952 (Sat-Sat)
603
+ - As of Sep 29, 1952 Saturdays were retired as trading days
604
+ - As of Sep 29, 1952, M-F trading closes at 3:30pm (30 minutes longer)
605
+ - NOT IMPLEMENTED Break 10:02-10:32 on Jun 14, 1954 (Mon): Civil Defense drill
606
+ - Closed on Dec 24, 1954 (Fri): Christmas Eve
607
+ - NOT IMPLEMENTED Break 14:05-14:35 on Jun 15, 1955 (Wed): Civil Defense drill
608
+ - Closed on Dec 24, 1956 (Mon): Christmas Eve
609
+ - NOT IMPLEMENTED Break 13:45-14:15 on Jul 12, 1957 (Fri): Civil Defense drill
610
+ - NOT IMPLEMENTED Break 10:30-10:50 on May 6, 1958 (Tue): Civil Defense drill
611
+ - Closed on Dec 26, 1958 (Fri): Day after Christmas
612
+ - NOT IMPLEMENTED Break 13:30-13:50 on Apr 17, 1959 (Fri): Civil Defense drill
613
+ - NOT IMPLEMENTED Break 14:16-14:40 on May 3, 1960 (Tue): Civil Defense drill
614
+ - Late Open 11:00 on Dec 12, 1960 (Mon): severe snowstorm
615
+ - Closed on May 29, 1961 (Mon): Day before Decoration Day
616
+ - Early Close 14:07 on Nov 22, 1963 (Fri): President John F. Kennedy assassintion
617
+ - Closed on Nov 25, 1963 (Mon): President John F. Kennedy funeral
618
+ - Early Close 14:00 on Oct 23, 1964 (Fri): Former President Herbert C. Hoover funeral
619
+ - NOT IMPLEMENTED Break 11:00-11:02 on Jan 25, 1965 (Mon): Sir Winston Churchill 2 minutes of silence
620
+ - Late Open 11:05 on Nov 10, 1965 (Wed): Power failure in NY grid supply
621
+ - Closed on Dec 24, 1965 (Fri): Christmas Eve
622
+ - Early Closes 14:00 on Jan 6-14, 1966 (Thu-Fri): Transit strike
623
+ - NOT IMPLEMENTED Break 13:00-13:01 on Feb 3, 1967 (Fri): Apollo I disaster moment of silence
624
+ - Late Open 10:15 AND Early Close 14:00 on Feb 7, 1967 (Tue): snowstorm
625
+ - NOT IMPLEMENTED Break 12:58-13:13 on May 17, 1967 (Wed): Vice President Humphrey spoke in honor of NYSE's 175th anniversary
626
+ - Early Closes 14:00 on Aug 8-18, 1967 (Tue-Fri): Backlog catch up
627
+ - Early Closes 14:00 on Jan 22-Mar 1, 1968 (Mon-Fri): Backlog catch up
628
+ - Closed on Feb 12, 1968 (Mon): Lincoln's birthday (offices open, trading closed)
629
+ - NOT IMPLEMENTED Break 11:00-11:01 on Apr 5, 1968 (Fri): Dr. Martin Luther King, Jr. moment of silence
630
+ - Closed on Apr 9, 1968 (Tue): Martin Luther King, Jr. day or mourning
631
+ - NOT IMPLEMENTED Break 11:00-11:02 on Jun 6, 1968 (Fri): Senator Robert F. Kennedy moment of silence
632
+ - 4 day workweek Closed on a Wednesday OR Holiday from Jun 12-Dec 31, 1968: Paperwork crisis
633
+ - Closed on July 5, 1968 (Fri): Day after Independence Day
634
+ - Early Closes 14:00 on Jan 2-Jul 3, 1969: Paperwork Crisis
635
+ - Closed on Feb 10, 1969 (Mon): heavy snow
636
+ - Late open 11am on Feb 11, 1969 (Tue): heavy snow
637
+ - NOT IMPLEMENTED Break 13:30-13:32 on Mar 28, 1969 (Fri): Former President Dwight D. Eisenhower moment of silence
638
+ - Closed on Mar 31, 1969 (Mon): Former President Dwight D. Eisenhower funeral
639
+ - Late Open 10:45 on Jun 2, 1969 (Mon): storm
640
+ - Early Closes 14:30 on Jul 7-Sep 26,1969 (Mon-Fri): Paperwork Crisis
641
+ - Closed on Jul 21, 1969 (Mon): National Day of Participation for lunar exploration
642
+ - NOT IMPLEMENTED Break 12:35-13:05 on Sep 3, 1969 (Wed): power failure
643
+ - Early Closes 15:00 on Sep 29, 1969 to May 1, 1970: Paperwork Crisis
644
+ - Closed on Dec 28, 1972 (Thu): Former President Harry S. Truman funeral
645
+ - Closed on Jan 25, 1973 (Thu): Former President Lyndon B. Johnson funeral
646
+ - Late Open 11am on Dec 17, 1973 (Mon): ice storm
647
+ - Late Open 10:15 on Jan 16, 1974 (Wed): Merrill Lynch computer trouble
648
+ - NOT IMPLEMENTED Break 11:09-11:35 on Apr 10, 1974 (Wed): computer malfunction
649
+ - NOT IMPLEMENTED Break 11:46-12:22 on Oct 15, 1974 (Wed): Ticker down at 11:37 to 12:22
650
+ - Late Open 10:15 on Nov 22, 1974 (Fri): Fire drill
651
+ - Early Close 14:00 on Dec 24, 1974 (Tue): Christmas Eve
652
+ - NOT IMPLEMENTED Break 10:07-10:50 on Jan 7, 1975 (Tue): Computer stopped
653
+ - NOT IMPLEMENTED Break 13:24-13:45 on Jan 15, 1975 (Wed): Computer stopped
654
+ - NOT IMPLEMENTED Break 10:24-11:00 on Feb 7, 1975 (Fri): Computer failure
655
+ - Early Close 14:30 on Feb 12, 1975 (Wed): snowstorm
656
+ - NOT IMPLEMENTED Break 10:09-10:35 on Apr 9, 1975 (Wed): Computer stopped
657
+ - Early Close 14:00 on Dec 24, 1975 (Wed): Christmas Eve
658
+ - Late Open 11:15 on Feb 2, 1976 (Mon): storm
659
+ - Late Open UNKNOWN (coded as 10:15) on Jun 8, 1976 (Tue): fire drill
660
+ - Early Close 15:00 on Aug 9, 1976 (Mon): hurricane watch
661
+ - NOT IMPLEMENTED Break 1 minute time UNKNOWN on Nov 4, 1976 (Thu): Former NYSE Chair Gustave L. Levy moment of silence
662
+ - NOT IMPLEMENTED Break 11:00-11:01 on Feb 24, 1977 (Thu): Former NYSE Chair John A. Coleman moment of silence
663
+ - NOT IMPLEMENTED Break 10:24-11:45 on Mar 1, 1977 (Tue): Fire on moving ramp between trading floor and Blue Room
664
+ - Closed on July 14, 1977 (Thu): Power failure in NYC
665
+ - Late Open 12pm on Jan 20, 1978 (Fri): snowstorm
666
+ - Early Close 2pm on Feb 6, 1978 (Mon): snowstorm
667
+ - Late Open 11am on Feb 7, 1978 (Tue): snowstorm
668
+ - NOT IMPLEMENTED Break 1 minute time UNKNOWN on Dec 13, 1979 (Thu): Former NYSE Chair Robert L. Stott minute of silence
669
+ - NOT IMPLEMENTED Break 11:11-12:04 on Oct 13, 1980 (Mon): Computer malfunction
670
+ - NOT IMPLEMENTED Break 1 minute time UNKNOWN on Dec 30, 1980 (Tue): Former NYSE Chair James Crane Kellogg III moment of silence
671
+ - Early Close 3:17pm on Mar 30, 1981 (Mon): President Reagan assassination attempt
672
+ - Early Close 3:28pm on Sep 9, 1981 (Wed): Con Edison power failure
673
+ - NOT IMPLEMENTED Break 12:26-12:45pm on Sep 16, 1981 (Wed): Fire alarm malfunction
674
+ - NOT IMPLEMENTED Break 10:25-11:00am on Dec 28, 1982 (Tue): small fire
675
+ - NOT IMPLEMENTED Break 13:51-15:30 on Oct 13, 1983 (Thu): low speed ticker malfunction
676
+ - Closed on Sep 27, 1985 (Fri): Hurricane Gloria
677
+ - NOT IMPLEMENTED Break 11:00-11:01 on Jan 29, 1986 (Wed): Challenger space crew moment of silence
678
+ - Early Closes 2pm on Oct 23-30, 1987 (Fri-Fri): October 19th break volume
679
+ - Early Closes 2:30pm on Nov 2-4, 1987 (Mon-Wed): reason not given volume assumed
680
+ - Early Closes 3pm on Nov 5-6, 1987 (Thu-Fri): reason not given volume assumed
681
+ - Early Closes 3:30pm on Nov 9-11, 1987 (Mon-Wed): Trading floor and clerical staff strike
682
+ - Late Open 11am on Nov 10, 1989 (Fri): Electrical fire
683
+ - NOT IMPLEMENTED Break 9:41-11:15 on Nov 23, 1990 (Fri): Internal power failure
684
+ - Early Close 2pm on Dec 24, 1990 (Mon): Christmas Eve
685
+ - Late Open 11am on Dec 27, 1990 (Thu): explosion of Con Edison transformer
686
+ - Late Open 9:31am on Jan 17, 1991 (Thu): American troops in Persian Gulf moment of silence
687
+ - Late Open 9:31am on Feb 25, 1991 (Thu): American troops in Persian Gulf moment of silence
688
+ - NOT IMPLEMENTED Break 10:21-10:45am on Oct 22, 1991 (Tue): power dip
689
+ - Early Close 2pm on Dec 24, 1991 (Tue): Christmas Eve
690
+ - NOT IMPLEMENTED Break 1 minute time UNKNOWN on Mar 19, 1992 (Thu): Former NYSE Chair Bernard J. Lasker moment of silence
691
+ - NOT IMPLEMENTED Break 1 minute time UNKNOWN on May 15, 1992 (Fri): Former NYSE President G. Keith Funston moment of silence
692
+ - NOT IMPELMENTED Break 1 minute time UNKNOWN on Jun 15, 1992 (Mon): Former NYSE President Robert W. Haack moment of silence
693
+ - Early Close 2pm on Nov 27, 1992 (Fri): Day after Thanksgiving
694
+ - Early Close 2pm on Dec 24, 1992 (Thu): Christmas Eve
695
+ - Early Close 1pm on Nov 26, 1993 (Fri): Day after Thanksgiving
696
+ - Early Close 14:30 on Feb 11, 1994 (Fri): snowstorm
697
+ - NOT IMPLEMENTED Break 12:00-12:02 on Apr 25, 1994 (Mon): Former President Richard M. Nixon moment of silence
698
+ - Closed on Apr 27, 1994 (Wed): Former President Richard M. Nixon funderal
699
+ - Early Close 1pm on Nov 25, 1994 (Fri): Day after Thanksgiving
700
+ - NOT IMPLEMENTED Break 10:02-10:03 on Apr 26, 1995 (Wed): Oklahoma City bombing victims moment of silence
701
+ - Early Close 1pm on Jul 3, 1995 (Mon): Day before Independence Day
702
+ - Early Close 1pm on Nov 24, 1995 (Fri): Day after Thanksgiving
703
+ - Late Open 10:30am on Dec 18, 1995 (Mon): Computer system troubles
704
+ - Late Open 11am AND Early Close 2pm on Jan 8, 1996 (Mon): snowstorm
705
+ - NOT IMPLEMENTED Break time UNKNOWN on Apr 4, 1996 (Thu): Commerce Secretary Ron Brown and others killed in Balkans plane crash
706
+ - Early Close 1pm on July 5, 1996 (Fri): Day after Independence Day
707
+ - Early Close 1pm on Nov 29, 1996 (Fri): Day after Thanksgiving
708
+ - Early Close 1pm on Dec 24, 1996 (Tue): Christmas Eve
709
+ - Early Close 1pm on Jul 3, 1997 (Thu): Day before Independence Day
710
+ - NOT IMPLEMENTED Break 14:35-15:05 on Oct 27, 1997 (Mon): Circuit breaker triggered
711
+ - Early Close 3:30pm on Oct 27, 1997 (Mon): Circuit breaker triggered
712
+ - Early Close 1pm on Nov 28, 1997 (Fri): Day after Thanksgiving
713
+ - Early Close 1pm on Dec 24, 1997 (Wed): Christmas Eve
714
+ - Early Close 1pm on Dec 26, 1997 (Fri): Friday after Christmas
715
+ - NOT IMPLEMENTED Break time UNKNOWN on Jul 29, 1998 (Wed): Former NYSE President William McChesney Marting, Jr. moment of silence
716
+ - NOT IMPLEMENTED Break 13:16-14:15 on Oct 26, 1998 (Mon): Computer switch malfunction
717
+ - Early Close 1pm on Nov 27, 1998 (Fri): Day after Thanksgiving
718
+ - Early Close 1pm on Dec 24, 1998 (Thu): Christmas Eve
719
+ - NOT IMPLEMENTED Break 10:00-10:02 on Mar 25, 1999 (Thu): NATO troops in Kosovo minute of silence
720
+ - NOT IMPLEMENTED Break 12:00-12:02 on Apr 26, 1999 (Mon): Columbine High School killings moment of silence
721
+ - Early Close 1pm on Nov 26, 1999 (Fri): Day after Thanksgiving
722
+ - Early Close 1pm on Dec 24, 1999 (Fri): Christmas Eve
723
+ - NOT IMPLEMENTED Break 12:00-12:01 on Feb 16, 2000 (Wed): Former NYSE Chair Walter N. Frank moment of silence
724
+ - NOT IMPLEMENTED Break 12:00-12:01 on May 4, 2000 (Thu): Archbishop of NY Cardinal John O'Connor moment of silence
725
+ - Early Close 1pm on Jul 3, 2000 (Mon): Day before Independence Day
726
+ - Early Close 1pm on Nov 24, 2000 (Fri): Day after Thanksgiving
727
+ - NOT IMPLEMENTED Break 10:10-11:35 on Jun 8, 2001 (Fri): computer systems connectivity problem
728
+ - Early Close 1pm on Jul 3, 2001 (Tue): Day before Independence Day
729
+ - Closed on Sep 11-14, 2001 (Tue-Fri): Terrorist attack on World Trade Center
730
+ - Late Open 9:33am on Sep 17, 2001 (Mon): 2 minutes silence in honor of lives lost on 9/11
731
+ - Late Open 9:31am on Oct 8, 2001 (Mon): 1 minute silence for troops engaged in Operation Enduring Freedom
732
+ - Early Close 1pm on Nov 23, 2001 (Fri): Day after Thanksgiving
733
+ - Early Close 1pm on Dec 24, 2001 (Mon): Christmas Eve
734
+ - NOT IMPLEMENTED Break 10:29-10:31 on May 30, 2002 (Thu): Commemorate end of recovery work at Ground Zero
735
+ - Early Close 1pm on Jul 5, 2002 (Fri): Day after Independence Day
736
+ - Late Opening 12:00pm on Sep 11, 2002 (Wed): 1 year anniversary of 9/11 attack
737
+ - Early Close 1pm on Nov 29, 2002 (Fri): Day after Thanksgiving
738
+ - Early Close 1pm on Dec 24, 2002 (Tue): Christmas Eve
739
+ - NOT IMPLEMENTED Break 11:00-11:02 on Feb 3, 2002 (Mon): Columbia Space Shuttle lives lost moment of silence
740
+ - Late Opening 9:32am on Mar 20, 2003 (Thu): Operation Iraqi Freedom Troops moment of silence
741
+ - Early Close 1pm on Jul 3, 2003 (Thu): Day before Independence Day
742
+ - NOT IMPLEMENTED multiple 1-minute Breaks 9:59 and 10:29 on Sep 11, 2003 (Thu): 9/11 Commemoration
743
+ - Early Close 1pm on Nov 28, 2003 (Fri): Day after Thanksgiving
744
+ - Early Close 1pm on Dec 24, 2003 (Wed): Christmas Eve
745
+ - Early Close 1pm on Dec 26, 2003 (Fri): Friday after Christmas
746
+ - Late Open 9:32am on Jun 7, 2004 (Mon): Former President Ronald Reagan death moment of silence
747
+ - Closed on Jun 11, 2004 (Fri): Former President Ronald Reagan National Day of Mourning
748
+ - Early Close 1pm on Nov 26, 2004 (Fri): Day after Thanksgiving
749
+ - Early Close 3:56pm on Jun 1, 2005 (Wed): Systems communication problem
750
+ - Early Close 1pm on Nov 25, 2005 (Fri): Day after Thanksgiving
751
+ - Early Close 1pm on Jul 3, 2006 (Mon): Day before Independence Day
752
+ - Early Close 1pm on Nov 24, 2006 (Fri): Day after Thanksgiving
753
+ - Late Open 9:32am on Dec 27, 2006 (Wed): Former President Gerald Ford moment of silence
754
+ - Closed on Jan 2, 2007 (Tue): Former President Gerald Ford National Day of Mourning
755
+ - Early Close 1pm on Jul 3, 2007 (Tue): Day before Independence Day
756
+ - Early Close 1pm on Nov 23, 2007 (Fri): Day after Thanksgiving
757
+ - Early Close 1pm on Dec 24, 2007 (Mon): Christmas Eve
758
+ - Early Close 1pm on Jul 4, 2008 (Thu): Day before Independence Day
759
+ - Early Close 1pm on Nov 28, 2008 (Fri): Day after Thanksgiving
760
+ - Early Close 1pm on Dec 24, 2008 (Wed): Christmas Eve
761
+ - NOT IMPLEMENTED Extended Close 4:15pm on Jul 2, 2009 (Thu): Execute customer orders impacted by system irregularities
762
+ - Early Close 1pm on Nov 27, 2009 (Fri): Day after Thanksgiving
763
+ - Early Close 1pm on Dec 24, 2009 (Thu): Christmas Eve
764
+ - Early Close 1pm on Nov 26, 2010 (Fri): Day after Thanksgiving
765
+ - NOT IMPLEMENTED Break 11:00-11:01 on Jan 10, 2011 (Mon): Arizona shooting victims moment of silence
766
+
767
+ end of reference: https://github.com/rsheftel/pandas_market_calendars/files/6827110/Stocks.NYSE-Closings.pdf
768
+ *******************************************************************
769
+
770
+ https://www.streetinsider.com/Insiders+Blog/NYSE+Releases+2010+and+2011+Holiday+Calendar/4915576.html
771
+ - Early Close 1pm on Nov 25, 2011 (Fri): Day after Thanksgiving
772
+
773
+ https://holidaystracker.com/stock-market/new-york-stock-exchange-holidays-2012/
774
+ - Early Close 1pm on Jul 4, 2012 (Tue): Day before Independence Day
775
+ - Closed on 10/29/2012 and 10/30/2012 due to Hurricane Sandy.
776
+ - Early Close 1pm on Nov 23, 2012 (Fri): Day after Thanksgiving
777
+ - Early Close 1pm on Dec 24, 2012 (Mon): Christmas Eve
778
+
779
+ https://holidaystracker.com/stock-market/new-york-stock-exchange-nyse-holidays-2013/
780
+ - Early Close 1pm on Jul 3, 2013 (Wed): Day before Independence Day
781
+ - Early Close 1pm on Nov 29, 2013 (Fri): Day after Thanksgiving
782
+ - Early Close 1pm on Dec 24, 2013 (Tue): Christmas Eve
783
+
784
+ https://www.streetinsider.com/Insiders+Blog/NYSE+2014+and+2015+Holiday+Hours/8999575.html - Early Close 1pm on Jul 3, 2014 (Thu): Day before Independence Day
785
+ - Early Close 1pm on Jul 3, 2014 (Thu): Day before Independence Day
786
+ - Early Close 1pm on Nov 28, 2014 (Fri): Day after Thanksgiving
787
+ - Early Close 1pm on Dec 24, 2014 (Wed): Christmas Eve
788
+
789
+ https://www.businesswire.com/news/home/20141208006349/en/NYSE-Group-2016-Holiday-Calendar-and-Early-Closings
790
+ - Early Close 1pm on Nov 27, 2015 (Fri): Day after Thanksgiving
791
+ - Early Close 1pm on Dec 24, 2015 (Thu): Christmas Eve
792
+ - Early Close 1pm on Nov 25, 2016 (Fri): Day after Thanksgiving
793
+
794
+ https://www.stockinvestor.com/30380/stock-market-holidays-2017/
795
+ - Early Close 1pm on Jul 3, 2017 (Mon): Day before Independence Day
796
+ - Early Close 1pm on Nov 24, 2017 (Fri): Day after Thanksgiving
797
+ - Early Close 1pm on Jul 3, 2018 (Tue): Day before Independence Day
798
+ - Early Close 1pm on Nov 23, 2018 (Fri): Day after Thanksgiving
799
+ - Closed on 12/5/2018 due to George H.W. Bush's death.
800
+ - Early Close 1pm on Dec 24, 2018 (Tue): Christmas Eve
801
+ - Early Close 1pm on Jul 3, 2019 (Wed): Day before Independence Day
802
+ - Early Close 1pm on Nov 29, 2019 (Fri): Day after Thanksgiving
803
+ - Early Close 1pm on Dec 24, 2019 (Wed): Christmas Eve
804
+
805
+ https://holidaystracker.com/stock-market/new-york-stock-exchange-nyse-holidays-2020/
806
+ - Early Close 1pm on Nov 27, 2020 (Fri): Day after Thanksgiving
807
+ - Early Close 1pm on Dec 24, 2020 (Thu): Christmas Eve
808
+
809
+
810
+ NOTE: The exchange was **not** closed early on Friday December 26, 2008,
811
+ nor was it closed on Friday December 26, 2014. The next Thursday Christmas
812
+ will be in 2025. If someone is still maintaining this code in 2025, then
813
+ we've done alright...and we should check if it's a half day.
814
+
815
+ """
816
+
817
+ aliases = ["NYSE", "stock", "NASDAQ", "BATS", "DJIA", "DOW"]
818
+
819
+ regular_market_times = {
820
+ "pre": ((None, time(4)),),
821
+ "market_open": ((None, time(10)), ("1985-01-01", time(9, 30))),
822
+ "market_close": (
823
+ (None, time(15)),
824
+ ("1952-09-29", time(15, 30)),
825
+ ("1974-01-01", time(16)),
826
+ ),
827
+ "post": ((None, time(20)),),
828
+ }
829
+
830
+ _saturday_close = time(12)
831
+ _saturday_end = pd.Timestamp("1952-09-29", tz="UTC")
832
+
833
+ @property
834
+ def name(self):
835
+ return "NYSE"
836
+
837
+ @property
838
+ def full_name(self):
839
+ return "New York Stock Exchange"
840
+
841
+ @property
842
+ def tz(self):
843
+ return ZoneInfo("America/New_York")
844
+
845
+ @property
846
+ def weekmask(self):
847
+ return "Mon Tue Wed Thu Fri"
848
+
849
+ @property
850
+ def weekmask_pre_1952(self):
851
+ return "Mon Tue Wed Thu Fri Sat"
852
+
853
+ def holidays_pre_1952(self):
854
+ """
855
+ NYSE Market open on Saturdays pre 5/24/1952.
856
+ CustomBusinessDay object that can be used inplace of holidays() for dates prior to crossover
857
+
858
+ :return: CustomBusinessDay object of holidays
859
+ """
860
+ if hasattr(self, "_holidays_hist"):
861
+ return self._holidays_hist
862
+
863
+ self._holidays_hist = CustomBusinessDay(
864
+ holidays=self.adhoc_holidays,
865
+ calendar=self.regular_holidays,
866
+ weekmask=self.weekmask_pre_1952,
867
+ )
868
+ return self._holidays_hist
869
+
870
+ @property
871
+ def regular_holidays(self):
872
+ return AbstractHolidayCalendar(
873
+ rules=[
874
+ USNewYearsDayNYSEpost1952,
875
+ USNewYearsDayNYSEpre1952,
876
+ USMartinLutherKingJrAfter1998,
877
+ USPresidentsDay,
878
+ USWashingtonsBirthDayBefore1952,
879
+ USWashingtonsBirthDay1952to1963,
880
+ USWashingtonsBirthDay1964to1970,
881
+ USLincolnsBirthDayBefore1954,
882
+ GoodFriday,
883
+ GoodFridayPre1898,
884
+ GoodFriday1899to1905,
885
+ USMemorialDay,
886
+ USMemorialDayBefore1952,
887
+ USMemorialDay1952to1964,
888
+ USMemorialDay1964to1969,
889
+ USIndependenceDay,
890
+ USIndependenceDayPre1952,
891
+ USIndependenceDay1952to1954,
892
+ USLaborDayStarting1887,
893
+ USColumbusDayBefore1954,
894
+ USElectionDay1848to1967,
895
+ USVeteransDay1934to1953,
896
+ USThanksgivingDay,
897
+ USThanksgivingDayBefore1939,
898
+ USThanksgivingDay1939to1941,
899
+ ChristmasNYSE,
900
+ Christmas54to98NYSE,
901
+ ChristmasBefore1954,
902
+ USJuneteenthAfter2022,
903
+ ]
904
+ )
905
+
906
+ @property
907
+ def adhoc_holidays(self):
908
+ return list(
909
+ chain(
910
+ # Recurring Holidays
911
+ SatAfterGoodFridayAdhoc,
912
+ MonBeforeIndependenceDayAdhoc,
913
+ SatBeforeIndependenceDayAdhoc,
914
+ SatAfterIndependenceDayAdhoc,
915
+ DaysAfterIndependenceDayAdhoc,
916
+ SatBeforeLaborDayAdhoc,
917
+ USElectionDay1968to1980Adhoc,
918
+ FridayAfterThanksgivingAdHoc,
919
+ SatBeforeChristmasAdhoc,
920
+ SatAfterChristmasAdhoc,
921
+ ChristmasEvesAdhoc,
922
+ DayAfterChristmasAdhoc,
923
+ # Retired
924
+ USVetransDayAdHoc,
925
+ SatAfterColumbusDayAdHoc,
926
+ LincolnsBirthDayAdhoc,
927
+ GrantsBirthDayAdhoc,
928
+ SatBeforeNewYearsAdhoc,
929
+ SatBeforeWashingtonsBirthdayAdhoc,
930
+ SatAfterWashingtonsBirthdayAdhoc,
931
+ SatBeforeAfterLincolnsBirthdayAdhoc,
932
+ SatBeforeDecorationAdhoc,
933
+ SatAfterDecorationAdhoc,
934
+ DayBeforeDecorationAdhoc,
935
+ # Irregularities
936
+ UlyssesGrantFuneral1885,
937
+ ColumbianCelebration1892,
938
+ GreatBlizzardOf1888,
939
+ WashingtonInaugurationCentennialCelebration1889,
940
+ CharterDay1898,
941
+ WelcomeNavalCommander1898,
942
+ AdmiralDeweyCelebration1899,
943
+ GarretHobartFuneral1899,
944
+ QueenVictoriaFuneral1901,
945
+ MovedToProduceExchange1901,
946
+ EnlargedProduceExchange1901,
947
+ McKinleyDeathAndFuneral1901,
948
+ KingEdwardVIIcoronation1902,
949
+ NYSEnewBuildingOpen1903,
950
+ HudsonFultonCelebration1909,
951
+ JamesShermanFuneral1912,
952
+ OnsetOfWWI1914,
953
+ WeatherHeatClosing1917,
954
+ DraftRegistrationDay1917,
955
+ WeatherNoHeatClosing1918,
956
+ DraftRegistrationDay1918,
957
+ ArmisticeSigned1918,
958
+ Homecoming27Division1919,
959
+ ParadeOf77thDivision1919,
960
+ BacklogRelief1919,
961
+ GeneralPershingReturn1919,
962
+ OfficeLocationChange1920,
963
+ HardingDeath1923,
964
+ HardingFuneral1923,
965
+ LindberghParade1927,
966
+ BacklogRelief1928,
967
+ BacklogRelief1929,
968
+ CoolidgeFuneral1933,
969
+ BankHolidays1933,
970
+ HeavyVolume1933,
971
+ SatClosings1944,
972
+ RooseveltDayOfMourning1945,
973
+ SatClosings1945,
974
+ VJday1945,
975
+ NavyDay1945,
976
+ RailroadStrike1946,
977
+ SatClosings1946,
978
+ SatClosings1947,
979
+ SatClosings1948,
980
+ SevereWeather1948,
981
+ SatClosings1949,
982
+ SatClosings1950,
983
+ SatClosings1951,
984
+ SatClosings1952,
985
+ KennedyFuneral1963,
986
+ MLKdayOfMourning1968,
987
+ PaperworkCrisis1968,
988
+ SnowClosing1969,
989
+ EisenhowerFuneral1969,
990
+ FirstLunarLandingClosing1969,
991
+ TrumanFuneral1972,
992
+ JohnsonFuneral1973,
993
+ NewYorkCityBlackout77,
994
+ HurricaneGloriaClosings1985,
995
+ NixonFuneral1994,
996
+ ReaganMourning2004,
997
+ FordMourning2007,
998
+ September11Closings2001,
999
+ HurricaneSandyClosings2012,
1000
+ GeorgeHWBushDeath2018,
1001
+ JimmyCarterDeath2025,
1002
+ )
1003
+ )
1004
+
1005
+ @property
1006
+ def special_closes(self):
1007
+ return [
1008
+ (
1009
+ time(11, tzinfo=ZoneInfo("America/New_York")),
1010
+ AbstractHolidayCalendar(
1011
+ rules=[
1012
+ KingEdwardDeath11amyClose1910,
1013
+ ]
1014
+ ),
1015
+ ),
1016
+ (
1017
+ time(12, tzinfo=ZoneInfo("America/New_York")),
1018
+ AbstractHolidayCalendar(
1019
+ rules=[
1020
+ ParadeOfNationalGuardEarlyClose1917,
1021
+ LibertyDay12pmEarlyClose1917,
1022
+ LibertyDay12pmEarlyClose1918,
1023
+ WallStreetExplosionEarlyClose1920,
1024
+ NRAdemonstration12pmEarlyClose1933,
1025
+ ]
1026
+ ),
1027
+ ),
1028
+ (
1029
+ time(hour=12, minute=30, tzinfo=ZoneInfo("America/New_York")),
1030
+ AbstractHolidayCalendar(
1031
+ rules=[
1032
+ RooseveltFuneral1230EarlyClose1919,
1033
+ WoodrowWilsonFuneral1230EarlyClose1924,
1034
+ TaftFuneral1230EarlyClose1930,
1035
+ GasFumesOnTradingFloor1230EarlyClose1933,
1036
+ ]
1037
+ ),
1038
+ ),
1039
+ (
1040
+ time(13, tzinfo=ZoneInfo("America/New_York")),
1041
+ AbstractHolidayCalendar(
1042
+ rules=[
1043
+ FridayAfterIndependenceDayNYSEpre2013,
1044
+ MonTuesThursBeforeIndependenceDay,
1045
+ WednesdayBeforeIndependenceDayPost2013,
1046
+ DayAfterThanksgiving1pmEarlyCloseInOrAfter1993,
1047
+ ChristmasEvePost1999Early1pmClose,
1048
+ GroverClevelandFuneral1pmClose1908,
1049
+ ]
1050
+ ),
1051
+ ),
1052
+ (
1053
+ time(14, tzinfo=ZoneInfo("America/New_York")),
1054
+ AbstractHolidayCalendar(
1055
+ rules=[
1056
+ DayAfterThanksgiving2pmEarlyCloseBefore1993,
1057
+ HooverFuneral1400EarlyClose1964,
1058
+ Snow2pmEarlyClose1967,
1059
+ Snow2pmEarlyClose1978,
1060
+ Snow2pmEarlyClose1996,
1061
+ ]
1062
+ ),
1063
+ ),
1064
+ (
1065
+ time(14, 7, tzinfo=ZoneInfo("America/New_York")),
1066
+ AbstractHolidayCalendar(
1067
+ rules=[
1068
+ KennedyAssassination1407EarlyClose,
1069
+ ]
1070
+ ),
1071
+ ),
1072
+ (
1073
+ time(hour=14, minute=30, tzinfo=ZoneInfo("America/New_York")),
1074
+ AbstractHolidayCalendar(
1075
+ rules=[
1076
+ FalseArmisticeReport1430EarlyClose1918,
1077
+ CromwellFuneral1430EarlyClose1925,
1078
+ Snow230EarlyClose1975,
1079
+ Snow230pmEarlyClose1994,
1080
+ ]
1081
+ ),
1082
+ ),
1083
+ (
1084
+ time(15, tzinfo=ZoneInfo("America/New_York")),
1085
+ AbstractHolidayCalendar(
1086
+ rules=[
1087
+ HurricaneWatch3pmEarlyClose1976,
1088
+ ]
1089
+ ),
1090
+ ),
1091
+ (
1092
+ time(15, 17, tzinfo=ZoneInfo("America/New_York")),
1093
+ AbstractHolidayCalendar(
1094
+ rules=[
1095
+ ReaganAssassAttempt317pmEarlyClose1981,
1096
+ ]
1097
+ ),
1098
+ ),
1099
+ (
1100
+ time(15, 28, tzinfo=ZoneInfo("America/New_York")),
1101
+ AbstractHolidayCalendar(
1102
+ rules=[
1103
+ ConEdPowerFail328pmEarlyClose1981,
1104
+ ]
1105
+ ),
1106
+ ),
1107
+ (
1108
+ time(15, 30, tzinfo=ZoneInfo("America/New_York")),
1109
+ AbstractHolidayCalendar(
1110
+ rules=[
1111
+ CircuitBreakerTriggered330pmEarlyClose1997,
1112
+ ]
1113
+ ),
1114
+ ),
1115
+ (
1116
+ time(15, 56, tzinfo=ZoneInfo("America/New_York")),
1117
+ AbstractHolidayCalendar(
1118
+ rules=[
1119
+ SystemProb356pmEarlyClose2005,
1120
+ ]
1121
+ ),
1122
+ ),
1123
+ ]
1124
+
1125
+ @property
1126
+ def special_closes_adhoc(self):
1127
+ def _union_many(indexes):
1128
+ # Merges a list of pd.DatetimeIndex objects, returns merged DatetimeIndex
1129
+ union_index = pd.DatetimeIndex([], tz="UTC")
1130
+ for index in indexes:
1131
+ union_index = union_index.union(index)
1132
+ return union_index
1133
+
1134
+ return [
1135
+ (
1136
+ time(13, tzinfo=ZoneInfo("America/New_York")),
1137
+ # DaysBeforeIndependenceDay1pmEarlyCloseAdhoc # list
1138
+ ChristmasEve1pmEarlyCloseAdhoc
1139
+ + DayAfterChristmas1pmEarlyCloseAdhoc
1140
+ + BacklogRelief1pmEarlyClose1929,
1141
+ ),
1142
+ (
1143
+ time(14, tzinfo=ZoneInfo("America/New_York")),
1144
+ _union_many(
1145
+ [
1146
+ pd.DatetimeIndex(
1147
+ ChristmasEve2pmEarlyCloseAdhoc
1148
+ + HeavyVolume2pmEarlyClose1933
1149
+ )
1150
+ ]
1151
+ + [
1152
+ BacklogRelief2pmEarlyClose1928,
1153
+ TransitStrike2pmEarlyClose1966, # index
1154
+ Backlog2pmEarlyCloses1967, # index
1155
+ Backlog2pmEarlyCloses1968, # index
1156
+ PaperworkCrisis2pmEarlyCloses1969, # index
1157
+ Backlog2pmEarlyCloses1987,
1158
+ ]
1159
+ ), # index
1160
+ ),
1161
+ (
1162
+ time(14, 30, tzinfo=ZoneInfo("America/New_York")),
1163
+ _union_many(
1164
+ [PaperworkCrisis230pmEarlyCloses1969, Backlog230pmEarlyCloses1987]
1165
+ ), # index
1166
+ ),
1167
+ (
1168
+ time(15, tzinfo=ZoneInfo("America/New_York")),
1169
+ _union_many(
1170
+ [PaperworkCrisis3pmEarlyCloses1969to1970, Backlog3pmEarlyCloses1987]
1171
+ ), # index
1172
+ ),
1173
+ (
1174
+ time(15, 30, tzinfo=ZoneInfo("America/New_York")),
1175
+ Backlog330pmEarlyCloses1987, # index
1176
+ ),
1177
+ ]
1178
+
1179
+ @property
1180
+ def special_opens(self):
1181
+ return [
1182
+ (
1183
+ time(hour=9, minute=31, tzinfo=ZoneInfo("America/New_York")),
1184
+ AbstractHolidayCalendar(
1185
+ rules=[
1186
+ ConEdXformer931amLateOpen1990,
1187
+ EnduringFreedomMomentSilence931amLateOpen2001,
1188
+ ]
1189
+ ),
1190
+ ),
1191
+ (
1192
+ time(hour=9, minute=32, tzinfo=ZoneInfo("America/New_York")),
1193
+ AbstractHolidayCalendar(
1194
+ rules=[
1195
+ IraqiFreedom932amLateOpen2003,
1196
+ ReaganMomentSilence932amLateOpen2004,
1197
+ FordMomentSilence932amLateOpen2006,
1198
+ ]
1199
+ ),
1200
+ ),
1201
+ (
1202
+ time(hour=9, minute=33, tzinfo=ZoneInfo("America/New_York")),
1203
+ AbstractHolidayCalendar(
1204
+ rules=[
1205
+ Sept11MomentSilence933amLateOpen2001,
1206
+ ]
1207
+ ),
1208
+ ),
1209
+ (
1210
+ time(hour=10, minute=15, tzinfo=ZoneInfo("America/New_York")),
1211
+ AbstractHolidayCalendar(
1212
+ rules=[
1213
+ Snow1015LateOpen1967,
1214
+ MerrillLynchComputer1015LateOpen1974,
1215
+ FireDrill1015LateOpen1974,
1216
+ FireDrill1015LateOpen1976,
1217
+ ]
1218
+ ),
1219
+ ),
1220
+ (
1221
+ time(hour=10, minute=30, tzinfo=ZoneInfo("America/New_York")),
1222
+ AbstractHolidayCalendar(
1223
+ rules=[
1224
+ TrafficBlockLateOpen1919,
1225
+ TrafficBlockLateOpen1920,
1226
+ Computer1030LateOpen1995,
1227
+ ]
1228
+ ),
1229
+ ),
1230
+ (
1231
+ time(hour=10, minute=45, tzinfo=ZoneInfo("America/New_York")),
1232
+ AbstractHolidayCalendar(
1233
+ rules=[
1234
+ EclipseOfSunLateOpen1925,
1235
+ Storm1045LateOpen1969,
1236
+ ]
1237
+ ),
1238
+ ),
1239
+ (
1240
+ time(11, tzinfo=ZoneInfo("America/New_York")),
1241
+ AbstractHolidayCalendar(
1242
+ rules=[
1243
+ Snow11amLateOpen1934,
1244
+ KingGeorgeVFuneral11amLateOpen1936,
1245
+ Snow11amLateOpening1960,
1246
+ Snow11amLateOpen1969,
1247
+ Ice11amLateOpen1973,
1248
+ Snow11amLateOpen1978,
1249
+ Fire11amLateOpen1989,
1250
+ Snow11amLateOpen1996,
1251
+ ]
1252
+ ),
1253
+ ),
1254
+ (
1255
+ time(11, 5, tzinfo=ZoneInfo("America/New_York")),
1256
+ AbstractHolidayCalendar(
1257
+ rules=[
1258
+ PowerFail1105LateOpen,
1259
+ ]
1260
+ ),
1261
+ ),
1262
+ (
1263
+ time(11, 15, tzinfo=ZoneInfo("America/New_York")),
1264
+ AbstractHolidayCalendar(
1265
+ rules=[
1266
+ Storm1115LateOpen1976,
1267
+ ]
1268
+ ),
1269
+ ),
1270
+ (
1271
+ time(12, tzinfo=ZoneInfo("America/New_York")),
1272
+ AbstractHolidayCalendar(
1273
+ rules=[
1274
+ KingEdwardFuneral12pmOpen1910,
1275
+ JPMorganFuneral12pmOpen1913,
1276
+ WilliamGaynorFuneral12pmOpen1913,
1277
+ Snow12pmLateOpen1978,
1278
+ Sept11Anniversary12pmLateOpen2002,
1279
+ ]
1280
+ ),
1281
+ ),
1282
+ (
1283
+ time(13, tzinfo=ZoneInfo("America/New_York")),
1284
+ AbstractHolidayCalendar(
1285
+ rules=[
1286
+ AnnunciatorBoardFire1pmLateOpen1921,
1287
+ ]
1288
+ ),
1289
+ ),
1290
+ ]
1291
+
1292
+ @property
1293
+ def special_opens_adhoc(self):
1294
+ return [
1295
+ (
1296
+ time(9, 31, tzinfo=ZoneInfo("America/New_York")),
1297
+ TroopsInGulf931LateOpens1991,
1298
+ ),
1299
+ (
1300
+ time(11, tzinfo=ZoneInfo("America/New_York")),
1301
+ HeavyVolume11amLateOpen1933,
1302
+ ),
1303
+ (
1304
+ time(12, tzinfo=ZoneInfo("America/New_York")),
1305
+ BacklogRelief12pmLateOpen1929 + HeavyVolume12pmLateOpen1933,
1306
+ ),
1307
+ ]
1308
+
1309
+ # Override market_calendar.py to split calc between pre & post 1952 Saturday Close
1310
+ def valid_days(self, start_date, end_date, tz="UTC"):
1311
+ """
1312
+ Get a DatetimeIndex of valid open business days.
1313
+
1314
+ :param start_date: start date
1315
+ :param end_date: end date
1316
+ :param tz: time zone in either string or pytz.timezone
1317
+ :return: DatetimeIndex of valid business days
1318
+ """
1319
+ start_date = pd.Timestamp(start_date)
1320
+ end_date = pd.Timestamp(end_date)
1321
+ start_date = start_date.tz_convert(tz) if start_date.tz else start_date.tz_localize(tz)
1322
+ end_date = end_date.tz_convert(tz) if end_date.tz else end_date.tz_localize(tz)
1323
+
1324
+ # Starting Monday Sept. 29, 1952, no more saturday trading days
1325
+ if tz is None:
1326
+ saturday_end = self._saturday_end.tz_localize(None)
1327
+ else:
1328
+ saturday_end = self._saturday_end
1329
+
1330
+ # Don't care about Saturdays. Call super.
1331
+ if start_date > saturday_end:
1332
+ return super().valid_days(start_date, end_date, tz=tz)
1333
+
1334
+ # Full Date Range is pre 1952. Augment the Super call
1335
+ if end_date <= saturday_end:
1336
+ return pd.date_range(
1337
+ start_date,
1338
+ end_date,
1339
+ freq=self.holidays_pre_1952(),
1340
+ normalize=True,
1341
+ tz=tz,
1342
+ )
1343
+
1344
+ # Range is split across 1952. Concatenate Two different Date_Range calls
1345
+ days_pre = pd.date_range(
1346
+ start_date,
1347
+ saturday_end,
1348
+ freq=self.holidays_pre_1952(),
1349
+ normalize=True,
1350
+ tz=tz,
1351
+ )
1352
+ days_post = pd.date_range(saturday_end, end_date, freq=self.holidays(), normalize=True, tz=tz)
1353
+ return days_pre.union(days_post)
1354
+
1355
+ def days_at_time(self, days, market_time, day_offset=0):
1356
+ days = super().days_at_time(days, market_time, day_offset=day_offset)
1357
+
1358
+ if market_time == "market_close" and not self.is_custom(market_time):
1359
+ days = days.dt.tz_convert(self.tz)
1360
+ days = days.where(
1361
+ days.dt.weekday != 5,
1362
+ days.dt.normalize() + self._tdelta(self._saturday_close),
1363
+ )
1364
+ days = days.dt.tz_convert("UTC")
1365
+ return days
1366
+
1367
+ def date_range_htf(
1368
+ self,
1369
+ frequency: Union[str, pd.Timedelta, int, float],
1370
+ start: Union[str, pd.Timestamp, int, float, None] = None,
1371
+ end: Union[str, pd.Timestamp, int, float, None] = None,
1372
+ periods: Union[int, None] = None,
1373
+ closed: Union[Literal["left", "right"], None] = "right",
1374
+ *,
1375
+ day_anchor: u.Day_Anchor = "SUN",
1376
+ month_anchor: u.Month_Anchor = "JAN",
1377
+ ) -> pd.DatetimeIndex:
1378
+ # __doc__ = MarketCalendar.date_range_htf.__doc__
1379
+
1380
+ start, end, periods = u._error_check_htf_range(start, end, periods)
1381
+
1382
+ args = {
1383
+ "frequency": frequency,
1384
+ "start": start,
1385
+ "end": end,
1386
+ "periods": periods,
1387
+ "closed": closed,
1388
+ "day_anchor": day_anchor,
1389
+ "month_anchor": month_anchor,
1390
+ }
1391
+
1392
+ saturday_end = self._saturday_end.tz_localize(None)
1393
+
1394
+ # All Dates post 1952 This is the most common use case so return it first
1395
+ if start is not None and start > saturday_end:
1396
+ return u.date_range_htf(self.holidays(), **args)
1397
+
1398
+ # ---- Start-Date to End-Date w/ pre-1952 ----
1399
+ if start is not None and end is not None:
1400
+ if end <= saturday_end:
1401
+ # All pre 1952 Dates
1402
+ return u.date_range_htf(self.holidays_pre_1952(), **args)
1403
+ else:
1404
+ # Split Range Across 1952
1405
+ pre = u.date_range_htf( # Only Generate to the last saturday
1406
+ self.holidays_pre_1952(), **(args | {"end": saturday_end})
1407
+ )
1408
+ post = u.date_range_htf( # start generating from the last date of 'pre'
1409
+ self.holidays(), **(args | {"start": pre[-1]})
1410
+ )
1411
+ return pd.DatetimeIndex(pre.union(post), dtype="datetime64[ns]")
1412
+
1413
+ # ---- Periods from Start-Date w/ pre-1952 ----
1414
+ elif start is not None and periods is not None:
1415
+ # Start prior to 1952 & Number of periods given
1416
+ rtn_dt = u.date_range_htf(self.holidays_pre_1952(), **args)
1417
+ if rtn_dt[-1] <= saturday_end:
1418
+ return rtn_dt # never passed 1952, good to return
1419
+
1420
+ # Date Range Split.
1421
+ pre = rtn_dt[rtn_dt <= saturday_end]
1422
+ post = u.date_range_htf(
1423
+ self.holidays(),
1424
+ **(args | {"start": pre[-1], "periods": periods - len(pre) + 1}),
1425
+ )
1426
+ return pd.DatetimeIndex(pre.union(post)[:periods], dtype="datetime64[ns]")
1427
+
1428
+ # ---- Periods from End-Date ----
1429
+ elif end is not None and periods is not None:
1430
+ if end <= saturday_end:
1431
+ # All Dates pre-1952, Good to return the normal call
1432
+ return u.date_range_htf(self.holidays_pre_1952(), **args)
1433
+ else:
1434
+ rtn_dt = u.date_range_htf(self.holidays(), **args)
1435
+
1436
+ if rtn_dt[0] > saturday_end:
1437
+ return rtn_dt # never passed 1952, good to return
1438
+
1439
+ # Date Range Split
1440
+ post = rtn_dt[rtn_dt > saturday_end]
1441
+ _, period_code = u._standardize_htf_freq(frequency)
1442
+ altered_args = {
1443
+ # This nonsense is to realign the schedules as best as possible. This
1444
+ # essentially creates the 'pre-1952' equivalent date to the last generated 'post-1952'
1445
+ # date. Start the Range from there, then pre[0:-1] trims off that extra date where we
1446
+ # started from
1447
+ "end": post[0].to_period(period_code).end_time.normalize(),
1448
+ "periods": periods - len(post) + 2,
1449
+ }
1450
+ pre = u.date_range_htf(
1451
+ self.holidays_pre_1952(),
1452
+ **(args | altered_args),
1453
+ )
1454
+
1455
+ return pd.DatetimeIndex(pre[:-1].union(post)[-periods:], dtype="datetime64[ns]")
1456
+ else:
1457
+ _, _ = u._standardize_htf_freq(frequency)
1458
+ raise ValueError("This should never be raised, the above call should error first")
1459
+
1460
+ def early_closes(self, schedule):
1461
+ """
1462
+ Get a DataFrame of the dates that are an early close.
1463
+
1464
+ :param schedule: schedule DataFrame
1465
+ :return: schedule DataFrame with rows that are early closes
1466
+ """
1467
+ early = super().early_closes(schedule)
1468
+
1469
+ # make sure saturdays are not considered early closes if they are >= 12pm
1470
+ mc = early.market_close.dt.tz_convert(self.tz)
1471
+ after_noon = (mc - mc.dt.normalize()).ge(self._tdelta(self._saturday_close))
1472
+ return early[~(mc.dt.weekday.eq(5) & after_noon)]