Subsections


Option pricing by simulation

We now consider using Monte Carlo methods to estimate the price of an European option, and let us first consider the case of the ``usual'' European Call, which is priced by the Black Scholes equation. Since there is already a closed form solution for this case, it is not really necessary to use simulations, but we use the case of the standard call for illustrative purposes.

At maturity, a call option is worth

\begin{displaymath}c_T=\max(0,S_T-X) \end{displaymath}

At an earlier date $t$, the option value will be the expected present value of this.

\begin{displaymath}c_t = E[PV(\max(0,S_T-X)] \end{displaymath}

Now, an important simplifying feature of option pricing is the ``risk neutral result,'' which implies that we can treat the (suitably transformed) problem as the decision of a risk neutral decision maker, if we also modify the expected return of the underlying asset such that this earns the risk free rate.

\begin{displaymath}c_t = e^{-r(T-t)} E^*[\max(0,S_T-X)], \end{displaymath}

where $E^*[\cdot]$ is a transformation of the original expectation. One way to estimate the value of the call is to simulate a large number of sample values of $S_T$ according to the assumed price process, and find the estimated call price as the average of the simulated values. By appealing to a law of large numbers, this average will converge to the actual call value, where the rate of convergence will depend on how many simulations we perform.

Simulating lognormally distributed random variables

Lognormal variables are simulated as follows. Let $\tilde{x}$ be normally distributed with mean zero and variance one. If $S_t$ follows a lognormal distribution, then the one-period-later price $S_{t+1}$ is simulated as

\begin{displaymath}S_{t+1}=S_te^{\left(r-\frac{1}{2}\sigma^2\right)+\sigma\tilde{x}}, \end{displaymath}

or more generally, if the current time is $t$ and terminal date is $T$, with a time between $t$ and $T$ of $(T-t)$,

\begin{displaymath}S_{T}=S_te^{\left(r-\frac{1}{2}\sigma^2\right)(T-t)+\sigma\sqrt{T-t}\tilde{x}} \end{displaymath}

Simulation of lognormal random variables is illustrated by code 11.1.


\begin{program}
% latex2html id marker 3441\caption{Simulating a lognormally d...
.../bernt/2003_algor/all_cc_tex_files/simulate_lognormal_variable.cc}
\end{program}

Pricing of European Call options

For the purposes of doing the Monte Carlo estimation of the price if an European call

\begin{displaymath}c_t = e^{-r(T-t)} E[\max(0,S_T-X)], \end{displaymath}

note that here one merely need to simulate the terminal price of the underlying, $S_T$, the price of the underlying at any time between $t$ and $T$ is not relevant for pricing. We proceed by simulating lognormally distributed random variables, which gives us a set of observations of the terminal price $S_T$. If we let $S_{T,1}, S_{T,2}, S_{T,3}, \ldots S_{T,n}$ denote the $n$ simulated values, we will estimate $E^*[\max(0,S_T-X)]$ as the average of option payoffs at maturity, discounted at the risk free rate.

\begin{displaymath}\hat{c}_t = e^{-r(T-t)}\left(\sum_{i=1}^n \max\left(0,S_{T,i}-X\right)\right)\end{displaymath}

Code 11.2 shows the implementation of a Monte Carlo estimation of an European call option.


\begin{program}
% latex2html id marker 3446\caption{European Call option price...
...le{/home/bernt/2003_algor/all_cc_tex_files/simulated_call_euro.cc}
\end{program}

Hedge parameters

It is of course, just as in the standard case, desirable to estimate hedge parameters as well as option prices. We will show how one can find an estimate of the option delta, the first derivative of the call price with respect to the underlying security: $\Delta = \frac{\partial c_t}{\partial S}$. To understand how one goes about estimating this, let us recall that the first derivative of a function $f$ is defined as the limit

\begin{displaymath}f^\prime(x) = \lim_{h\rightarrow 0} \frac{f(x+h)-f(x)}{h} \end{displaymath}

Thinking of $f(S)$ as the option price formula $c_t=f\left(S;X,r,\sigma,(T-t)\right)$, we see that we can evaluate the option price at two different values of the underlying, $S$ and $S+q$, where $q$ is a small quantity, and estimate the option delta as

\begin{displaymath}\widehat{\Delta} = \frac{f(S+q) - f(S)}{q} \end{displaymath}

In the case of Monte Carlo estimation, it is very important that this is done by using the same sequence of random variables to estimate the two option prices with prices of the underlying $S$ and $S+q$. Code 11.3 implements this estimation of the option delta.
\begin{program}
% latex2html id marker 3451\caption{Estimate Delta of European...
...e{/home/bernt/2003_algor/all_cc_tex_files/simulated_delta_call.cc}
\end{program}
One can estimate other hedge parameters in a simular way.


More general payoffs. Function prototypes

The above shows the case for a call option. If we want to price other types of options, with different payoffs we could write similar routines for every possible case. But this would be wasteful, instead a bit of thought allows us to write option valuations for any kind of option whose payoff depend on the value of the underlying at maturity, only. Let us now move toward a generic routine for pricing derivatives with Monte Carlo. This relies on the ability of C ++ to write subroutines which one call with function prototypes, i.e. that in the call to to the subroutine/function one provides a function instead of a variable. Consider pricing of standard European put and call options. At maturity each option only depend on the value of the underlying $S_T$ and the exercise price $X$ through the relations

\begin{displaymath}C_T = \max(S_T-X,0) \end{displaymath}


\begin{displaymath}P_T = \max(X-S_T,0) \end{displaymath}

Code 11.4 shows two C ++ functions which calculates this.


\begin{program}
% latex2html id marker 3471\caption{Payoff call and put option...
...me/bernt/2003_algor/all_cc_tex_files/payoff_black_scholes_case.cc}
\end{program}

The interesting part comes when one realises one can write a generic simulation routine to which one provide one of these functions, or some other function describing a payoff which only depends on the price of the underlying and some constant. Code 11.5 shows how this is done.


\begin{program}
% latex2html id marker 3476\caption{Generic simulation pricing...
...gor/all_cc_tex_files/simulate_european_options_generic_routine.cc}
\end{program}

Note the presence of the line

         double payoff(const double& price, const double& X),
in the subroutine call. When this function is called, the calling program will need to provide a function to put there, such as the Black Scholes example above. Code 11.6 shows a complete example of how this is done.
\begin{program}
% latex2html id marker 3481\caption{Simulating Black Scholes v...
.../all_cc_tex_files/run_simulation_bs_case_using_generic_routine.cc}
\end{program}
Running the program in code 11.6 results in the output:

Simulated call option price = 14.995
Black Scholes call option price = 14.9758
Simulated put option price = 5.5599
Black Scholes put option price = 5.45954
As we see, even with as many as 50,000 simuations, the option prices estimated using Monte Carlo still differs substantially from the ``true'' values.

Improving the efficiency in simulation

There are a number of ways of ``improving'' the implementation of Monte Carlo estimation such that the estimate is closer to the true value.


Control variates.

One is the method of control variates. The idea is simple. When one generates the set of terminal values of the underlying security, one can value several derivatives using the same set of terminal values. What if one of the derivatives we value using the terminal values is one which we have an analytical solution to? For example, suppose we calculate the value of an at the money European call option using both the (analytical) Black Scholes formula and Monte Carlo simulation. If it turns out that the Monte Carlo estimate overvalues the option price, we think that this will also be the case for other derivatives valued using the same set of simulated terminal values. We therefore move the estimate of the price of the derivative of interest downwards.

Thus, suppose we want to value an European put and we use the price of an at the money European call as the control variate. Using the same set of simulated terminal values $S_{T,i}$, we estimate the two options using Monte Carlo as:

\begin{displaymath}\hat{p}_t = e^{-r(T-t)}\left(\sum_{i=1}^n \max\left(0,X-S_{T,i}\right)\right)\end{displaymath}


\begin{displaymath}\hat{c}_t = e^{-r(T-t)}\left(\sum_{i=1}^n \max\left(0,S_{T,i}-X\right)\right)\end{displaymath}

We calculate the Black Scholes value of the call $\hat{c}_t^{bs}$, and calculate $p^{cv}_t$, the estimate of the put price with a control variate adjustment, as follows

\begin{displaymath}\hat{p}^{cv}_t= \hat{p}_t + (c_t^{bs}-\hat{c}_t) \end{displaymath}

One can use other derivatives than the at-the-money call as the control variate, the only limitation being that it has a tractable analytical solution.

Code 11.7 shows the implementation of a Monte Carlo estimation using an at-the-money European call as the control variate.


\begin{program}
% latex2html id marker 3486\caption{Generic with control varia...
...iles/simulate_european_options_generic_routine_control_variate.cc}
\end{program}


Antithetic variates.

An alternative to using control variates is to consider the method of antithetic variates. The idea behind this is that Monte Carlo works best if the simulated variables are ``spread'' out as closely as possible to the true distribution. Here we are simulating unit normal random variables. One property of the normal is that it is symmetric around zero, and the median value is zero. Why don't we enforce this in the simulated terminal values? An easy way to do this is to first simulate a unit random normal variable $Z$, and then use both $Z$ and $-Z$ to generate the lognormal random variables. Code 11.8 shows the implementation of this idea.
\begin{program}
% latex2html id marker 3491\caption{Generic with antithetic va...
...s/simulate_european_options_generic_routine_antithetic_variate.cc}
\end{program}
Boyle (1977) shows that the efficiency gain with antithetic variates is not particularly large. There are other ways of ensuring that the simulated values really span the whole sample space, sometimes called ``pseudo Monte Carlo.''

Example

Let us see how these improvements change actual values. We use the same numbers as in code 11.6, but add estimation using control and antithetic variates. Code 11.9 shows a complete example of how this is done.


\begin{program}
% latex2html id marker 3496\caption{Simulating Black Scholes
...
..._simulation_bs_case_using_generic_routine_improving_efficiency.cc}
\end{program}

Running this program results in the output:

Black Scholes call option price = 14.9758
Simulated call option price     = 14.995
Simulated call option price, CV = 14.9758
Simulated call option price, AV = 14.9919
Black Scholes put option price  = 5.45954
Simulated put option price      = 5.41861
Simulated put option price,  CV = 5.42541
Simulated put option price,  AV = 5.46043

More exotic options

These generic routines can also be used to price other options. Any European option that only depends on the terminal value of the price of the underlying security can be valued. Consider the binary options discussed by e.g. Hull (2003). An cash or nothing call pays a fixed amount $Q$ if the price of the asset is above the exercise price at maturity, otherwise nothing. An asset or nothing call pays the price of the asset if the price is above the exercise price at maturity, otherwise nothing. Both of these options are easy to implement using the generic routines above, all that is necesary is to provide the payoff functions as shown in code 11.10.


\begin{program}
% latex2html id marker 3501\caption{Payoff binary options}
\lg...
...{/home/bernt/2003_algor/all_cc_tex_files/payoff_binary_options.cc}
\end{program}

Now, many exotic options are not simply functions of the terminal price of the underlying security, but depend on the evolution of the price from ``now'' till the terminal date of the option. For example options that depend on the average of the price of the underlying (Asian options). For such cases one will have to simulate the whole path. We will return to these cases in the chapter on pricing of exotic options.

Further Reading

Boyle (1977) is a good early source on the use of the Monte Carlo technique for pricing derivatives. Simulation is also covered in Hull (2003).

Exercises


\begin{Exercise}
% latex2html id marker 3434Consider the pricing of an Europe...
... that the first implementation is more efficient than the other?
\end{Exercise}

2003-10-22