# Stochastic Processes

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

## Introduction

The aim of this article is to give a comprehensive introduction into stochastic processes giving explanatory examples which where realized using the free software distribution R-GUI[1]. Several basic concepts are covered to get an idea what for stochastic processes are good for and which problems might occur using them.

## Definition and Concepts

### Stochastic Process

A Stochastic Process[2] is a family of random variables[3] $X_t \,$, which are defined for a set of Parameters $t \,$.
For the time continuous situation $t \in \mathbb{R} \,$ varies continuously in a time interval $I \,$ which typically represents $0\leq t \leq T$.
Alternatively you can write $\left\{X_t, t \in I \right\}$ . The resulting Function $X_t \,$ is called realization or path.

An example for a time continuous process is the seismograph (see picture 1). It writes the data continuously and analogue, no matter an event occurs or not. The oscilloscope (see picture 2) is an example for a tool to measure time continuous processes, in this case periodic processes. The oscilloscope can just give a sufficient good approximation of a time continuous process because the data is digital and so the interval is limited to the smallest amount of time difference available from the oscilloscope, whereas in reality it is not finite.

### Mean Function

The mean function $\mu_t \,$ of a stochastic process $X_t \,$ is defined by
$\mu_t=E\left[X_t\right]=\int_\mathbb{R}xdF_t\left(x\right)$
in general $\mu_t \,$ relies on $t \,$, e.g. for processes with seasonal or periodic structure or for processes with deterministic trend

### Autocovariance Function

An autocovariance[4] function of a stochastic process $X \,$ is defined by
$\gamma(t,\tau)=E[( X_t-\mu_t)(X_{t-\tau}-\mu_{t-\tau})] =\int_\mathbb{R} (x_1-\mu_t)(x_2-\mu_{t-\tau})dF_{t,t-\tau}(x_1,x_2)$

for $\tau \in \mathbb{Z}$

### Stationarity

A stochastic process is called covariance stationary or weak stationary[5] if
$\mu_t=\mu \,$ and $\gamma(t,\tau)=\gamma_\tau \,$

There is also the minor important concept of strict/strong stationarity if for any $t_1,...,t_n \,$ and for every $n,s \in \mathbb{Z} \,$ applies
$F_{t_1,...,t_n}(x_1,...,x_n)=F_{t_{1+s},...,t_{n+s}}(x_1,...,x_n) \,$

### Autocorrelation Function (ACF)

The autocorrelation[6] function of a covariance stationary stochastic process is given by
$\rho_\tau=\frac{\gamma_\tau}{\gamma_0}$
with this the ACF is normed to the interval [-1,1], which makes it easier to interpret often the ACF is plotted as a function of $\tau \,$ which gives the so called correlogramm. It is a graphical tool to find linear dependencies within the data.

### White Noise

A stochastic Process $X_t \,$ is called white noise[7] if:
$\mu_t=0 \,$ and $\gamma_t = \begin{cases} \sigma^2 & \tau=0\\ 0 & \tau \neq 0 \end{cases}$

### Markov Process

The idea of the Markov Process [8]is that only the present value of $X_t$ is relevant for its future motion. This means the past history is fully reflected in the present value. For stock or equivalent assets this fact reflects the efficient market hypothesis.

For all $t \in \mathbb{Z} \,$ and $k\geq 1 \,$

$F_{t|t-1,...,t-k}\left(x_t|x_{t-1},...,x_{t-k}\right)=F_{t|t-1}\left(x_t|x_{t-1} \right)$
Examples: Random Walk and AR(1) with i.i.d. white noise.

## Stochastic Processes in Discrete Time

### Random Walk

One of the most simple stochastic processes is the random walk[9]. This is a process which increments $Z_t=X_t-X_{t-1} \,$ in $t \,$ can only have the values +1 or -1.
Additionally one assumes that the increments $Z_1,Z_2,... \,$ are i.i.d. and independent from the initial value $X_0 \,$

another assumption is that the increments have the same size

The simple random walk is defined by:

$X_t =X_0+\sum^t_{k=1} Z_k$ , t=1,2,...
$X_0,Z_1,Z_2,... \,$ independent, and

$P\left(Z_k=1 \right)=p, P\left(Z_k=-1 \right)=1-p$ for all k

### Binomial Process

If we let the process from the time $t-1 \,$ to time $t \,$ rise with u or fall with d $P\left(Z_k=u \right)=p, \quad P\left(Z_k=-d \right)=1-p \,$ for all $k$ we get the more general class of Binomial processes. $u,d \geq 0$ are any constants (u=up, d=down)

### Geometric Random Walk

Picture 7: returns of a geometric Binary Processes with n=1000, p=0.5

