Inconsistency in timeDate between isBizday and holidayNYSE

Yohan Chalabi chalabi at phys.ethz.ch
Wed Feb 1 15:51:17 CET 2012


On 30 janv. 2012, at 00:03, Klemen Koselj wrote:

> Hello timeDate package maintenars,
> 
> Thank you for great rmetrics packages. Thanks for yll the effort in
> developing and maintaining them.
> 
> I have encountered some issues with using timeDate package. Itcan of course
> be that I just do not understand a few things...
> 
> I am trying to check whether a particular date is business day (NYSE
> opened). When I check this for 2011-12-26 isBizday returns TRUE while
> holidayNYSE returns FALSE which is correct...
> 
>> isBizday(as.timeDate("2011-12-26"))
> 2011-12-26
>      TRUE
>> holidayNYSE(2011)
> NewYork
> [1] [2011-01-17] [2011-02-21] [2011-04-22] [2011-05-30] [2011-07-04]
> [6] [2011-09-05] [2011-11-24] [2011-12-26]
>> isBizday(as.timeDate("2011-12-26"), holidayNYSE())

Hi,

you are missing the year argument in holidayNYSE() :

isBizday(as.timeDate("2011-12-26"), holidayNYSE(2011))

HTH
Yohan

> 2011-12-26
>      TRUE
> 
> What am I missing here?
> 
> Thanks in advance.
> 
> Kind regards,
> Klemen.
> 
> 	[[alternative HTML version deleted]]
> 
> _______________________________________________
> Rmetrics-core mailing list
> Rmetrics-core at r-project.org
> https://stat.ethz.ch/mailman/listinfo/rmetrics-core
>



More information about the Rmetrics-core mailing list