Skip to content

Commit

Permalink
adding early closes for us sifma 2024
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin S committed Feb 5, 2024
1 parent b9bc1ca commit 47c442e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions pandas_market_calendars/holidays/sifma.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@

DayBeforeGoodFriday2pmEarlyCloseAdHoc = [
Timestamp("2022-04-14", tz="UTC"),
Timestamp("2024-03-28", tz="UTC"),
]

##################################################
Expand Down
20 changes: 20 additions & 0 deletions tests/test_sifma_calendars.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ def test_us_close_time_tz():
def test_us_weekmask():
assert sifma_us.weekmask == "Mon Tue Wed Thu Fri"


def test_us_2024():
start = "2024-01-01"
end = "2024-12-31"
Expand All @@ -112,6 +113,25 @@ def test_us_2024():
_test_holidays(sifma_us, holidays, start, end)
_test_no_special_opens(sifma_us, start, end)

# early closes we expect:
early_closes = [
pd.Timestamp("2024-03-28 2:00PM", tz="America/New_York"), # Good Friday
pd.Timestamp(
"2024-05-24 2:00PM", tz="America/New_York"
), # Day before Memorial Day
pd.Timestamp(
"2024-07-03 2:00PM", tz="America/New_York"
), # Day before Independence Day
pd.Timestamp(
"2024-11-29 2:00PM", tz="America/New_York"
), # Day after Thanksgiving
pd.Timestamp(
"2024-12-24 2:00PM", tz="America/New_York"
), # Day before Christmas
pd.Timestamp("2024-12-31 2:00PM", tz="America/New_York"), # New Year's Eve
]
_test_has_early_closes(sifma_us, early_closes, start, end)


def test_us_2023():
start = "2023-01-01"
Expand Down

0 comments on commit 47c442e

Please sign in to comment.