# Time series modeling in finance

### Simple GBM

Geometric Brownian Motion (GBM) (also known occasionally as Exponential Brownian motion) models are based in the assumption that the logarithm of some random follows a Brownian random walk (also called a Wiener process). The ‘geometric’ part of the name implies the multiplicative mature of the random walk, and ‘Brownian’ refers to a botanist called Robert Brown who observed random walk patterns of things called organelles on the surface of water.

If  is the stock price (or anything else we want to model as following GBM), we define the log return  between moments  and  to be:

And in reverse:

where  is a random variable following a Normal(0,1) distribution.

This also means that  follows a Lognormal distribution. The GBM model assumes that each   is an independent random sample from the same normal distribution.

This is very convenient because we can say for any arbitrary time period T the total log returns will be (from Central Limit Theorem):

Note that the variable  can never be zero or below, and that the model assumes no memory because each sample is independent. That implies that there is never any ‘correction’ to be made from the last random movement.

## GBMVR

A Geometric Brownian Motion time series model with Reversion to a fixed value  S*:

## GBMAJVR

A Geometric Brownian Motion time series model with Asymmetric Jumps and Reversion to a fixed value  S*:

## SeasonalGBM

A Seasonal Geometric Brownian Motion time series model:

Where  and  are the appropriate seasonal factors selected from   and . The user needs to specify the starting points  and  and value array of each index {S1} and {S2}, the lengths of which are determined by ModelRisk. The function then cycles through the second sequence {S2} and at the end of each cycle picks the next {S1} value in the series.

## APARCH

An Asymmetric Power Autoregressive Conditional Heteroskedasticity time series model of order (1,1):

## ARCH

An Autoregressive Conditional Heteroskedasticity time series model of order 1:

## ARMA

An Autoregressive Moving Average time series model of order (1,1):

## MA1

## MA2

## AR1

Multivariate Auto-Regressive time series model of order 1:

## AR2

Multivariate Auto-Regressive time series model of order 2:

## GARCH

Multivariate generalized autoregressive conditional heteroskedaticity time series model:

## GBM

Multivariate Geometric Brownian Motion time series model:

## MA1

Multivariate Moving-Average time series model of order 1:

## MA2

Multivariate Moving-Average time series model of order 2:

### Markov Chain

A discrete time Markov chain model of any dimension. If the transition probability matrix is positive semi-definite, non integer time  can be entered:

Inputs:

= 1 x k vector specifying the number of individuals in each state at start

= k x k matrix of probabilities where each row sums to 1

t = the time after which the number of individuals in each state is to be evaluated

Output:

= 1 x k vector of simulated number of individuals in each state