The main problem of simple random walks is the equality in size of the increments. This is usually not fulfilled by economic time series e.g. seasonal changes in monthly sales are normally higher in absolute values if the sales are high in the mean over the year. A possible solution is to take the relative or procentual changes because they are stable over time and not depending on the values the process $X_t \,$

in analogy to the simple random walk where the absolute increments $Z_t=X_t-X_{t-1} \,$ are assumed i.i.d.
for the geometric random walk one assumes that the relative increments $R_t=\frac{X_t}{X_{t-1}}, \quad t=1,2,... \,$ are i.i.d.

a geometric binomial process can have the form
$X_t=R_t\cdot X_{t-1}=X_0 \cdot \prod^t_{k=1}R_k$

where $X_0, R_1, R_2,... \,$ independent and for $u>1, d<1 \,$
$P\left(R_k=u\right)=p, \quad P\left(R_k=d\right)=1-p \,$

we can rewrite the formula
$X_t=R_t\cdot X_{t-1}=X_0 \cdot \prod^t_{k=1}R_k$ to

$lnX_t=lnX_0+\sum^t_{k=1}lnR_k$

as one can see the Process $\tilde{X_t}=lnX_t \,$for the geometric binomial process is an ordinary binomial process itself with initial value $lnX_0 \,$ and increments $Z_k=lnR_k \,$
which full fill $P\left(Z_k=lnu\right)=p, P\left(Z_k=lnd\right)=1-p$
which means for large t that $\tilde{X_t} \,$ is asymptotic normally distributed.

### Trinomial Process

In difference to the binomial process the trinomial process can not only go up or down, but can also stay on its level. The increments $Z_k \,$ have the properties:
$P\left(Z_k=u\right)=p, \quad P\left(Z_k=-d\right)=q, \quad P\left(Z_k=0\right)=r=1-p-q,$
and the stochastic process has again the form:
$X_t=X_0+\sum^t_{k=1}Z_k$

## Stochastic Process in continuous Time

### Wiener Process,Brownian Motion

Robert Brown (1773-1858)

Robert Brown[10]is acknowledged as the leading British botanist to collect in Australia during the first half of the 19th century

In 1827, while examining pollen grains and the spores of mosses and Equisetum suspended in water under a microscope, Brown observed minute particles within vacuoles in the pollen grains executing a continuous jittery motion. He then observed the same motion in particles of dust, enabling him to rule out the hypothesis that the motion was due to pollen being alive.

Norbert Wiener (1894-1964)

Norbert Wiener[11] was an American theoretical and applied mathematician. He was a pioneer in the study of stochastic and noise processes, contributing work relevant to electronic engineering, electronic communication and control systems.

Brownian motion[12] is either the random movement of particles suspended in a fluid or the mathematical model used to describe such random movements, often called a Wiener process[13]

It is a time continuous process (notation $W_t \,$ or $W \,$) with the properties:

$W_0=0 \,$ (with probability one)
$W_t \sim \mathbb{N}(0,t)\,$ for all $t \geq 0 \,$
This means, that for each $t \,$ the random variable $W_t \,$ is normally distributed with mean $E(W_t)=0 \,$ and Variance $Var(W_t)=E(W_t)=t \,$

All increments $\Delta W_t:=W_{t+\Delta t} - W_t \,$ on non-overlapping time intervals are independent.

$W_t \,$ depends continuously on $t \,$

The simulated processes where simulated in that way, that the jump size from one discrete Timepoint to the following is simulated by a normal distribution because nobody can know the behaviour of the continuous time within the time interval between two discrete time points.

## Excursus into Stochastic Integral

Lets assume the price of an asset is described by a Wiener process $W_t \,$.
Let $b(t) \,$ be the number of assets in a portfolio

• simplifying assumption: trading only possible at discrete time instances $t_j \,$ defining the interval $0\leq t \leq T \,$

$b\left( t\right)= b\left( t_{j-1}t\right) \,$ for $t_{j-1}\leq t < t_j \,$ and $0=t_0 < t_1 < \dots < t_N=T$

such a function $b(t) \,$ is called step function.

The trading gain over the time period $0\leq t \leq T\,$ is given by
$\sum^N_{j=1}b\left(t_j-1\right)\left( W_{t_j}-W_{t_{j-1}}\right)$
the trading gain can be positive or negative and is determined by the trading strategy $b(t) \,$ and the price process $W_t \,$
This procedure can be rewritten for continuous time but leads to the question whether the sum of the given formula has a limit when with $N \rightarrow \infty \,$ the size of the subintervals tends to 0.

If $W_t \,$ would be of bounded variation than the limit exists and is called Rieman-Stieltjes integral with $\int^T_0 b(t)dW_t \,$

