0
$\begingroup$

I've got this prediction problem for daily data across several years. My data has both yearly and weekly seasonality. It's also stationary.

I tried using the following recurrence:(which I just came up with, from nowhere if you like) xn = 1/4(xn-738 + xn-364 + xn-7 + 1/6(xn-1+xn-2+xn-3+xn-4+xn-5+xn-6)

Basically, I am taking into consideration some of the previous days in the week before the day I am trying to predict and also the corresponding day a year and two years earlier. I am doing an average over them.

I got the following histogram of residuals: enter image description here

Why or Why not would such a formula be a good idea and can I improve this FOR example by adding some terms sampled from a distribution or in another way? Thanks!

$\endgroup$
2
  • $\begingroup$ Stationary series can't be seasonal. Please double check your data. $\endgroup$
    – Skander H.
    Commented Jun 14, 2018 at 16:30
  • $\begingroup$ Yeah, I didn’t realise that stationarity had such a technical definition...I didn’t really check the stationarity But maybe people could help me regardless of that condition? Thanks! $\endgroup$
    – Sorin Tirc
    Commented Jun 14, 2018 at 20:34

1 Answer 1

1
$\begingroup$

Based on the recurrence formula you've come up with, you seem to be trying to reinvent an Auto-Regressive model AR(p), which is essentially any model of the form:

$X_n = a_1 X_{n-1} + a_2 X_{n-2} + a_3 X_{n-3} + ... a_p X_{n-p}$.

Although your intuition is correct and your approach is on the correct path, there is a more systematic way of arriving at the same type of model that you are trying to achieve, using ARIMA and Seasonal ARIMA models.

$\endgroup$
2
  • $\begingroup$ Hi Alex and thanks for the answer! I tried using ARIMA and Seasonal ARIMA but the problem is that ARIMA cannot capture double seasonality, so I tried to come up with something myself. Any idea how one could find the optimal a1,...,ap ? Optimal wrt to mean squared residual error for example $\endgroup$
    – Sorin Tirc
    Commented Jun 15, 2018 at 7:32
  • $\begingroup$ @SorinTirc I don't know of any ARIMA model that can capture multiple seasonalities (In theory a really high order ARIMA model could, but in practice that would lead to bad results). You should try TBATs or Facebook Prophet - but those models use completely different approaches from the auto-regressive models. $\endgroup$
    – Skander H.
    Commented Jun 15, 2018 at 8:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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