I'm working on data consisting in product sales over a period of more than a year. The purpose is that of forecasting future values of the sales, but as of now I'm trying to fit my data..
ts <- xts(sales,order.by=dates,frequency=7)
First of all I thought about checking whether I could obtain stationarity allowing to fit models like ARMA or ARIMA. There's no particular trend but there is a cyclic component, so I chose to first difference my data:
It looks stationary, I may choose to transform the data to stabilize the variance. Though what I'm interested in is to check the ACF and PACF functions, to try to infer orders of AR and MA components. Here is the ACF and PACF (of the original data, not 1st difference). I don't find them pretty intuitive as both contain some AR characteristics (there seems to be a weekly seasonal component) as MA (the PACF seems sinusoidal and not cut off as a just AR model would suggest). To give further information I plot also september 2015 data just to show the possible weekly seasonal component:
Every saturday there's a spark in sales followed by a deep (note however that one week the deep is on Monday (september the 7th) the next 3 weeks is on Wednesday) So, it seems difficult to me to guess the proper model, in particular the proper orders of p,d and q in the ARIMA. I get help from R:
fit <- auto.arima(sales, approximation=FALSE,trace= FALSE)
With R choosing a ARIMA (3,1,2) with no seasonal component. Augmentd Dickey-Fuller test gives a 3.5% p-value where H1 is stationarity, so it seems stationary.
I have a couple of questions:
- Is it correct to consider the whole series or would you rather suggest to consider a thinner period where there is no particular trend given by the cyclical component? For instance September-Decemeber 2015.
- What did I miss in the ACF and PACF plots? The examples I often find on textbooks are trivial with a slowly decaying ACF and a cut off PACF for an AR(viceversa for a MA), but here my low expertise doesn't make ring any bell.
- I didn't consider exponential smoothing techniques, given the stationarity and no trend, would you suggest any other technique (state space models maybe) ?
Thank you very much for your help and sorry for the length of the post, but I do believe this can help you in helping me with the problem.