# How to handle many time series?

At first, I should apologize if this question is not relevant to this website, but since there are some researchers from the management science community, I ask the question here.

I have data for the demand of 1200 products for 25 periods. That is, 1200 time series. I want to predict the demand for each product for the next period (26). However, because of the high-complexity of tuning the parameters $$(p,d,q)$$ of the ARIMA model, it is not possible to use the ARIMA model.

I have used the time-slicing approach to train ML approaches (random forest, xgboost, catboost, ....) to predict the demand, but it is satisfactory. I would like to know if there is any other approach for demand prediction of 1200 products?

Edit: I have used the following approach. I would be thankful if someone can suggest any idea. At first, I have generated new feature (trend) for each time-slicing time serie as if the demand of a product for a period is increase compared to the previous period (+1 for increase, 0 no difference, -1 decrease) and then clustered time-slicing time series based on the trend data (not the value of demand) and then predict the demand of each product according to the demand of products which fall into the same cluster with KNN. KNN algorithm is trained on the demand values but clustering is trained on trend data. KNN algorithm with a large number of neighbors produces good results but other algorithms such as catboost, xgboost, knn with small k produces poor results.

• Perhaps Stats.SE has more information on time series. Aug 4 '19 at 10:39
• Can't you just train 1200 independent models, one for each product? Aug 4 '19 at 11:45
• @Simon Since it is needed to tune (p,d,q) parameters, it takes a long time and it is neither acceptable nor applicable. Aug 4 '19 at 12:09
• Here is a list of many sych posts at CrossValidated. Aug 4 '19 at 19:12
• @kjetil b halvorsen You seem to be carrying over the practice from Cross Validated of editing posts to remove "Thanks". I think it's stupid to "disallow" "Thanks" and even stupider for someone to edit someone else's post just to remove it. Nevertheless, that seems to be the rule at Cross Validated, so I accepted it there. it doesn't seem to be the rule on this forum, and 'd rather not see it become the rule or practice here. I'm generally against editing other people's posts unless there's a good reason, and I don't think removing "Thanks" is a good reason. Peace out. Aug 5 '19 at 1:26

This problem is a multivariate (simply when you have more than one time-dependent variables) time series for which you can use Vector Auto Regression (VAR) technique among some others. Explanation and Python implementation of this technique has been discussed in details in here. This technique is also considered the dependencies between various time-dependent variables in the $$AR(n)$$ calculations.