Predicting on data with gaps in date variable
I'm trying to predict on a test data where there are no values for weekends and holidays.
It seems to me that this is not allowed. At least when I try to predict such data I get this error:
predict(object = fitted, new_data = test_data_tbl, past_data = total_train_tbl)
Error in `verify_new_data()`:
! `new_data` includes obs that we can't generate predictions.
✖ Found `87` observations.
Here there is a gap in the test data, i.e. no observations for weekends.
For retail data where stores are closed during weekends, should I create value for the weekend and simply impute as zero since there is zero sales during weekends?
Similar for financial data where there is no trading on weekends, what should I do in such scenario? Creating artificial value for a stock price during weekends (weekend prices = closing on friday?).
Currently, I'd either fake the dates, so you have continuous date or impute as zero and add that weeked flag. We rely on tsbibble for generating the future data and this is currently not implemented for it: https://github.com/tidyverts/tsibble/issues/18
We should probably refactor tsibble out, and using something like https://clock.r-lib.org which supports better ways to specify calendars.