NYSE holiday before 1971
Yohan Chalabi
chalabi at phys.ethz.ch
Sat Feb 2 14:13:08 CET 2008
Hi Lukas,
thanks for your helpful feedback.
I will care about it in the following week.
regards,
Yohan
>>>> "LE" == Lukas Elmiger <l.elmiger at macxred.ch>
>>>> on Sat, 02 Feb 2008 03:01:53 +0100
LE> Hello
LE>
LE> Thanks for writing and maintaining the Rmetrics package!
LE>
LE> I am working with the Rmetrics holiday calendar and noticed
LE> a slight
LE> error in NYSE holidays before 1971.
LE> I have to admit my point to be picky (who cares about trading
LE> holiday's
LE> before 1971), but you might still want to correct the source
LE> code.
LE>
LE> According to NYSE's holiday calendar, Washington's birthay
LE> was observed
LE> at NYSE as follows:
LE> http://www.nyse.com/about/newsevents/1176373643795.html:[..] *
LE> Washington's Birthday was first declared a federal holiday by
LE> an 1879
LE> act of Congress. The Monday Holiday Law, enacted in 1968,
LE> shifted the
LE> date of the commemoration of Washington's Birthday from February
LE> 22 to
LE> the third Monday in February [..]
LE> http://www.nyse.com/pdfs/closings.pdf [..] Washington's Birthday
LE> (Feb.
LE> 22) Closed every year. Observed on Mondays since 1971.[..]
LE>
LE> The function holidayNYSE implements
LE> WashingtonsBirthday/PresidentsDay by
LE> calling USWashingtonsBirthday() before 1971 and USPresidentsDay()
LE> from
LE> 1971 on.
LE> Unfortunately, USWashingtonsBirthday() is defined in the same
LE> way as
LE> USPresidentsDay() (third Monday in February) instead of returning
LE> February 22nd.
LE> USWashingtonsBirthday <- function (year = currentYear)
LE> {
LE> # instead of the third Monday in February (ans =
LE> .nth.of.nday(year, 2, 1, 3))
LE> # use February 22nd as trading holiday on NYSE before 1971
LE> ans = year * 10000 + 222
LE> timeDate(as.character(ans))
LE> }
LE>
LE> Please also note a slight error in the holidayNYSE function: the
LE> following conditions are both TRUE for the year 1970. The second
LE> condition should read (y > 1970) instead of (y >= 1970).
LE> holidayNSYE <- function( year=currentYear )
LE> [..]
LE> if (y <= 1970)
LE> holidays = c(holidays, as.character(USWashingtonsBirthday(y)))
LE> if (y >= 1970)
LE> holidays = c(holidays, as.character(USPresidentsDay(y)))
LE> [..]
LE>
LE>
LE> Best Regards,
LE> Lukas Elmiger
LE>
LE>
LE>
LE>
LE>
LE> [[alternative HTML version deleted]]
LE>
LE> _______________________________________________
LE> Rmetrics-core mailing list
LE> Rmetrics-core at r-project.org
LE> https://stat.ethz.ch/mailman/listinfo/rmetrics-core
More information about the Rmetrics-core
mailing list