rsheftel / pandas_market_calendars

Exchange calendars to use with pandas for trading applications
MIT License
803 stars 173 forks source link

June 19, 2023 - is a holiday #349

Closed ericvoots closed 1 month ago

ericvoots commented 1 month ago

Hi,

Using NYSE the package is returning 2023-06-19 as a date the market was open. The market was not open that day and was on a monday and the market was closed for juneteenth.

ericvoots commented 1 month ago

It also missing the same holiday but on 2022-06-20

ericvoots commented 1 month ago

example code

import pandas_market_calendars as mcal nyse = mcal.get_calendar('NYSE') date_to_check = pd.Timestamp('2022-02-21') market_holidays = nyse.holidays().holidays is_holiday = date_to_check in market_holidays

is_holiday True date_to_check = pd.Timestamp('2022-06-20') is_holiday = date_to_check in market_holidays is_holiday False

ericvoots commented 1 month ago

actually my mistake, i had an old docker container and the version of this package was out of date, disregard