LINEBURG

partial di¬erential equation. To come up with an approximation BAW transformed equation (12.1) into one

where the terms involving Vt are neglible, removed these, and ended up with a standard linear homeogenous

second order equation, which has a known solution.

The functional form of the approximation is shown in formula 12.1.

In implementing this formula, the only problem is ¬nding the critical value S — . This is the classical problem

of ¬nding a root of the equation

S—

— — —

1 ’ e(b’r)(T ’t) N (d1 (S — )) = 0

g(S ) = S ’ X ’ c(S ) ’

q2

This is solved using Newton™s algorithm for ¬nding the root. We start by ¬nding a ¬rst “seed” value S0 .

The next estimate of Si is found by:

g()

Si+1 = Si ’

g

1 The approximation is also discussed in Hull [2003].

91

S q2

if S < S —

c(S, T ) + A2 S—

C(S, T ) =

if S ≥ S —

S’X

where

1 4M

2

’(N ’ 1) + (N ’ 1) +

q2 =

2 K

S—

1 ’ e(b’r)(T ’t) N (d1 (S — ))

A2 =

q2

2r 2b

, N = 2 , K(T ) = 1 ’ e’r(T ’t)

M= 2

σ σ

and S — solves

S—

— —

1 ’ e(b’r)(T ’t) N (d1 (S — ))

S ’ X = c (S , T ) +

q2

Formula 12.1: The functional form of the Barone Adesi Whaley approximation to the value of an American

call

At each step we need to evaluate g() and its derivative g ().

1

S 1 ’ e(b’r)(T ’t) N (d1 )

g(S) = S ’ X ’ c(S) ’

q2

1 1 1

) 1 ’ e(b’r)(T ’t) N (d1 ) + (e(b’r)(T ’t) n(d1 )) √

