# Time Series Functions

Time series functions differ from distribution functions in that they generate a potentially large number of random numbers as a single unit. The numbers generated are not independent, but are instead governed by the rules associated with the particular time series model.

## Classification of Time Series Models

There are three groups of @RISK Time Series functions: **ARMA** (autoregressive moving average) processes, **GBM** (geometric Brownian motion) and its variations, and the **ARCH** (autoregressive conditional heteroscedasticity) process and its variations.

The ARMA processes are arguably the best known. They were developed by Box and Jenkins several decades ago, and they have been applied in a wide variety of settings. They have also been implemented in many statistical software packages. The theory of ARMA processes is based on stationarity, which means that the distribution of the time series variable is constant through time. In particular, its mean and variance are constant through time. When stationarity does not hold, it is common to transform the series, usually through logarithms, differencing, and/or deseasonalization, to induce stationarity. Then an ARMA process is applied to the transformed process.

In general, ARMA processes are characterized by two integer values, p and q, where p is the number of autoregressive terms and q is the number of moving average terms. The only versions implemented in @RISK are the most common versions, where p+q is less than or equal to 2. These include AR(1), AR(2), MA(1), MA(2), and ARMA(1,1).

The GBM process and its variations are continuous-time processes. They have been used most extensively in financial applications, such as for pricing options. In these applications, the time series variable is sometimes the price of a security, and it is sometimes the change in price (the return). Unlike ARMA processes, there is often no assumption of stationarity. For example, if the time series variable is a security price, there might well be an upward drift, meaning that the price tends to increase through time. However, GBM processes have the Markov (memoryless) property, meaning that if the current value is known, the past is irrelevant for predicting the future.

The discretized versions of GBM implemented in @RISK include the basic GBM process and GBM with jump diffusion (GBMJD). Non-geometric Brownian motion processes include BM with mean reversion (BMMR), and GBM with mean reversion and jump diffusion (BMMRJD).

The ARCH process and its variations were developed more recently to account for changes in volatility observed in financial variables, and they have been applied primarily in financial models. They are based on autoregressive (AR) processes with a constant mean, but the volatility is modeled separately to allow for nonstationary variance. (The term “heteroscedasticity” means nonconstant variance.)

Like the ARMA processes, the ARCH process is characterized by an integer value q, and its variations are characterized by two integer values p and q. Here, p is again the number of autoregressive terms, and q is the number of terms involving “error” terms (deviations from the mean). The only versions implemented in @RISK have p and q equal to 1: ARCH(1), GARCH(1,1), EGARCH(1,1), and APARCH(1,1).

Note that the parametrization of these processes varies from one time series reference to another. The parametrization used here is fairly standard, but you might need to “translate” symbols from your favorite time series reference.

## Entering Time Series Functions

The @RISK time series functions are array functions. This implies that they change the cells where your time series forecast is located as a group in each iteration of a simulation. A single time series function is used for the entire range of a time series forecast. As with other Excel array functions, formulas for a cell in the range cannot be edited individually.

To edit a time series function directly in your spreadsheet, you need to select the entire range of the forecast where the array function is located, edit the formula, and press Ctrl+Shift+Enter (all three keys at once) to enter the formula. However, this is not usually necessary because the @RISK Time Series Fit, Batch Fit, and Define tools enter the array functions automatically in the range you select.

## Property Functions for Time Series

There are a large number of property functions that can be used to modify how a time series function works. The property functions appropriate for use with time series can be broken down into a few categories:

**Formatting**– functions that control how the distribution will be formatted and labeled in @RISK graphs, reports, and tables:**RiskName****Simulation**– functions that affect how the distribution will be behave during a simulation:**RiskCorrmat**,**RiskDepC**,**RiskFit**,**RiskIndepC****Transformation**– functions that control how transformations are applied to time series:**RiskTSTransform**,**RiskTSIntegrate**,**RiskTSSeasonality****Synchronization**– a function that controls how the time-series values are synchronized with an initialization data set:**RiskTSSync**

See **Property Functions** for more an overview of property functions and how they are used in @RISK functions.