holidayCalendar {fCalendar}R Documentation

Holiday Calendars

Description

Returns a holiday calendar.

Usage

holidayNYSE(year = currentYear)
holidayZURICH(year = currentYear)

Arguments

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

Details

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.

Value

holidayNYSE
holidayZURICH
return an holiday calendar as an object of class timeDate.

Author(s)

Diethelm Wuertz for the Rmetrics R-port.

References

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.

Examples

## 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)

[Package fCalendar version 260.72 Index]