From f2ff17e180493a035563b4e66dfbf165decfa437 Mon Sep 17 00:00:00 2001 From: BM Cho Date: Thu, 30 Jul 2026 17:59:45 +0800 Subject: [PATCH] Update US equity market hours through 2028 --- Data/market-hours/market-hours-database.json | 13 +++++++- .../Securities/MarketHoursDatabaseTests.cs | 30 +++++++++++++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) diff --git a/Data/market-hours/market-hours-database.json b/Data/market-hours/market-hours-database.json index d3d86c696998..2a10e4ffcb45 100644 --- a/Data/market-hours/market-hours-database.json +++ b/Data/market-hours/market-hours-database.json @@ -151,6 +151,7 @@ "1/20/2025", "1/19/2026", "1/18/2027", + "1/17/2028", "2/16/1998", "2/15/1999", "2/21/2000", @@ -181,6 +182,7 @@ "2/17/2025", "2/16/2026", "2/15/2027", + "2/21/2028", "4/10/1998", "4/2/1999", "4/21/2000", @@ -211,6 +213,7 @@ "4/18/2025", "4/3/2026", "3/26/2027", + "4/14/2028", "5/25/1998", "5/31/1999", "5/29/2000", @@ -241,6 +244,7 @@ "5/26/2025", "5/25/2026", "5/31/2027", + "5/29/2028", "6/11/2004", "6/20/2022", "6/19/2023", @@ -248,6 +252,7 @@ "6/19/2025", "6/19/2026", "6/18/2027", + "6/19/2028", "7/3/1998", "7/5/1999", "7/4/2000", @@ -278,6 +283,7 @@ "7/4/2025", "7/3/2026", "7/5/2027", + "7/4/2028", "9/7/1998", "9/6/1999", "9/4/2000", @@ -308,6 +314,7 @@ "9/1/2025", "9/7/2026", "9/6/2027", + "9/4/2028", "9/11/2001", "9/12/2001", "9/13/2001", @@ -344,6 +351,7 @@ "11/27/2025", "11/26/2026", "11/25/2027", + "11/23/2028", "12/05/2018", "12/25/1998", "12/24/1999", @@ -374,7 +382,8 @@ "12/25/2024", "12/25/2025", "12/25/2026", - "12/24/2027" + "12/24/2027", + "12/25/2028" ], "earlyCloses": { "7/3/2000": "13:00:00", @@ -393,6 +402,7 @@ "7/3/2023": "13:00:00", "7/3/2024": "13:00:00", "7/3/2025": "13:00:00", + "7/3/2028": "13:00:00", "11/26/1999": "13:00:00", "11/24/2000": "13:00:00", "11/23/2001": "13:00:00", @@ -422,6 +432,7 @@ "11/28/2025": "13:00:00", "11/27/2026": "13:00:00", "11/26/2027": "13:00:00", + "11/24/2028": "13:00:00", "12/24/2001": "13:00:00", "12/24/2002": "13:00:00", "12/24/2003": "13:00:00", diff --git a/Tests/Common/Securities/MarketHoursDatabaseTests.cs b/Tests/Common/Securities/MarketHoursDatabaseTests.cs index 3d38072068b7..74e94c204688 100644 --- a/Tests/Common/Securities/MarketHoursDatabaseTests.cs +++ b/Tests/Common/Securities/MarketHoursDatabaseTests.cs @@ -128,6 +128,36 @@ public void CorrectlyReadsUsEquityEarlyCloses() Assert.AreEqual(earlyCloseTime, equityHours.EarlyCloses[date]); } + [Test] + public void CorrectlyReadsUsEquity2028SpecialHours() + { + var exchangeHours = MarketHoursDatabase.FromDataFolder() + .GetExchangeHours(Market.USA, null, SecurityType.Equity); + + var holidays = new[] + { + new DateTime(2028, 1, 17), + new DateTime(2028, 2, 21), + new DateTime(2028, 4, 14), + new DateTime(2028, 5, 29), + new DateTime(2028, 6, 19), + new DateTime(2028, 7, 4), + new DateTime(2028, 9, 4), + new DateTime(2028, 11, 23), + new DateTime(2028, 12, 25) + }; + + foreach (var holiday in holidays) + { + Assert.IsTrue(exchangeHours.Holidays.Contains(holiday)); + } + Assert.IsFalse(exchangeHours.Holidays.Contains(new DateTime(2028, 1, 1))); + + var earlyCloseTime = new TimeSpan(13, 0, 0); + Assert.AreEqual(earlyCloseTime, exchangeHours.EarlyCloses[new DateTime(2028, 7, 3)]); + Assert.AreEqual(earlyCloseTime, exchangeHours.EarlyCloses[new DateTime(2028, 11, 24)]); + } + [TestCase("AUP", Market.COMEX, true)] [TestCase("AA6", Market.NYMEX, true)] [TestCase("6A", Market.CME, false)]