g (S) = (1 ’

q2 q2 σ T ’t

where c(S) is the Black Scholes value for commodities. Code 12.1 shows the implementation of this formula

for the price of a call option.

Exercise 12.

The Barone-Adesi “ Whaley insight can also be used to value a put option, by approximating the value of the

early exercise premium. For a put option the approximation is

S q1

if S > S ——

p(S, T ) + A1 S ——

P (S) =

if S ¤ S ——

X ’S

S ——

(1 ’ e(b’r)(T ’t) N (’d1 (S —— ))

A1 = ’

q1

One again solves iteratively for S —— , for example by Newton™s procedure, where now one would use

S

1 ’ e(b’r)(T ’t) N (’d1 )

g(S) = X ’ S ’ p(S) +

q1

1 1 1

’ 1) 1 ’ e(b’r)(T ’t) N (’d1 ) + e(b’r)(T ’t) √

g (S) = ( n(’d1 )

q1 q1 σ T ’t

1. Implement the calculation of the price of an American put option using the BAW approach.

92

#include <cmath>

#include <algorithm>

using namespace std;

// normal distribution

#include "normdist.h"

// de¬ne other option pricing formulas

#include "fin_recipes.h"

const double ACCURACY=1.0e’6;

double option price american call approximated baw( const double& S,

const double& X,

const double& r,

const double& b,

const double& sigma,

const double& time) {

double sigma sqr = sigma*sigma;

double time sqrt = sqrt(time);

double nn = 2.0*b/sigma sqr;

double m = 2.0*r/sigma sqr;

double K = 1.0’exp(’r*time);

double q2 = (’(nn’1)+sqrt(pow((nn’1),2.0)+(4*m/K)))*0.5;

q2 inf = 0.5 * ( ’(nn’1) + sqrt(pow((nn’1),2.0)+4.0*m)); // seed value from paper

double

S star inf = X / (1.0 ’ 1.0/q2 inf);

double

h2 = ’(b*time+2.0*sigma*time sqrt)*(X/(S star inf’X));

double

double S seed = X + (S star inf’X)*(1.0’exp(h2));

int no iterations=0; // iterate on S to ¬nd S star, using Newton steps

double Si=S seed;

double g=1;

double gprime=1.0;

while ((fabs(g) > ACCURACY)

&& (fabs(gprime)>ACCURACY) // to avoid exploding Newton™s

&& ( no iterations++<500)

&& (Si>0.0)) {

double c = option price european call payout(Si,X,r,b,sigma,time);

double d1 = (log(Si/X)+(b+0.5*sigma sqr)*time)/(sigma*time sqrt);

g=(1.0’1.0/q2)*Si’X’c+(1.0/q2)*Si*exp((b’r)*time)*N(d1);

gprime=( 1.0’1.0/q2)*(1.0’exp((b’r)*time)*N(d1))

+(1.0/q2)*exp((b’r)*time)*n(d1)*(1.0/(sigma*time sqrt));

Si=Si’(g/gprime);

};

double S star = 0;

if (fabs(g)>ACCURACY) { S star = S seed; } // did not converge

else { S star = Si; };

double C=0;

double c = option price european call payout(S,X,r,b,sigma,time);

if (S>=S star) {

C=S’X;

}

else {

double d1 = (log(S star/X)+(b+0.5*sigma sqr)*time)/(sigma*time sqrt);

double A2 = (1.0’exp((b’r)*time)*N(d1))* (S star/q2);

C=c+A2*pow((S/S star),q2);

};

return max(C,c); // know value will never be less than BS value

};

Code 12.1: Barone Adesi quadratic approximation to the price of a call option

93

Consider the following set of parameters, used as an example in the Barone-Adesi and Whaley [1987] paper:

S = 100, X = 100, σ = 0.20, r = 0.08, b = ’0.04. Price a call option with time to maturity of of 3 months.

The program

void test baw approximation call(){

double S = 100; double X = 100; double sigma = 0.20;

double r = 0.08; double b = ’0.04; double time = 0.25;

cout << " Call price using Barone-Adesi Whaley approximation = "

<< option price american call approximated baw(S,X,r,b,sigma,time) << endl;

};

provides the output

Call price using Barone-Adesi Whaley approximation = 5.74339

Example 12.1: Example using the BAW approximation

94

Chapter 13

Average, lookback and other exotic options

Contents

13.1 Bermudan options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95

13.2 Asian options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98

13.3 Lookback options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99

13.4 Monte Carlo Pricing of options whose payo¬ depend on the whole price path 100

13.4.1 Generating a series of lognormally distributed variables . . . . . . . . . . . . . . . 100

13.5 Control variate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103

We now look at a type of options that has received a lot of attention in later years. The distinguishing factor

of these options is that they depend on the whole price path of the underlying security between today and

the option maturity.

13.1 Bermudan options

A Bermudan option is, as the name implies,1 a mix of an European and American option. It is a standard

put or call option which can only be exercised at discrete dates throughout the life of the option. The

simplest way to do the pricing of this is again the binomial approximation, but now, instead of checking at

every node whether it is optimal to exercise early, only check at the nodes corresponding to the potential

exercise times. Code 13.1 shows the calculation of the Bermudan price using binomial approximations. The

times as which exercise can happen is passed as a vector argument to the routine, and in the binomial a list

of which nodes exercise can happen is calculated and checked at every step.

1 Since Bermuda is somewhere between America and Europe...

95

#include <cmath> // standard C mathematical library

#include <algorithm> // de¬nes the max() operator

#include <vector> // STL vector templates

using namespace std;

double option price put bermudan binomial( const double& S, // spot price

const double& X, // exercice price

const double& r, // interest rate

const double& q, // continous payout

const double& sigma, // volatility

const double& time, // time to maturity

const vector<double>& potential exercise times,

const int& steps) { // no steps in binomial tree

double delta t=time/steps;

double R = exp(r*delta t); // interest rate for each step

double Rinv = 1.0/R; // inverse of interest rate

double u = exp(sigma*sqrt(delta t)); // up movement

double uu = u*u;

double d = 1.0/u;

double p up = (exp((r’q)*delta t)’d)/(u’d);

double p down = 1.0’p up;

vector<double> prices(steps+1); // price of underlying

vector<double> put values(steps+1); // value of corresponding put

vector<int> potential exercise steps; // create list of steps at which exercise may happen

for (int i=0;i<potential exercise times.size();++i){

double t = potential exercise times[i];

if ( (t>0.0)&&(t<time) ) {

potential exercise steps.push back(int(t/delta t));

};

};

prices[0] = S*pow(d, steps); // ¬ll in the endnodes.

for (int i=1; i<=steps; ++i) prices[i] = uu*prices[i’1];

for (int i=0; i<=steps; ++i) put values[i] = max(0.0, (X’prices[i])); // put payo¬s at maturity

for (int step=steps’1; step>=0; ’’step) {

bool check exercise this step=false;

for (int j=0;j<potential exercise steps.size();++j){

if (step==potential exercise steps[j]) { check exercise this step=true; };

};

for (int i=0; i<=step; ++i) {

put values[i] = (p up*put values[i+1]+p down*put values[i])*Rinv;

prices[i] = d*prices[i+1];

if (check exercise this step) put values[i] = max(put values[i],X’prices[i]);

};

};

return put values[0];

};

Code 13.1: Binomial approximation to Bermudan put option

96

The program

void test bermudan option(){

double S=80; double K=100; double r = 0.20;

double time = 1.0; double sigma = 0.25;

int steps = 500;

double q=0.0;

vector<double> potential exercise times; potential exercise times.push back(0.25);

potential exercise times.push back(0.5); potential exercise times.push back(0.75);

cout << " bermudan put price = "

<< option price put bermudan binomial(S,K,r,q,sigma,time,potential exercise times,steps)

<< endl;

};

provides the output

bermudan put price = 15.9079

97

13.2 Asian options

The payo¬ depends on the average of the underlying price. An average price call has payo¬

¯

CT = max(0, S ’ X),

¯

where S is the average of the underlying in the period between t and T .

Another Asian is the average strike call

¯

CT = max(0, ST ’ S)

¯

There are di¬erent types of Asians depending on how the average S is calculated. For the case of S being

¯

lognormal and the average S being a geometric average, there is an analytic formula due to Kemna and

Vorst [1990]. Hull [2003] also discusses this case. It turns out that one can calculate this option using the

√

regular Black Scholes formula adjusting the volatility to σ/ 3 and the dividend yield to

1 1

r + q + σ2

2 6

in the case of continous sampling of the underlying price distribution.

Code 13.2 shows the calculation of the analytical price of an Asian geometric average price call.

#include <cmath>

using namespace std;

#include "normdist.h" // normal distribution de¬nitions

double

option price asian geometric average price call(const double& S,

const double& X,

const double& r,

const double& q,

const double& sigma,

const double& time){

double sigma sqr = pow(sigma,2);

double adj div yield=0.5*(r+q+sigma sqr);

double adj sigma=sigma/sqrt(3.0);

double adj sigma sqr = pow(adj sigma,2);

double time sqrt = sqrt(time);

double d1 = (log(S/X) + (r’adj div yield + 0.5*adj sigma sqr)*time)/(adj sigma*time sqrt);

double d2 = d1’(adj sigma*time sqrt);

double call price = S * exp(’adj div yield*time)* N(d1) ’ X * exp(’r*time) * N(d2);

return call price;

};

Code 13.2: Analytical price of an Asian geometric average price call

98

13.3 Lookback options

The payo¬ from lookback options depend on the maximum or minimum of the underlying achieved through

the period. The payo¬ from the lookback call is the terminal price of the undelying less the minimum value

CT = max(0, ST ’ min S„ )

„ ∈[t,T ]

For this particular option an analytical solution has been found, due to Goldman et al. [1979], which is shown

in formula 13.1 and implemented in code 13.3

σ2 σ2

’q(T ’t) ’q(T ’t) ’r(T ’t)

eY1 N (’a3)

N (a1 ) ’ Se N (’a1 ) ’ Smin e N (a2 ) ’

C = Se

2(r ’ q) 2(r ’ q)

S 1

+ (r ’ q + 2 σ 2 )(T ’ t)

ln Smin

√

a1 =

σ T ’t

√

a2 = a1 ’ σ T ’ t

S

+ ’r + q + 1 σ 2 (T ’ t)

ln Smin 2

√

a3 =

σ T ’t

2 r ’ q ’ 1 σ 2 ln S

Copyright Design by: Sunlight webdesign