robjhyndman / forecast

Forecasting Functions for Time Series and Linear Models
http://pkg.robjhyndman.com/forecast
1.1k stars 340 forks source link

update bizdays tests for timeDate (>= 4021.105) #921

Closed GeoBosh closed 1 year ago

GeoBosh commented 1 year ago

This updates the bizdays() tests to work with the updated information in 'timeDate'. I have made them conditional on 'timeDate (>= 4021.105)', since the values returned by older versions were incorrect in some cases. I would appreciate if you could update 'forecast' on CRAN since I need to submit a revision to deal with a new error in timeDate due to a recent change in R-devel of as.character() for POSIX*t objects.

Long story: I have completed the update for the New York stock exchange's non-business days. I used information from NSE itself, so they should be complete. Further changes to historical holidays will be needed only if there are bugs. Similarly for Toronto, but not so exhaustively. Also, although the holiday functions in 'timeDate' technically may be correct to return only official holidays (and not off-days due to hurricanes or snow, for example) users actually expect that all non-business days are returned. I have now amended the holiday function for the NSE to do exactly that. So, now the complement of its result (+ weekends) should really give the non-business days for NSE.

robjhyndman commented 1 year ago

Now submitted to CRAN