2. Assets

There exist several quantlets for the simulation and estimation of asset prices. Implemented in the finance library are


909 stocksim ()
simulates random processes for stock prices
912 stockest (data)
estimates a diffusion model for stock price data
915 stockestsim (data)
simulates and estimates a Wiener process with Poisson jump


2.1 Stock Simulation

The quantlet 920 stocksim simulates random processes for a stock price in three different ways:

It is invoked by typing stocksim() An interactive window appears which asks for the values of the process to be simulated.

925

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 $\sigma$ 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

\begin{displaymath}

\frac{dX(t)}{X(t)} = \mu dt + \sigma dW(t)

\end{displaymath} (1)

is simulated with an overlayed Poisson jump process. If we set the last two parameters (intensity and height of the jump) equal to zero we exactly simulate from (1) at discrete points. The first parameter equals X(0) and the second is the drift $\mu$. The volatility is given by b, the third parameter. If T* denotes the days to expiration and nd is the observation frequency per day, the process is on the time interval $T^*/365 \subset [0,1]$ on exactly T=ndT* discretization points. This may be checked by variation of these parameters. The process is recursively calculated as $X(t+1)=X(t) \exp(\mu/nd+\sigma W(t)/\sqrt{nd})$ at the points $t=1,2,\dots,T.$


929


2.2 Stock Estimation

The 933 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 944 stockest. This quantlet is executed by typing the name of the variable representing the dataset in parentheses:

  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.819

The 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.


2.3 Stock Estimation and Simulation

The quantlet 953 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 956 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:


965



Method and Data Technologies   MD*TECH Method and Data Technologies
  http://www.mdtech.de  mdtech@mdtech.de