# ARIMA(0,2,2) model - equation derivation

So on wikipedia here under Examples, it is mentioned that ARIMA(0,2,2) is given by:

$$X_t = 2X_{t-1} - X_{t-2} + (\alpha + \beta -2)\epsilon_{t-1} + (1 - \alpha)\epsilon_{t-2} + \epsilon_t \ \ \ \ \ (1)$$

My question is: how this equation has been derived?

We know that ARIMA(0,2,2) means $$d=2$$ (second order differencing) and $$q=2$$ is the MA (moving-average) order.

If $$MA(q)$$ is given by: $$X_t = \mu + \epsilon_t + \theta_1\epsilon_{t-1} + ... + \theta_q\epsilon_{t-q}$$

therefore (?):

$$X_t = \mu + \epsilon_t + \theta_1\epsilon_{t-1} + \theta_2\epsilon_{t-2} \\ X_{t-1} = \mu + \epsilon_{t-1} + \theta_1\epsilon_{t-2} + \theta_2\epsilon_{t-3} \\ X_{t-2} = \mu + \epsilon_{t-2} + \theta_1\epsilon_{t-3} + \theta_2\epsilon_{t-4}$$

After removing $$\epsilon_{t-3}, \epsilon_{t-3}$$, for the second order differencing we compute $$X_t - 2X_{t-1} + X_{t-2}$$:

$$X_t - 2X_{t-1} + X_{t-2} = (\theta_1 - 2)\epsilon_{t-1} + (\theta_2 - 2\theta_1 + 1)\epsilon_{t-2} + \epsilon_t$$

and the coefficients of the error terms differ from those in (1).

Ok I realised that we just need to substitute: $$\alpha = 2\theta_1 - \theta_2 \\ \beta = -\theta_1 + \theta_2$$ although I do not quite understand what was the reasoning behind this particular substitution.