# Best practice/process to determine p,d,q in the new ARIMA Trainer operator requested

**46**Maven

I created a RapidMiner model utilizing the new ARIMA operators. The process model is working fine but I feel like skating on thin ice / walking on quicksand regarding the settings of p,d,q. I'm therefore looking for an approach/a process to determine p,d,q.

The default p,d,q of 1,0,1 doesn't result into usable predictions. These predictions looked like a straight line, like trend lines. I'm looking for a more precise prediction in which low/high swaps are visible.

I used the Optimize Parameters operator several times trying to determine p,d,q. At one time Optimize Parameters determined p,d,q of 94,0,56. So an AR back lag of 94 and a Moving Average influence of 56? I couldn't imagine but who am I to distrust the Optimize Parameters operator? I backtest my predictions with a simple method: I compare predictions afterwards using the recent history of market signals. 94,0,56 resulted in a prediction that seem to be right but at a low-swap occurred in the real data (oil futures) that wasn't predicted. That could be the nature of the market, these p,d,q settings or both.

In other tests the Optimize Parameters didn't change p,d,q from default 1,0,1 to anything else. I therefore don't "trust" the results of Optimize Parameters.

Then I found this document: Using AIC to test ARIMA models. In this document the Dow Jones Industrial Average for a specific time period is analyzed with ARIMA. The found p,d,q settings are 2,1,3. I'm not able yet to reproduce the method in this document into a RapidMiner implementation. I tested ARMA settings in the range of 1,1 to 5,5 like the author of the document is doing. The resulting AICs are going everywhere and are not in the range of the AICs in this document. The result of 2,1,3 doesn't make sense. In fact, any value of "d" except for 0 (zero) results in "ridiculous" predictions as if the model is overfitting: predicted values are negative, way out of order or both. A p,d,q of 2,0,3 results again into flat "trend line like" predictions.

So I'm looking for an approach, a method or "best practice", to determine p,d,q. I'm looking preferably for a method that I could implement in RapidMiner process so I can automate the optimal settings of p,d,q. Any help is appreciated.