Fitting ARIMA - Should you use the original series or the transformed(stationary) series?



Hi Friends,
Let’s say I have figured out my stationary series after the appropriate transformations of the time series data.
Lets say my transformations are

  1. Series a = Take the change in % from the last value and then
  2. Series b = Take a EWMA (Series a)
  3. Subtract the Series b from Series a to get Series C.

And Series C is the stationary series…

Now, my understanding is:
In order to fit the model ARIMA, I should be using Series c.

However, I went through the Time Series forecasting article on analytics vidhya, and found the ARIMA fitting parameters a little confusing.

They were seen using series b , even series c and what confused me was also the plotting of a series and as against the fitted values of the mode.

Eg:( from the article)
model = ARIMA(ts_log, order=(0, 1, 2))
results_MA =
plt.plot(results_MA.fittedvalues, color=‘red’)
plt.title(‘RSS: %.4f’% sum((results_MA.fittedvalues-ts_log_diff)**2))

Here its fittong on ts_log and plotting ts_log_diff
Why is the fitting and plotting on different series’ if it is for the purpose of mere visualization and not predictions ?

Can you please help to confirm on this ambiguity?


Here is the URL that got me thinking:


We perform all these steps of differencing and taking log to figure out the coefficients of ARIMA model. ‘I’ in ARIMA stands for Integration which takes into account the number of differencing data requires to become stationary. We perform these differencing steps in the beginning to calculate this ‘I’ value. To be honest you should compare different models with different values of these variables to get the best model.


So are we saying that the initial steps of making a series stationary does not matter ?
One simply needs to make use of various p,d,q values to arrive at the best model ?


But you figure out the values of p,d,q from those steps. There is a method in R called as auto arima which provides you with the best values of p,d,q. You can find a similar library in Python.