diff --git a/trading_calendars/exchange_calendar_cmes.py b/trading_calendars/exchange_calendar_cmes.py index ebcb0397..8c3a1557 100644 --- a/trading_calendars/exchange_calendar_cmes.py +++ b/trading_calendars/exchange_calendar_cmes.py @@ -30,7 +30,9 @@ from .us_holidays import ( USNewYearsDay, Christmas, - ChristmasEveBefore1993, + ChristmasEveBefore1945, + ChristmasEveBefore1946To1955, + ChristmasEveAfter1957Before1993, ChristmasEveInOrAfter1993, USBlackFridayInOrAfter1993, USNationalDaysofMourning, @@ -102,7 +104,9 @@ def special_closes(self): USIndependenceDay, USThanksgivingDay, USBlackFridayInOrAfter1993, - ChristmasEveBefore1993, + ChristmasEveBefore1945, + ChristmasEveBefore1946To1955, + ChristmasEveAfter1957Before1993, ChristmasEveInOrAfter1993, ]) )] diff --git a/trading_calendars/exchange_calendar_xnys.py b/trading_calendars/exchange_calendar_xnys.py index eca38d95..80142542 100644 --- a/trading_calendars/exchange_calendar_xnys.py +++ b/trading_calendars/exchange_calendar_xnys.py @@ -29,7 +29,9 @@ August45VictoryOverJapan, Christmas, ChristmasBefore1954, - ChristmasEveBefore1993, + ChristmasEveBefore1945, + ChristmasEveBefore1946To1955, + ChristmasEveAfter1957Before1993, ChristmasEveInOrAfter1993, ChristmasEvesAdhoc, DayAfterChristmasAdhoc, @@ -235,7 +237,12 @@ def special_closes(self): ( time(14), HolidayCalendar( - [ChristmasEveBefore1993, USBlackFridayBefore1993, ] + [ + ChristmasEveBefore1945, + ChristmasEveBefore1946To1955, + ChristmasEveAfter1957Before1993, + USBlackFridayBefore1993, + ] ), ), ] @@ -246,7 +253,7 @@ def special_closes_adhoc(self): ( self.regular_early_close, DatetimeIndex( - ["1997-12-26", "1999-12-31", "2003-12-26", ], tz=UTC, + ["1997-12-26", "1999-12-31", "2003-12-26"], tz=UTC, ), ) ] diff --git a/trading_calendars/us_holidays.py b/trading_calendars/us_holidays.py index 132f0119..bc98f9b2 100644 --- a/trading_calendars/us_holidays.py +++ b/trading_calendars/us_holidays.py @@ -46,11 +46,29 @@ def following_tuesday_every_four_years_observance(dt): # These have the same definition, but are used in different places because the # NYSE closed at 2:00 PM on Christmas Eve until 1993. -ChristmasEveBefore1993 = Holiday( +ChristmasEveBefore1945 = Holiday( "Christmas Eve", month=12, day=24, - end_date=Timestamp("1993-01-01"), + end_date=Timestamp("1945-12-01"), + # When Christmas is a Saturday, the 24th is a full holiday. + days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY), +) +ChristmasEveBefore1946To1955 = Holiday( + "Christmas Eve", + month=12, + day=24, + start_date=Timestamp("1946-01-01"), + end_date=Timestamp("1956-01-01"), + # When Christmas is a Saturday, the 24th is a full holiday. + days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY), +) +ChristmasEveAfter1957Before1993 = Holiday( + "Christmas Eve", + month=12, + day=24, + start_date=Timestamp("1957-01-01"), + end_date=Timestamp("1992-12-31"), # When Christmas is a Saturday, the 24th is a full holiday. days_of_week=(MONDAY, TUESDAY, WEDNESDAY, THURSDAY), )