next up previous contents index
Next: Hedge parameters Up: Simulation Previous: Simulation   Contents   Index


Simulating the sample path.

The assumed underlying price process is the geometric Brownian Motion

\begin{displaymath}\frac{dS}{S} = \mu dt + \sigma dB \end{displaymath}


\begin{displaymath}{dS} = \mu dt S + \sigma S dB \end{displaymath}

To simulate this, we need to discretise the process, by splitting the time between 0 and T into a number of periods of length $\Delta t$,

\begin{displaymath}dt \approx \Delta t \end{displaymath}

\begin{displaymath}dS \approx \Delta S = S_t - S_{t-1} \end{displaymath}

To simulate the term due to the Brownian motion $(dB)$, remember that one of the defining characteristics of Brownian Motion is that the increment for any finite period of length $s$ is distributed normally with mean zero and variance $s$. Since the variance is $s$, the standard deviation is $\sqrt{s}$. Thus, if $\varepsilon_t$ is normally distributed with mean zero and unit variance, we can simulate the discrete process by

\begin{displaymath}S_t - S_{t-1} = \mu \Delta t S_{t-1} + \sigma S_{t-1} \sqrt{\Delta t}
\varepsilon_t \end{displaymath}


\begin{displaymath}S_t= S_{t-1} + \mu \Delta t S_{t-1} + \sigma S_{t-1} \sqrt{\Delta t}
\varepsilon_t \end{displaymath}

This expression can be used to generate a series of sample paths, which will approximate the sample path of a Brownian Motion process as the sampling interval $\Delta t$ decreases.

This discretization is not recommended for actual use. Here we take into account that it is the log of the underlying price that follows a Brownian motion. A more correct discretization is to use

\begin{displaymath}S_t = S_{t-1} exp\left(\left(\mu-\frac{1}{2} \sigma^2\right)\Delta t +
\sigma \varepsilon_t \sqrt{\Delta t} \right) \end{displaymath}

This is the discretization used when the payoff depend on the evolution of the underlying throughout the period. For examples of this, see the chapter on exotic options.

European Calls and Puts, however, do not depend on any intermediate observations, so it is therefore only necessary to simulate the terminal observation of the underlying.

Computer Algorithm, Monte Carlo European Option.

// file: 
// author: Bernt Arne Oedegaard

#include <cmath>     // standard mathematical functions
#include "random.h"   // definition of random number generator
#include <algorithm>     // define the max() function

double option_price_call_european_simulated( double S, 
					     double X, 
					     double r,
					     double sigma, 
					     double time,
					     int no_sims)
    double sigma_sqr = sigma * sigma;
    double R = (r - 0.5 * sigma_sqr)*time;
    double SD = sigma * sqrt(time);
    double sum_payoffs = 0.0;
    for (int n=1; n<=no_sims; n++) {
	double S_T = S* exp(R + SD * random_normal());
	sum_payoffs += max(0.0, S_T-X);
    double c = exp(-r*time) * (sum_payoffs/double(no_sims));
    return c;

next up previous contents index
Next: Hedge parameters Up: Simulation Previous: Simulation   Contents   Index
Bernt Arne Odegaard