From 8408a5df623d632de9ae44c4b910ddabddac0693 Mon Sep 17 00:00:00 2001 From: w3stling Date: Wed, 1 Jan 2025 09:08:16 +0000 Subject: [PATCH 1/2] Add Jimmy Carter Day of Mourning --- exchange_calendars/exchange_calendar_xnys.py | 1 + exchange_calendars/us_holidays.py | 2 ++ tests/test_xnys_calendar.py | 1 + 3 files changed, 4 insertions(+) diff --git a/exchange_calendars/exchange_calendar_xnys.py b/exchange_calendars/exchange_calendar_xnys.py index f8b61028..f692a169 100644 --- a/exchange_calendars/exchange_calendar_xnys.py +++ b/exchange_calendars/exchange_calendar_xnys.py @@ -146,6 +146,7 @@ class XNYSExchangeCalendar(ExchangeCalendar): - Closed at 1:00 PM on Friday, December 31, 1999 - Closed at 1:00 PM on Friday, December 26, 1997 - Closed at 1:00 PM on Friday, December 26, 2003 + - Closed on 1/9/2025 due to Jimmy Carter's death. NOTE: The exchange was **not** closed early on Friday December 26, 2008, nor was it closed on Friday December 26, 2014. The next Thursday Christmas diff --git a/exchange_calendars/us_holidays.py b/exchange_calendars/us_holidays.py index b905b0a4..c1a2e394 100644 --- a/exchange_calendars/us_holidays.py +++ b/exchange_calendars/us_holidays.py @@ -361,6 +361,7 @@ def following_tuesday_every_four_years_observance(dt): # - President Gerald R. Ford - Jan 2, 2007 # - President George H.W. Bush - Dec 5, 2018 # added Truman and Johnson to go back to 1970 +# - President Jimmy Carter - Jan 5, 2025 # http://s3.amazonaws.com/armstrongeconomics-wp/2013/07/NYSE-Closings.pdf USNationalDaysofMourning = [ Timestamp("1963-11-25"), @@ -372,4 +373,5 @@ def following_tuesday_every_four_years_observance(dt): Timestamp("2004-06-11"), Timestamp("2007-01-02"), Timestamp("2018-12-05"), + Timestamp("2025-01-09"), ] diff --git a/tests/test_xnys_calendar.py b/tests/test_xnys_calendar.py index ffbafce8..835f72c9 100644 --- a/tests/test_xnys_calendar.py +++ b/tests/test_xnys_calendar.py @@ -61,6 +61,7 @@ def adhoc_holidays_sample(self): "1994-04-27", # Richard Nixon "1973-01-25", # Lyndon B. Johnson "1972-12-28", # Harry S. Truman + "2025-01-09", # Jimmy Carter # National Days of Mourning ] From 71e6d2280895575d076896aa26334498836eb0c2 Mon Sep 17 00:00:00 2001 From: Peter Westling Date: Fri, 3 Jan 2025 09:16:38 +0100 Subject: [PATCH 2/2] Update exchange_calendars/us_holidays.py Co-authored-by: Arseniy Poroshin --- exchange_calendars/us_holidays.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exchange_calendars/us_holidays.py b/exchange_calendars/us_holidays.py index c1a2e394..edb3c47c 100644 --- a/exchange_calendars/us_holidays.py +++ b/exchange_calendars/us_holidays.py @@ -360,8 +360,8 @@ def following_tuesday_every_four_years_observance(dt): # - President Ronald W. Reagan - June 11, 2004 # - President Gerald R. Ford - Jan 2, 2007 # - President George H.W. Bush - Dec 5, 2018 +# - President Jimmy Carter - Jan 9, 2025 # added Truman and Johnson to go back to 1970 -# - President Jimmy Carter - Jan 5, 2025 # http://s3.amazonaws.com/armstrongeconomics-wp/2013/07/NYSE-Closings.pdf USNationalDaysofMourning = [ Timestamp("1963-11-25"),