2
$\begingroup$

I am forecasting two weekly sales series (Series A & B) with apparently trend and seasonality. I only have two years of data so it's barely enough for estimating the seasonal components. These two series are closely linked to each other, though with some different reactions to holidays. My goal is to study if Series B reaches its annual goal, what will be the impact on A. Any hints on what to do? I couldn't find a good introduction example in R for the VAR approach and not sure how to do forecasting of one series conditional on another.

What I did is following this instruction for my weekly data: https://robjhyndman.com/hyndsight/forecasting-weekly-data, using Fourier terms for the seasonality and Series B as the XREG for series A. The residuals of the fit seems to be somehow stabilized (with some spike at lag 12 which I am not sure how to handle)

It seems B explains most of the seasonal & trend component in A ( as for the reaction for holidays). The model I got is often ARIMA (0, 0, 0) for some training/validation split. Does this sound like an okay approach? I used rolling window cross validation and forecasting MAPE is around 10%.

I know the auto.arima function in the forecast package can help with the de-trend automatically. Will that takes care of the XREG including the Fourier components as well?

$\endgroup$
1
$\begingroup$

A couple of recommendations:

Yes, auto.arima() will account for explanatory variables. It fits a regression on the explanatory variables with ARIMA errors. (Note that this is not an ARIMAX model.)

Of course, the problem is that you will need to forecast the explanatory variables themselves - here, series B. I hope that you are accounting for this in your holdout tests! That is, when calculating holdout forecasts for A, you should be using forecasted values from B, not the actual values, which would not be available in a "production" environment. Otherwise, you will overestimate the accuracy of your forecasts for A.

You may be able to leverage how your series are "linked". Look at Rob Hyndman's work on hierarchical time series and the hts package for R. You may be able to get better forecasts by treating your two series as a small hierarchy.

Finally, if series B improves forecast accuracy for A, this may actually only mean that B is a proxy for the trend and seasonality that drive both series. So I'd encourage you to do some holdout testing for A also with models that only use trend and seasonality, not series B. Check whether B truly improves holdout forecasts for A over and beyond accounting for trend and seasonality "normally".

$\endgroup$

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.