Hi I am working on a data representing daily sales of a product. I have five years of data and I need to forecast daily sales for next 30 days. As I have daily data I created my ts series as noted bellow;

x<-ts(project.shortt$x,frequency = 365.25,start=2014+1/365.25)

then I skipped to auto.arima modelling and determine my model as ARIMA(0,1,5)+ exogenous holiday, day of week and fourier terms.

fit <- auto.arima(x.ts, xreg=cbind(fourier(x, K=7),dummies.training_week), seasonal=TRUE,biasadj = TRUE,lambda="auto")

by using fourier, I am able to cover seasonalities, but also for remaining seasonal effects I left argument, seasonal=TRUE

However, unless I had a stationary residual series coming from ARIMAX, and they are also nearly normally distributed, I observe a very problematic ACF plot, which indicates statistically significant auto correlations for all lags.

CheckResidulas output for daily model

I am not sure what's the problem but if I am not wrong an I(0) stationary is not expected to contain any auto correlations for any lags. Because finally it follows a white noise pattern. I am not sure what causes the problem, is there weird kind of seasonality in my series or not?

Moreover, after searching through questions on daily forecasts I come upon one of robjhyndman's answers.


After changing my ts's frequency as Professor Hyndman suggested my ACF figures differs significantly

y <- ts(x, frequency=7)

Check Residuals output after frequency change

But my Ljung-Box statistics still refers that I have significant auto correlations in my data.

    Ljung-Box test

data:  Residuals from Regression with ARIMA(3,0,2)(2,0,0)[7] errors
Q* = 118.89, df = 3, p-value < 2.2e-16

Model df: 28.   Total lags used: 31

I am not sure what is the difference that caused by professor's suggestion. It's not a aggregation of my data to weekly frequency, because I am still working with 1903 daily observations. On the other hand if this transformation means seasonality should be in weekly frequency I am not sure how can I follow yearly cycles in my data.

  • 1
    $\begingroup$ I(0) stationary is not expected to contain any auto correlations. No, I(0) can have nonzero autocorrelations at various lags. I(0) just means the series is not integrated, but that is not the same as not autocorrelated. $\endgroup$ – Richard Hardy Mar 27 at 8:41

Your Answer

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

Browse other questions tagged or ask your own question.