# ARIMA Modeling

Analyze your non-stationary time series, explore hidden serial correlations, model with sophisticated econometric processes, and forecast future outcomes.

The ARIMAi model is an extension of the ARMA model that applies to non-stationary time series (the kind of time series with one or more integrated unit-roots).By definition, the auto-regressive integrated moving average (ARIMA) process is an ARMA process for the differenced time series:

$$(1-\phi_1 L - \phi_2 L^2 -\cdots - \phi_p L^p)(1-L)^d x_t - \phi_o= (1+\theta_1 L+\theta_2 L^2 + \cdots + \theta_q L^q)a_t$$ $$y_t = (1-L)^d x_t$$

Where:

• $x_t$ is the original non-stationary output at time t.
• $y_t$ is the observed differenced (stationary) output at time t.
• $d$ is the integration order of the time series.
• $a_t$ is the innovation, shock or error term at time t.
• $p$ is the order of the last lagged variables.
• $q$ is the order of the last lagged innovation or shock.
• $\{a_t\}$ time series observations are independent and identically distributed (i.e. i.i.d) and follow a Gaussian distribution (i.e. $\Phi(0,\sigma^2)$)

## notes

1. The variance of the shocks is constant or time-invariant.
2. Assuming $y_t$ (i.e. $(1-L)^d x_t$ ) is a stationary process with a long-run mean of $\mu$, then taking the expectation from both sides, we can express $\phi_o$ as follows:

$$\phi_o = (1-\phi_1-\phi_2-\cdots -\phi_p)\mu$$
3. Thus, the ARIMA(p,d,q) process can now be expressed as:

$$(1-\phi_1 L - \phi_2 L^2 - \cdots - \phi_p L^p) (y_t-\mu) = (1+\theta_1 L + \theta_2 L^2 + \cdots + \theta_q L^q ) a_t$$
$$z_t=y_t-\mu$$
$$(1-\phi_1 L - \phi_2 L^2 - \cdots - \phi_p L^p) z_t = (1+\theta_1 L + \theta_2 L^2 + \cdots + \theta_q L^q ) a_t$$
4. In sum, $z_t$ is the differenced signal after we subtract its long-run average.
5. The order of an ARIMA process is solely determined by the order of the last lagged variable with a non-zero coefficient. In principle, you can have fewer number of parameters than the order of the model.
6. Example: Consider the following ARIMA(12,2) process:

$$(1-\phi_1 L -\phi_{12} L^{12} ) (y_t-\mu) = (1+\theta_2 L^2 ) a_t$$

## ARIMA Modeling Function Model Simulation

<p>In this tutorial, we'll demonstrate the steps to construct one 12-month sales simulation using an ...