Skip to content

Update NYSE holidays: add HALF_DAY category support for reduced trading hours days #2976

@PPsyrius

Description

@PPsyrius

Is your feature request related to a problem? Please describe.
From #784

I observe that a similar situation takes place for NYSE, which has so-called reduced trading hours days when it closes at 13:00 (see footnotes at https://www.nyse.com/markets/hours-calendars#holidays).

Having some sort of standardized mechanism to handle those days would be nice and potentially very useful. Maybe add a partial boolean argument to the method, which if set to True will cause partial holidays to be returned as well as the full day ones, and that the partial ones have a label which ends with a country-standardized annotation in brackets (e.g., for NYSE, "Day after Thanksgiving [13:00 close]"?

Describe the solution you'd like
We do have HALF_DAY category nowadays, here's an example implementation from Australia:

    def _populate_subdiv_nt_half_day_holidays(self):
        if self._year >= 2016:
            # %s (from 7pm).
            begin_time_label = self.tr("%s (from 7pm)")

            # Christmas Eve.
            self._add_christmas_eve(begin_time_label % self.tr("Christmas Eve"))

            # New Year's Eve.
            self._add_new_years_eve(begin_time_label % self.tr("New Year's Eve"))

Additional context
The list includes:

  • Day before Independence Day (July 3rd)
  • Day after Thanksgiving Day
  • Christmas Eve (if it's not "Christmas Day (observed)")

You might need to check when this was first implemented, and if there are any additional historical ones

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions