Learn R Programming

timeDate (version 4041.110)

holidayNYSE: NYSE holiday calendar

Description

Returns a holiday (closing days) calendar for the New York Stock Exchange.

Usage

holidayNYSE(year = getRmetricsOptions("currentYear"), 
            type = c("", "standard", "special"))

Value

an object of class "timeDate"

Arguments

year

an integer value or vector of years, formatted as YYYY.

type

what to include, a character string. The default is to return all closing days (holidays and specials). "standard" requests only closings associated with the standard public holidays, "special" gives the special closings only.

Author

Diethelm Wuertz (original author); Yohan Chalabi improved speed and handling of time zone; Georgi N. Boshnakov added the special closings and argument ‘type’.

Details

holidayNYSE generates a list of the clossing days of the exchange for the requested years.

The default is to return all closing days (holidays and specials). type = "standard" requests only closings associated with the standard public holidays, type = "special" gives the special closings only.

See Also

earlyCloseNYSE for times of early closings

Examples

Run this code
## holidayNYSE
holidayNYSE() ## current year
holidayNYSE(2008:2010)

## January 2, 2007 was a memorial day for president G.R. Ford,
##    not a regular public holiday
holidayNYSE(2007)
holidayNYSE(2007, type = "standard")
holidayNYSE(2007, type = "special")

Run the code above in your browser using DataLab