Am 13.07.2022 um 16:16 schrieb Cottrell, Allin:
nols/yrs is 4.875. So you'd have to place 4 or 5 holidays per
year.
Christmas, the 4th of July, and New Year are good candidates. Not sure
how you'd place the rest.
Hm, but something's weird with the dayskip description. If the first obs
is Jan 3rd, 1984 (1984-01-03), then according to weekday() the first
couple of obs where dayskip is 1 would be Fridays (weekday() is 5
there). But the series' label says "no trading took place on the
previous day". Should this perhaps rather say "on the next day?".
And about placing the other holidays: You "just" would have to loop
through the series from the beginning, and every time you hit a
dayskip==1 which does not belong to a weekend, you insert a new NA. This
would break down if there were two or more consecutive non-weekend
holidays. Can this happen? OK, this is clearly not very important, but
maybe I can supply the needed information at some point in the future.
thanks
sven