• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Hurricanes and NYSE holidays

sm625

Diamond Member
Sandy has reignited an age old problem I've had with trying to determine what days are NYSE holidays.

I want to have a C style function that takes any date and returns TRUE if the market was open (even partially) and FALSE if the market was closed the entire day, as follows


BOOL NYSE_Open(int mm, int dd, int yyyy)
{
insert code here
}

It needs to work for the current date, a date two weeks ago, and also dates going back a few years.
 
Last edited:
It's not as simple as you make it sound. Every year, the days the market is closed change based on the calendar day the holidays fall on.

I've worked for several trading firms and our 'market schedule' has always been some sort of database that lookups are performed on instead of an algorithm that generates true/false for a given date. You could simply have your database be a C-style data structure that you perform lookups on.

As for getting the data and dates... well, to get started, the NYSE publishes the holiday schedule for every year...
 
Yeah I found the NYSE schedule in a pdf format. I can parse through a text file and pull the data out, but I dont know if I want to go through the trouble of getting the data out of a pdf. Do you know if or where they publish a plain text schedule?
 
Back
Top