# Neural Networks: Forecasting daily data

My data:

• I have a univariate daily time series.
• My data consists of three years of data.
• There are no missing values
• The data exhibits strong seasonalities
• I can be absolutely sure that the seasonalities for the future are verisimilar to those of the past, e.g. before Christmas we sell more
• All values are positiv integer values ranging from 1 000 to 100 000
• There dataset exhibits a trend. The trend is not linear.
• There dataset is trend-stationary/ close to trend-stationarity. There are seasonalities, but there are not Unit roots.
• The data is the number of items my company sells per day, but I would like to use the same algorithm for the daily revenue and for several other KPIs.

Aims:

I would like to forecast the next six months of daily data. It is important that the daily values are as accurate as possible, but the algorithm should also deliver a reasonable amount for the total amount of items sold in the upcoming six months. If possible I want to use a neural net, e.g. a recurrent neural net or a feed-forward neural net.

What I have tried so far:

Until now I have tried auto.arima from the forecasting packages, as well as some other autoregressive models and the nnet command from the forecast package in R. I tested the models by forecasting the last 6 months with the data and comparing it to the actuals. Among all the models I used the arima model delivered the best results.

Bonus:

• Could you also provide me with some code in R?
• Can I also take your model when some of my assumptions change, e.g. when there is a unit root or when I have to forecast for an entire year?
• If you have seasonality and/or trend, then your time series is by definition not stationary. Daily sales data typically exhibit multiple-seasonalities, which ARIMA models don't capture, so I'm a little surprised that ARIMA should yield the best forecasts - you may want to look through previous answers in that tag. Why do you explicitly want to use NNs? – Stephan Kolassa Jul 20 '17 at 9:24
• I clarified the part with stationarity. I meant that there are no Unit roots or structural breaks. If neural-nets are inadequate in this case you can propose an other algorithm. In the past I mostly use autoregressive models and in some cases I have the intuition that other algorithms like NNs could yield better results. – Ferdi Jul 20 '17 at 9:29
• Three years of daily data are just 1000 data points, that's not a lot for NNs. I'd much rather start looking at tbats models. – Stephan Kolassa Jul 20 '17 at 10:05
• Why do you suggest autoregressive models? How much years of data would I need for a NN? – Ferdi Jul 20 '17 at 10:40
• NNs are somewhat data hungry. I can't say offhand how much data you'd need. tbats models are specifically developed for series with multiple-seasonalities, and the autoregressive part is only one small component, the "A" in TBATS. Essentially, the seasonalities are modeled using trigonometric functions ("T"), and the ARIMA is only applied to residuals from the seasonal and trend model. – Stephan Kolassa Jul 20 '17 at 11:11