Just to clarify - I realize that "major" is subjective here. Maybe I
should say "most common".
But maybe there is a way for me to select from a list of all NYSE
holidays and flag only some of them?
Just not sure how to do it...
Thanks!
Dimitri
On Mon, Aug 1, 2011 at 3:45 PM, Dimitri Liakhovitski
<dimitri.liakhovitski at gmail.com> wrote:> Hello!
>
> I am trying to identify which ones of a vector of dates are US
> holidays. And, ideally, which is which. And I do not know (a-priori)
> which dates those should be.
> I have, for example:
>
?x<-seq(as.Date("2011-01-01"),as.Date("2011-12-31"),by="day")
> (x)
>
> I think chron should help me here - but maybe I am not using it properly:
>
> library(chron)
> is.holiday(chron) # Says that none of those dates are holidays
>
> ?is.holiday says: "holidays" is an object that should be listing
> holidays. But I want to figure out which of my dates are US holidays
> and don't want to provide a list of
>
> Package timeDate does almost what I need:
> library(timeDate)
> holidayNYSE(2008:2010)
> holidayNYSE()
>
> However, I don't need all the NYSE holidays (like Good Friday). Just
> the major US holidays - New Years, MLK, Memorial Day, Independence
> Day, Labor Day, Halloween, Thanksgiving, Christmas.
> Is there any way to identify major US holidays?
>
> Thanks a lot!
>
> -
> Dimitri Liakhovitski
> marketfusionanalytics.com
>
--
Dimitri Liakhovitski
marketfusionanalytics.com