0
$\begingroup$

I'm attempting to create a forecast from time series data that has observations only on weekdays. The goal is to produce a forecast that mirrors these data/predicts similar future data, having reasonable forecasted results for weekdays and either values of 0 on weekends or without data points on weekends.

I've been using msts in R (I have multiple seasonality) and tbats, which has been producing good results for me, aside from the aforementioned problem. If my input includes data points for weekends with values of 0 then future weekend values are forecasted much lower than weekdays, but are still non-zero. If input doesn't include the weekend data points then future weekend data are forecasted regardless, at approximately the level of the weekdays.

I have considered manually setting the weekend values to 0 after running the forecast, but it doesn't seem very elegant. I'd appreciate any direction you can give me.

$\endgroup$
  • 1
    $\begingroup$ No idea about how to do it in R but a fairly standard idea under the heading of "business calendar" and perhaps other terms is that the clock just stops at weekends, so your time metric is just sequence in a series of days with business. That can't rule out jumps from Friday to Monday for other reasons but you usually get that any way. Zeros for weekends sound perfectly sensible as recording what didn't happen, but I can't see them doing anything but messing up model formulation and estimation. $\endgroup$ – Nick Cox Feb 7 '18 at 16:23
  • 1
    $\begingroup$ What happens at weekends? If, for example, the shop is closed, then most reasonable strategy would be to ignore them, i.e. Mondays would appear after Fridays. $\endgroup$ – Tim Feb 7 '18 at 17:04
1
$\begingroup$

Setting 0 on weekends is almost never going to be a good idea. I'll give an example when it is a good idea: sales in stores, where the stores are closed on weekends. In this case the sales are truly zero on weekends. It seems that in your case you do not observe the variable, but it may have a value. For instance, you have a swimming pool that is closed on weekends. Your staff measures chlorine levels every day. So, chlorine level is not zero on weekends just because your staff is out.

What can you do? It really depends on the application. This is all about treating missing data, a subject of its own, google it. I'll give you one example from finance. The stock prices are usually reported on work days only, or to be precise when the exchanges are open. Yet, the stocks do not stop having the value outside trading hours, and moreover, they are even traded off hours and the prices are available in principle. However, a lot of analysis is done on daily closing prices, and these are retrieved for trading days only. There are many reasons for doing this, I won't delve here. Anyhow, when working with these series you get 20-22 observations per month. Usually, we ignore non-trading days. So, when building a model you simply pretend that a year has 250 (or so) trading days, and simply skip non-trading days as if they never existed. That's one approach, and it's quite common. It's not the only one that is used, of course

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.