I have a full year of 2017 daily sales data and am looking forward to predicting the daily sales for next month. It has strong seasonality of 7, so what I did is to use Holt-Winters to calculate the level, trend and seasonal components from the 8th data points, fill it down in Excel till the last day of 2017, and start predicting from Jan/01/2018. I have the following questions:

  1. Is it necessary to use all the data I have? So far I have read a few tutorials about Holt-Winters and it seems that they don't use a lot of data (e.g. if they want to predict for the next 4 quarters they generally use past data of 3-4 years)

  2. Is it OK to predict for a whole month when the seasonality is 7? When predicting for the next month, I'm using the seasonal components 30 days ago, but since the data has a period of 7, should I only predict for the next WEEK with the seasonal components of last WEEK and then calculate the new seasonal components of THIS WEEK based on the predicted data, and go on like this? I'm pretty confused about this.


Well, more data is nearly always better than less, so the answer to Q1 is "yes". With only 365 data points you hardly have a big data computational problem, so why wouldn't you use it? More data gets you different (and almost certainly better) estimates of both the trend and the seasonal elements in the data.

However, you have a bigger problem which is that while you have enough data to pick up the frequency=7 weekly seasonality, just as (probably more) important will be an annual sales cycle. The sales in January 2017 will be very useful in forecasting sales for January 2018 - probably more useful than the recent December 2017 sales are. Unfortunately, with only one year of data, you aren't really in a position to identify the seasonal January effect from randomness, without making some additional assumptions. You need a minimum of two full periods (in this case, two years) to seasonally decompose a time series.

So you need to use some arbitrary method - there just isn't enough data to separate out into trend, the two levels of seasonality, and randomness. If it's for a stable firm you could just use last January's sales as the guess for this January's; if it's going through substantial growth or decline you're probably best off continuing with Holt-Winters which will at least pick up the trend, but that's very much a relatively best off, not a particularly strong endorsement!

Re your question 2, there's nothing stopping you forecasting any arbitrary number of days forward. Think of this thought experiment - you forecast forward 10 weeks ie 70 observations, and then just delete the final 40, 50, or 60 leaving you with 30, 20 or 10 forecast days.

You'll find it easier if you do this forecasting in a statistical package (eg open source R and the forecast R package which looks after it all for you with forecast(ets(mydata), h = 30) to do a 30 day forecast) which has it built in rather than trying to create the algorithm by hand in Excel. Of course, you then get a learning curve with getting your data into R but I'd say it would be worth it.

  • $\begingroup$ Hi Peter thanks for the comprehensive answer! It is indeed, as you mentioned that there is no way to feed the annual sales cycle into the model, and I'm preparing to propose to my manager that we either keep the model running but reduce the forecast period (to 14 days maybe?), or dump the model and simple use previous year's data and apply a "growth factor", which could be estimated by maybe Budget or something else. However, if I do have 24 months, how do I setup the model to fit BOTH the seasonal (weekly) and annual sales cycle? Thank you! $\endgroup$ – Nicholas Humphrey Jan 24 '18 at 0:05
  • 1
    $\begingroup$ For multiple frequency seasonality you need a more complex model and definitely need to take it out of Excel. See robjhyndman.com/hyndsight/seasonal-periods for one discussion. $\endgroup$ – Peter Ellis Jan 24 '18 at 0:12
  • $\begingroup$ Thanks! Really appreciate it. My probelm with R is that it's basically a black box, so giben chance I'd read books and do it manually. But I guess when time is stretched R is pretty good. $\endgroup$ – Nicholas Humphrey Jan 24 '18 at 0:27
  • $\begingroup$ Whether the weekly or yearly seasonality is more important depends very much on the time series. I have seen both. Typically, if sales are high enough that yearly seasonality is evident, then weekly seasonality is so, too. Regarding R: the functions in the forecast package are pretty well documented, especially once you look at the literature cited in the documentation, and you can always look at the source code. $\endgroup$ – Stephan Kolassa Jan 24 '18 at 12:02
  • $\begingroup$ @StephanKolassa Thanks! I think there is a clear similar pattern between years (correlation of 80% plus, not sure if it's the yearly seasonality you talked about?). I'm taking a naive approach now, just applying a multiplier (estimated with a comparison of 2017/01/01 ~ 2017/01/15 with 2018/01/01~2018/01/15), e.g. 85.24% on the data of previous year, to generate a forecast for the next month. This multiplier then get updated with new data. I'm pretty sure there are better approaches, but haven't found anything with similar accuracy (for now average 92% accuracy) $\endgroup$ – Nicholas Humphrey Jan 31 '18 at 3:03

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.