There exist several quantlets for the simulation and estimation of asset prices. Implemented in the finance library are
|
The quantlet
stocksim
simulates random processes for a
stock price in three different ways:
The function returns as output a display plotting the three processes
and asks if one wants to repeat the simulation. In the interactive
window one is asked for the starting values of the underlying asset,
the increasing rate of return which corresponds to
m(t,x) in the underlying diffusion process. The volatility parameter
corresponds to a constant s(t,x). The expected number
of jumps is the parameter for the underlying jump Poisson process.
More precisely the geometric Brownian motion
The
stockest
quantlet assumes that
the underlying diffusion processes models are the same as under
2.1, i.e. a mixture of a Poisson jump and a Wiener process
with drift.
For the estimation of such a process, we have to choose
a dataset that we want to
examine. Let's estimate the parameters for the price
process of the Motorola stock. The data is loaded into XploRe by typing
data=read("motorola")in the command line of the XploRe input window. The data consists of 591 observations. It has 6 columns. We choose the second column -- which simply contains the price notations of the stock -- with the command data=data[,2] Estimation now takes place by executing
stockest(data)Now the corresponding parameters of the model are displayed in the XploRe output window. As an example, take the estimation of the volatility: In the output window you find the following information:
Content of object _tmp.sigma2 [1,] 38.819The other estimated parameters are mue, the increasing rate of return, sigma the volatility of returns, lambda the number of jumps in the Poisson model and jump the volatility of the height of the jump.
The quantlet
stockestsim
is a combination of the quantlets described in
Subsections 2.1 and 2.2. At first it
estimates with the first part of a given
dataset the parameters of a
random process. This is done for two kinds of models: a Wiener process
and a combination of a Wiener and a Poisson jump process. Then both models are
compared by a simulation with the rest of the real dataset.
As in the quantlet
stockest,
you need to choose the dataset first and then
execute the function by putting the dataset as input parameter. This is
done in XploRe by
typing the following sequence of commands in the command line of the
input window:
data=read("motorola") data=data[,2] stockestsim(data)
The result is a graphical display showing the three processes:
![]() |
MD*TECH Method and Data Technologies |
http://www.mdtech.de mdtech@mdtech.de |