How can I add a missing date when a market was closed to a loaded calendar so I can use the date difference function bizdays() from library(bizdays)?
From NYSE's website:
Juneteenth National Independence Day Monday, June 20, 2022 (Juneteenth holiday observed)
But bizday() doesn't recognize 2022-06-20 as a NYSE market holiday
> library(bizdays)
> load_rmetrics_calendars(2000:2022)
Calendar Rmetrics/NYSE loaded
> bizdays.options$set(default.calendar = "Rmetrics/NYSE")
> is.bizday("2022-06-20")
[1] TRUE
The current version 4021.106 of the package timeDate with publication date 2022-9-29 resolved the issue and now recognizes 2022-06-20 as a market holiday for the NYSE:
For background, I previously encountered the issue with not flagging Juneteenth as a market holiday, because I was using the package timeDate dated 2018-02-21, and Juneteenth was not established as a US national holiday until 2021-06-18.