Reputation: 145
I have a dataset having dateofpurchase,locations,items,salesqty as shown below,
Date Location Item sales_qty
02/01/2019 aaa x 123
02/01/2019 aaa y 323
02/01/2019 bbb x 1023
02/01/2019 bbb y 1203
I have this type of data for 2 years,25 different locations,400 different item set.I want to forecast my sales on all the locations and item level.I'm new to the time series with multivariate data.Please help me to forecast or give some ideas to me.Thanks in advance.
Upvotes: 4
Views: 5540
Reputation: 19005
In the statsmodels
module, the class statsmodels.tsa.statespace.varmax.VARMAX
is likely your best option.
Vector Autoregressive Moving Average with eXogenous regressors model
Notice there's no I (differencing) component, so you will have to ensure stationarity beforehand. (Use statsmodels.tsa.stattools.adfuller
and kpss
). Also, you will need to deterime the order (p,q) of your ARMA in advance. (Use statsmodels.tsa.stattools.acf
and pacf
to do this.)
There's also the module statsmodels.vector_ar
, which supports supports only AR (not MA) components. You can specify the number of AR terms in the fit
method, but by default it does lag selection.
Upvotes: 4