in our situation this integral generally does not exists because almost all Wiener processes are not of bounded variation; that is, the first variation of $W_t \,$ which is the limit of

$\sum^N_{j=1}|W_{t_j}-W_{t_{j-1}}| \,$ is unbounded even in the case the length of the subintervals vanish for $N \rightarrow \infty \,$

For an arbitrary partition of the interval $\left[0,T\right] \,$ into N subintervals the following inequality holds

$\sum^N_{j=1}|W_{t_j}-W_{t_{j-1}}|^2 \leq \max_j \left(|W_{t_j}-W_{t_{j-1}}|\right)\sum^N_{j=1}|W_{t_j}-W_{t_{j-1}}| \,$ (Equation 1)
with the left sum as the second variation and the right sum as the first variation of W for a given partition into subintervals.
The expectation of the left sum term can be calculated via $\sum^N_{j=1}E\left(W_{t_j}-W_{t_{j-1}}\right)^2 =\sum^N_{j=1}\left(t_j-t_{j-1}\right)=t_N-t_0= T \,$

But even convergence in the mean holds; one can show that the following properties hold:
$E\left(\left(\Delta W_t\right)^2-\Delta t\right) = 0 \quad , \quad Var\left(\left(\Delta W_t\right)^2-\Delta t\right)=2\left(\Delta t \right)^2 \,$

hence $\left(\Delta W_t\right)^2 \approx \Delta t \,$ this property of a Wiener process is symbolically written $\left( dW_t\right)^2=dt \,$ this is needed for dealing with the right sum of Equation 1

the aim is to construct a stochastic integral $\int^t_{t_0}f\left(s\right)dW_s \,$ for general stochastic integrands.
to make this possible we use the Itô integral which is the prototype of a stochastic integral for a step function b an integral can be defined via the sum
$\int^t_{t_0}b\left(s\right)dW_s :=\sum^N_{j=1}b\left(t_{j-1}\right)\left( W_{t_j}-W_{t_{j-1}}\right) \,$ this is the Itô[14] integral over a step function b In case the $b(t_{j-1})\,$ are random variables, b is a simple process and the Itô integral[15] is defined like above.

stochastically integrable functions $f \,$ can be expressed as limits of the simple process $b_n \,$

$E \left[\int^t_{t_0}\left(f\left(s\right)-b_n \left(s\right) \right)^2 ds\right]\rightarrow 0$ (Equation 2) for $n\rightarrow \infty \,$
by applying Cauchy convergence $E \int (b_n-b_m)^2 ds \rightarrow 0 \,$ and the isometry
$E \left[\left(\int^t_{t_0}b\left(s\right)dW_s\right)^2\right]=E\left[\int^t_{t_0}b\left(s\right)^2 ds\right] \,$

the convergence in terms of integrals $\int ds \,$ carries over to integrals $\int dW_t \,$ according to Itô integral $f \,$ is defined
$\int^t_{t_0}f\left(s\right)dW_s := \lim_{n\rightarrow \infty}\int^t_{t_0}b_n\left(s\right)dW_s \,$

for simple processes $b_n \,$ defined by equation 2. The value of this integral is independent of the choice of the $b_n\,$ in equation 2. The Itô integral as a function of t is a stochastic process with the martingale property.

if an integrand $a(x,t)\,$ depends on a stochastic process $X_t\,$, the function f is given by $f(t)=a(X_t,t)\,$ for the simplest case of a constant integrand $a(x_t,t)=a_0 \,$ the Itô integral can be reduced to a Rieman Stieltjes integral
$\int^t_{t_0}dW_s = W_t-W_{t_0} \,$

## Conclusion

As we have seen the use of stochastic processes is of extreme importance for simulation purposes. The complicated handling with respect to mathematical knowledge makes it not always easy to handle them. Nevertheless the practical use justifies the inconveniences.

The given examples are just for explanatory purposes. For a practical application one have to simulate not only one or two processes but much more (e.g. 1000) to get an impression of the behaviour of risk for example.

The shown processes are just an impression of the possibilities and not used in practical applications (accept the Brownian Motion). In reality more complicated approaches are needed to simulate the behaviour of the real underlying processes to be simulated.

## Sources

• Christian P.Fries "Finanzmathematik: Theorie, Modelierung, Implementierung" Frankfurt am Main, 2006
• R.Seydel "Tools for Computational Finance", Springer 2003
• J.Franke, W.Härdle and Ch. Hafner "Einführung in die Statistik der Finanzmärkte" Springer, 2003
• R.Tsay "Analysis of Financial Time Series - Financial Econometrics" John Wiley & Sons, Inc.,2002[/itex]
• Wikipedia