Similarly to fitting parametric distribution to data, it is also possible to fit parametric time-series models to historical data to create forecasts. The main difference is that when fitting a distribution to data, we assumed that they are randomly sampled from independent, identical distributions. In plain words, we assume the data points come from the same distribution and are not correlated. For example, if we have measurements of heights of 100 people, each of such measurements is assumed to be the measurement of a randomly selected individual from a single population distribution of heights. In contrast, time-series data is by nature sequential as the value in the next period is linked to that of previous periods. For example, the daily price of a commodity is highly dependent on its price in prior days. This type of dependency is called autocorrelation or serial correlation, and must be incorporated in a time-series fit.

Some important considerations are:

- Is the past relevant, and representative, as well as several other factors about your data quality? We do recommend to critically examining and evaluating your data quality, before using the data as a basis of your forecast;
- As a general rule-of-thumb, when fitting time-series to your historical data, we do recommend only doing this for relative short-term forecasts (i.e. 20-30% of the historic period for which you have good data).
- There are many different time-series models available, and all (time-series) models are simplifications of reality. Goodness of Fit criteria like Information Criteria can help you with selecting the best fitting model, but if you are not sure which time-series is the appropriate one, run the model multiple times with different time-series, and see how much of a difference this makes to the results and the decision.

Many of the commonly used time-series models that can be fitted to historical data use one or more of the following time-series __techniques__:

__Moving average (MA)__: With this time-series technique, the next observation (i.e. forecast) is based on the*weighted average*of one or more past observations. Mathematically, in an MA model, a forecast will be based on a regression equation based on past*errors*(also called 'noise'). An MA(1) model is a first order MA model in which the forecast is based on only the last error, in an MA(2) model it is based on the last two errors, and an an MA(n) model the forecast is based on the last n errors__Autoregression (AR)__: This technique is similar to the moving average technique, except that the forecast of the next observation is based on a regression equation that uses past*observations*(and not past*errors*as with the MA model). Just like with MA-models, the order of the AR model also indicates how many previous observations are used for the forecast__Conditional Heteroskedasticity (CH)__: This refers to the concept that the volatility (random movements from timestep to timestep) may vary over time, or be clustered during certain periods.__Random Walk__: This is a time-series technique in which in each period the forecast takes a random step up or down, relatively to its previous value. In addition, all such steps are assumed to be independent, and follow the same probability distribution. The simple random walk and the Ito process are examples of random walk time-series- Mean-Reversion: This technique reflects the idea that when a variable moves away from the 'trend path', there is a general pull (i.e. reversion) back to this trend
- Jump Diffusion: This technique helps when there may be sudden 'jumps' in the time-series
- Stationarity, trend, seasonality, and differencing: Many time-series are based on the property of 'stationarity', which means that its properties are constant over time. In other words, time-series that have a trend or have seasonal patterns are not stationary. Therefore, before fitting many of the time-series listed below, it is important to check:
- If there is a trend? If so, such trend is considered separately, and ignored when fitting the time-series
- If there is seasonality? If so, the seasonal pattern is considered separately, and ignored when fitting the time-series
- In addition, often time-series data is transformed to make it stationary. When the difference between sequential observations are computed, it is called first-order differencing, which can also reduce trend and seasonality. Second order differencing is when we model the "change in the changes", which may be necessary if first-order differencing does not result in stationarity
- Many time-series software tool have build-in logic to "detect" if seasonality, a trend, or another data-transformation may be necessary.

## Common time-series models to fit to data

In this section, we briefly describe a number of time series models that are frequently used to 'fit' to historical data.

- Auto-regressive time-series model (AR): This model uses the autoregression technique. Most common are the AR(1) and AR(2) models
- Moving average time-series model (MA): This model uses the model average technique. Most common are the MA(1) and MA(2) models
- ARMA and ARIMA time-series model: These models use both AR and MA technique. In the ARIMA time-series model, the "I" stands for the term "Integrated", which refers to the fact that an ARIMA model also uses first-order differencing
- ARCH / GARCH / EGARCH / APARCH: All these time-series models rely on the AR and CH technique, in which forecast are based on (a regression of) past observations, and in which volatility varies over time
- BM / GBM: The Brownian Motion or Geometric Brownian Model times-series models are based on a random-walk technique, in which a forecast is based on a "random" movement up or down compared to the current observation
- (G)BM MR / (G)BM JD / (G)BM MR JD: These time-series models all are based on the random-walk technique, but can also include logic for a mean-reversion (MR) and/or a Jump diffusion (JD) process

All of the time-series models above can be fitted to historical data, and if a model fits well to the data, we may feel comfortable using such model to predict the next one or multiple periods. In addition, everything else being equal, we would rather use a simpler time-series model (such as an AR(1)) than a more complex model that has many parameters (such as a EGARCH). Information Criteria are therefore often used for helping select the best candidate time-series model.

A links to an example model that illustrate how to fit various candidate time series models to historical data, is provided here:

## Modeling correlated time-series

Often, variables to be forecasted over time are not independent from each other. For example, when the short term interest rate goes up, it is likely that the long term interest rate will also go up. Or when sales in one product increases, the sales of another product may decrease due to cannibalization. Such correlations between variables are important to capture in a model, also when you are forecasting time series as they will affect the overall variance of the model predictions. Below we summarize different techniques to model time-series correlations depending on their correlation drivers:

**Assuming a cause and effect relationship**: sometimes we know a variable in a model drives or causes the changes in another variable. For example, the Costs of Goods Sold (GOGS) may be between 25 and 30% of the forecasted sales, the number of lung cancer cases is driven by how many people are smokers, or sales commissions will be directly tied to sales projections. Methods to model cause/effect relationships include:- Regression-based methods, as described under time series models with leading indicators
- Functional relationships such as lookup tables and conditional logic.
- Envelop method, which can be useful when the correlation is important and no good historical data is available to estimate the correlation

**Assuming that variables move together, without a causal driver**: correlations without a causal driver are very common in risk modeling, particularly in finance. For example, the S&P500 and Down Jones Industrial Average are highly correlated, but neither drives the other as their fluctuations are driven by the US market as a whole. Here the strategy is to simply replicate their correlation using historical data. Several methods exist, with rank-order correlation and copulas being the most commonly available in modeling platforms. The model below illustrates how to fit and correlate candidate time series models to historical data using rank-order correlation.