| holidayCalendar {fCalendar} | R Documentation |
Returns a holiday calendar.
holidayNYSE(year = currentYear) holidayZURICH(year = currentYear)
year |
an integer value or vector of years, formatted as YYYY.
|
Holiday Calendars:
Two examples are implemented, the holiday calendar for the
New York Stock Exchange, and the public holidays for Zurich.
Have a look on the code to write your own holiday calendars.
holidayNYSE
holidayZURICH
return an holiday calendar as an object of class timeDate.
Diethelm Wuertz for the Rmetrics R-port.
ISO-8601 (1988); Data Elements and Interchange Formats - Information Interchange, Representation of Dates and Time, International Organization for Standardization, Reference Number ISO 8601, 14 pages.
## holidayNYSE -
holidayNYSE(currentYear)
## holidayZURICH =
## Not run:
holidayZURICH = function(year = currentYear) {
holidays = c(
NewYearsDay(year),
GoodFriday(year),
EasterMonday(year),
LaborDay(year),
PentecostMonday(year),
ChristmasDay(year),
BoxingDay(year),
CHBerchtoldsDay(year),
CHSechselaeuten(year),
CHAscension(year),
CHConfederationDay(year),
CHKnabenschiessen(year) )
# Sort and Remove Weekends:
holidays = sort(holidays)
holidays = holidays[isWeekday(holidays)]
# Add Financial Center:
holidays@FinCenter = "Zurich"
# Return Value:
holidays }
## End(Not run)
holidayZURICH(2007:2009)