SCM

[#1356] Incorrect holiday dates for holidayNYSE

Date:
2011-04-14 18:40
Priority:
3
State:
Closed
Submitted by:
Corwin Joy (corwinjoy)
Assigned to:
Georgi Boshnakov (geobosh)
Hardware:
None
Product:
None
Operating System:
None
Component:
None
Version:
None
Severity:
normal
Resolution:
None
URL:
Summary:
Incorrect holiday dates for holidayNYSE

Detailed description
The function holidayNYSE does not return the actual realized holidays for the New York stock exchange. In particular if I call
holidayNYSE(1992:2011)

and compare it with our curated internal database of holidays for the New York stock exchange I find it is missing the following holidays / non-trading days over this period:

"1994-04-27" "2001-09-11" "2001-09-12" "2001-09-13" "2001-09-14" "2004-06-11" "2007-01-02"

You can also verify these are holidays by looking at a ticker such as "SPY" on Yahoo finance.


Thanks,

Corwin

Comments:

Message  ↓
Date: 2022-07-31 12:58
Sender: Georgi Boshnakov

I have now included the special closings in rev. 6267, using the links and comments provided by Ian and Corwin (thanks for all these). Haven't checked for more info after 2011 though. I have also the data for the early closings for later inclusion.

This involved some manual work and I may have got some wrong or misinterpreted what NYSE-Closings.pdf says. Some entries there specifies ranges, such as "four day week for a period, closing on Wednesdays except public holidays fall in the week".

There are entries documented as "closed Saturdays", a lot of them in the summers after WWII. Were Saturdays normally working days at the time? Or does this mean something else.
This doesn't currently matter since holidayNYSE() unconditionally removes Saturdays and Sundays from the holiday list and I didn't change that.

`holidayNYSE()` now has an argument 'type'. By default, the function gives all closing days. Standard holidays are obtained with `type = "standard"`. The special holidays with `type = "special`. I couldn't think of a simple, easily memorisable word for the default case and left it to the empty string, "", but would be happy to change it. For example, 2007-01-02 was a memorial day for president G.G. Ford. We have:

> holidayNYSE(2007)
NewYork
[1] [2007-01-01] [2007-01-02] [2007-01-15] [2007-02-19] [2007-04-06]
[6] [2007-05-28] [2007-07-04] [2007-09-03] [2007-11-22] [2007-12-25]
> holidayNYSE(2007, type = "standard")
NewYork
[1] [2007-01-01] [2007-01-15] [2007-02-19] [2007-04-06] [2007-05-28]
[6] [2007-07-04] [2007-09-03] [2007-11-22] [2007-12-25]
> holidayNYSE(2007, type = "special")
New_York
[1] [2007-01-02]

## Corwin's examples
> holidayNYSE(2004, type = "special")
New_York
[1] [2004-06-11]

> holidayNYSE(c(1994, 2001, 2004, 2007), type = "special")
New_York
[1] [1994-04-27] [2001-09-11] [2001-09-12] [2001-09-13] [2001-09-14]
[6] [2004-06-11] [2007-01-02]

I think that Christmas and New Years Day holidays for 2011 and 2012 (reported by Jonathan) don't need change - maybe they were wrong at the time of his report. (Note that holiday(), unlike holidayNYSE(), reports the actual holidays, not the modified ones for business purposes.)

Date: 2022-07-28 20:46
Sender: Ian E

I think that what you and Corwin are proposing for augmenting holidayNYSE() sounds great. My only suggestion is that if you do plan to eventually include a function to handle Early Closings (bug 6757) that you keep them in mind. (So that problems don't come up in the future when Early Closings are implemented.) Thanks for your time!

Date: 2022-07-28 15:13
Sender: Corwin Joy

Georgi,
Thanks for looking into this!
I agree with what you are saying.
I think users expect holidayXXX() to include special closings by default.
I think adding a parameter like
include.special.closings = TRUE
is the easiest way to resolve this.
Similar to what you suggest below.

Corwin

Date: 2022-07-28 14:45
Sender: Georgi Boshnakov

I am looking for opinions on how to resolve this and the related issue 6757.

Am I right in thinking that users expect holidayXXXX() functions to return the dates when the corresponding exchange was closed for whatever reason rather than just for regular holidays?

If so, I could add an argument, say drop.specials, with default FALSE. If only regular holidays are desired it could be set to TRUE in the call to holidayNYSE().

An alternative could be for the new argument to have, say, three possible values: c("all", "regular", "special"), such that the default "all" gives all closings and the others give
the regular and special closings respectively.


Date: 2022-07-19 07:01
Sender: Georgi Boshnakov

I will think about addressing the issues raised here. A closely related issue about early closing times is #6757.

Date: 2022-01-27 22:16
Sender: Ian E

I agree that a function (perhaps called "specialcloseNYSE()"?) to complement holidayNYSE() would be useful. Here's a link to a list of NYSE special closes through 2011-01: http://s3.amazonaws.com/armstrongeconomics-wp/2013/07/NYSE-Closings.pdf

Since then, the only special closes I'm aware of are 2012-10-29 and 2012-10-30, when the NYSE was closed for two days due to Hurricane Sandy.

Date: 2012-01-05 04:26
Sender: Jonathan Owen

The Christmas and New Years Day holidays for 2011 and 2012 are also incorrect (should be 12/26/2011 and 1/2/2012).

http://corporate.nyx.com/holidays-and-hours/nyse

Date: 2011-04-14 19:10
Sender: Corwin Joy

In fact, these missed dates are all "Special Closings". Probably a "Special Closings" piece needs to be added to the function.

Date: 2011-04-14 19:01
Sender: Corwin Joy

In fact, many of these closings represent "Special Closings" as documented by the NYSE here: http://www.nyse.com/pdfs/closings.pdf

For example,
June 11, 2004 (Fri) Closed in observance of the National Day of Mourning for former President Ronald W. Reagan (died June 5, 2004).

Attached Files:

Changes

Field Old Value Date By
status_idOpen2022-08-02 09:21geobosh
close_dateNone2022-08-02 09:21geobosh
assigned_tonone2022-07-28 14:45geobosh
Thanks to:
Vienna University of Economics and Business Powered By FusionForge