<< evt Financial module hedge >>

Financial module >> Financial module > gbm

gbm

Estimate the parameters of a Geometric Brownian Motion (through the method of moments) on the data and graphically show the mean and two confidence intervals

SYNOPSIS

[mu,sigma]=gbm(data,dt)

Description

If the variable x follows a Geometric Brownian Motion then it solves the stochastic differential equaiton

dx/x = mu dt + sigma dW

where dW is the differential form of a Wiener process and both "mu" and "sigma" are constant parameters. On historical data, the function estimates both mu and sigma and show a graph with the mean of the process, the mean+/- the standard deviation, and the mean +/-2 times the standard deviation

Parameters

data
column vector containing the historical data on which both the drift and the diffusion must be estimated
dt
time unit of measure: if data are in annual form (like returns, for instance) but have daily frequency, then dt=1/250 (since there are 250 working day in one year)

Output

mu, sigma
respectively the drift and diffusion terms of the Geometric Brownian Motion

Example

First we generate 1000 log-normally distributed daily prices for an asset whose initial values is 25 euros. First step is the creation of 1000 normal random variables (with mean 0.1/250 and standard deviation 0.2/sqrt(250))

-->M=grand(1000,1,'nor',0.1/250,0.2/sqrt(250));

Then we create the prices

-->prices=exp(cumsum(M,1))*25;

and apply the function with

-->[mu,sigma]=gbm(prices,1/250);

sigma = 0.2039105

mu = 0.1443338

We see the mean and the standard deviation are close to that we started from. The figure shows the original data, the mean and the confidence intervals.

Authors

Francesco Menoncin - Brescia University - 2010

See Also


<< evt Financial module hedge >>