Am 26.10.2018 um 15:28 schrieb Allin Cottrell:
On Fri, 26 Oct 2018, Sven Schreiber wrote:


Confirmed indeed. This seems to affect only daily data (5,6,7), because quarterly (4), monthly (12), weekly (52), hourly (24) and other frequency (e.g. 20) all work for me.

Hmm, I've looked into this and it seems that treating dated daily data specially was by design, though I accept that the design was probably wrong.

Maybe it predates the distinction of daily data without weekends or something? But that's just a wild guess.


I think the idea was that for many daily series an NA really means a non-existent value (e.g. no trading took place) rather than a missing value in the usual sense. However, if the user reckons a particular day should be skipped rather then treated as missing, this should probably be handled in the construction of the primary series and not at the point of generating its lags.
Yes.


If we're agreed that what we do at present is wrong, it's easy to fix: we can just disable the special-casing of dated daily data.
Right now it seems plain wrong, yes.

thanks,
sven