**Have a Question?**

**Phone:** +1 (888) 427-9486

+1 (312) 257-3777

Contact Us

# ARIMA to the rescue

Attachment | Size | |
---|---|---|

ARIMA to the rescue |

This is the second entry in our series of “Unplugged” tutorials, in which we delve into the details of each of the time series models with which you are already familiar, highlighting the underlying assumptions and driving home the intuitions behind them.

In financial time series and other fields, we often face a non-stationary time series, for example traded security (e.g. stock, bond, commodity, etc.) price levels. In this case, the time series exhibits either trending, seasonality or merely misguided (random) walk. Unfortunately the bulk of time series and econometric methods can be applied only to stationary processes, so how do we handle this scenario?

In this issue, we tackle the ARIMA^{i} model – an extension of the ARMA^{i} model, but the ARIMA model applies to non-stationary time series – the kind of time series with one or more unit-roots (integrated).

Once again, we will start here with the ARIMA Excel process definition, stating the inputs, outputs, parameters, stability constraints, and assumptions. Then we will introduce the integration operator and draw a few guidelines for the modeling process.

## Background

A non-stationary time series often exhibits a few common patterns including trend over time, seasonality, and misguided random walk. The trend or seasonality can also be classified as either deterministic (function of time) or stochastic (function of past values).

For stochastic trend and/or seasonality, we often difference (i.e. compute the change of) the original time series to induce a stationary series which can be further modeled by an ARMA type of process.

By definition, the auto-regressive integrated moving average (ARIMA Excel) process is an ARMA process for the differenced time series.

Alternatively, in a simple formulation, an ARIMA (p,d,q) is defined as follow:

OR

Where

- is the observed output at time t
- is the difference operator of order d
- is the differenced time series at time t
- is the innovation, shock or error term at time t
- time series observations:
- Are independent and identically distributed
- Follow a Gaussian distribution (i.e. ).

## Assumptions

Looking closer at the formulation, we see that the ARIMA Excel process is essentially an ARMA process for the differenced time series aside from the difference operator (). The same assumption for an ARMA process applies here as well:

- The ARMA process generates a stationary time series
- The residuals follow a stable Gaussian distribution.
- The components’ parameter values are constants.
- The parameter values yield a stationary process.

Sound simple? It is! A careful selection of the ARMA model parameters can guarantee a stationary process for the differenced time series (), but how do we interpret the forecast of using

## Integration (un-difference) Operator

In many cases, we often apply a difference operator to yield a stationary time series that can be easily modeled using ARMA type of model. But how do go back to the original un-differenced time series space and interpret the ARMA results (e.g. forecast)? Our best bet is to use the Integration Operator.

**DEFINITION:** a stochastic time series is said to be integrated of order (d) (i.e. ) if the d-times differenced time series yields an invertible ARMA representation.

And, implicitly;

Now, to recover from the , we apply the un-difference (integration) operator.

A first order integration can be expressed as

For higher order (i.e.-order) integration, we simply integrate multiple times:

For instance, for , the integration operator is defined as follow:

For , the integration operator is defined as follow:

Since is an integrated timer series of order , then is a stationary time series which has an invertible ARMA representation:

We can compute the conditional variance at time T+n given the information available at time T:

Where

**IMPORTANT:** NumXL has a function INTG^{i}() that computes the integral of a seasonal differenced (i.e.) time series.To recover a differenced time series of order d, set s=1 and pass on the initial conditions (i.e. ), and it will recover the original data series

## ARIMA Machine

The ARIMA Excel process is a simple machine that retains limited information about its past differenced outputs and the shocks it has experienced. In a more systematic view, the ARIMA process or machine can be viewed as below.

Note that we are observing the integrated output of the ARMA process (), but the machine processes the differenced outputs (). The INTG block references the integration operator.

### How do we know if we have a unit-root in our time series?

Aside from the statistical tests for unit-root (e.g. ADF^{i}, KPSS^{i}, etc.), there are a few visual clues for detecting unit-root using the ACF^{i} and PACF^{i} plots. For instance, a time series with unit-root will exhibit high and very slow decaying ACF values for all lags. On the PACF plot, the PACF value for the first lag is almost one (1), and the PACF values for lag-order greater than one are insignificant.

For statistical testing, the Augmented Dickey – Fuller (ADF) test will examine the evidence for a unit root, even in the presence of deterministic trend or squared time trend.

**NOTE:** Starting in 1.55 (LYNX), NumXL natively supports the ADF test with a step-down optimization procedure.

## Statistical Characteristics

In our description of the ARIMA process, we highlighted a single input stimulus: shocks/innovations, emphasizing how they propagate throughout the ARIMA machinery to generate the observed output. *The ARIMA Excel *machine is basically an ARMA machine, but the output is integrated before we can observe it. How does this affect the output distribution?

### Why do we care?

The statistical distribution (i.e. ) of the output () is pivotal for conducting a forecast and/or establishing a confidence interval at any future time (T+n).

Where

- is the out-of-sample forecast at time T+n
- is the lower critical value for significance level
- is the upper critical value for significance level
- is the conditional variance at time T+n

By now, the importance of understanding the output statistical distribution should be clear. Now how do we go about forming that understanding?

Back to the definition, the differenced time series is modeled as a stationary ARMA process. Let’s convert it to an infinite-order MA model:

Now, let’s recover the original time series from

### Example 1

Let’s consider the following differenced series . To recover the time series, we simply add up all the differences to date.

Now, the variance of the forecast is expressed as follow:

As we see, although computing the forecast is simple exercise of summing all prior differences, the variance calculation is much more involved.

Furthermore, as , the , so the estimate/forecast asymptotically approaches the deterministic linear trend defined by

**Note:** For higher order integration (d>1), it can be easily shown that long-run forecast values of the time series values would asymptotically follow a polynomial of the same order/

## Conclusion

In simple terms, an ARIMA process is merely an ARMA process whose outputs have gone through an integrator. The integrator causes the observed time series to be non-stationary. The integration process introduces the unit-root into . Integrating multiple times introduces multiple unit-roots into the output time series. This is why the word “integrated” is used in ARIMA.

The main take away of this paper is that differencing is a special transformation procedure that is aimed to convert a non-stationary time series into a stationary one. Like all transformations, care must be taken when we interpret the results back into the original time series space.

Notice that the unit-root modeling (e.g. ARIMA) is intended to capture a stochastic trend and it is not suited for a deterministic trend. If you suspect the presence of a deterministic trend, you should explore this avenue first (i.e. regress over time). At that point, you may choose to take the residuals and apply an ARMA type of process to exploit any remaining dynamics.

Attachment | Size |
---|---|

ARIMA to the rescue | 259 KB |