28
The Black-Scholes Model for Option Pricing - 2 -Mahantesh Halappanavar -Meeting-3, 09-11-2007

The Black-Scholes Model for Option Pricing - 2

  • Upload
    heath

  • View
    54

  • Download
    0

Embed Size (px)

DESCRIPTION

The Black-Scholes Model for Option Pricing - 2. -Mahantesh Halappanavar -Meeting-3, 09-11-2007. The Black-Scholes Model: Basics. Assumptions:. No dividends are paid on the underlying stock during the life of the option. Option can only be exercised at expiry (European style). - PowerPoint PPT Presentation

Citation preview

Page 1: The Black-Scholes Model for Option Pricing - 2

The Black-Scholes Modelfor Option Pricing - 2

-Mahantesh Halappanavar

-Meeting-3, 09-11-2007

Page 2: The Black-Scholes Model for Option Pricing - 2

The Black-Scholes Model: Basics

Page 3: The Black-Scholes Model for Option Pricing - 2

Assumptions:

1. No dividends are paid on the underlying stock during the life of the option.

2. Option can only be exercised at expiry (European style).

3. Efficient markets (Market movements cannot be predicted).

4. Commissions are non-existent.5. Interest rates do not change over the life of the

option (and are known)6. Stock returns follow a lognormal distribution

Page 4: The Black-Scholes Model for Option Pricing - 2

Price of the Call ( and r constant)

C=Price of the Call S=Current Stock Price T=Time of Expiration K=Strike Price r=Risk-free Interest Rate N()=Cumulative normal

distribution function e=Exponential term (2.7183) =Volatility

tT

tTrKS

d

))(

2()log(

2

1

tTdd 12

)()( 2)(

1 dNKedSNC tTrt

dxedNd

x

2

2

2

1)(

Page 5: The Black-Scholes Model for Option Pricing - 2

..if r is a function of time

tT

tTdrKS

d

T

t

)(2

)()log(2

1

tTdd 12

Page 6: The Black-Scholes Model for Option Pricing - 2

Price of the Put ( and r constant)

P=Price of Put S=Current Stock Price T=Time of Expiration K=Strike Price r=Risk-free Interest Rate N=Cumulative normal

distribution function e=Exponential term

(2.7183) =Volatility

tT

tTrKS

d

))(

2()log(

2

1

tTdd 12

)()( 2)(

1 dNKedSNP tTrt

dxedNd

x

2

2

2

1)(

Page 7: The Black-Scholes Model for Option Pricing - 2

Price of Put using Put-Call Parity

)( tTrttt XeSCP

Page 8: The Black-Scholes Model for Option Pricing - 2

Relaxations:

Dividends (Robert Merton) Taxes and Transaction Costs

(Jonathan Ingerson) Variable Interest Rates (Robert

Merton)

Page 9: The Black-Scholes Model for Option Pricing - 2

Greeks

Greeks are quantities representing the market sensitivity of options or other derivatives.

Delta: sensitivity to changes in price Gamma: Rate of change in delta Vega: Sensitivity to volatility Theta: sensitivity to passage of time Rho: sensitivity to interest rate

Page 10: The Black-Scholes Model for Option Pricing - 2

Greeks:

Delta Derivative w.r.t. stock price S:

Theta Time-decay: derivative w.r.t. time

Vega Derivative w.r.t. volatility

Rho Derivative w.r.t. interest rate

Eta Derivative w.r.t. strike K

Gamma Rate of change of delta

CS

Cr

Ct

CSS

Page 11: The Black-Scholes Model for Option Pricing - 2

Barrier Options:

A barrier option with payoff Qo and maturity T is a contract which yields a payoff Qo(ST) at maturity T, as long as the spot price St remains in the interval (a(t),b(t)) for all time t[0,T].

Page 12: The Black-Scholes Model for Option Pricing - 2

Monte-Carlo Methods

Page 13: The Black-Scholes Model for Option Pricing - 2

Observation:

“Because of the difficulty in solving PDEs, numerous methods exist to

solve them, including Backlund Transformations, Green’s Function,

Integral Transformation, or numerical methods such as finite difference

methods.”

-www.global-derivatives.com

Page 14: The Black-Scholes Model for Option Pricing - 2

Orientation:

A technique of employing statistical sampling to approximate solutions to quantitative problems.

Stochastic (nondeterministic) using pseudo-random numbers.

“When number of dimensions (degrees of freedom) in the problem is lerge, PDE’s and numerical integrals become intractable: Monte Carlo methods often give better results”

“MC methods converge to the solutions more quickly than numerical integration methods, require less memory and are easier to program”

Page 15: The Black-Scholes Model for Option Pricing - 2

Numerical Random Variables

C-library rand() returns an integer value uniformly distributed in [0,RAND_MAX]

To obtain Gaussian random variable:

So that: Let w1 and w2 be two independent random

variables.

MAXRAND

www

_:~

]1,0[~w

Page 16: The Black-Scholes Model for Option Pricing - 2

Gaussian Random Variable

x is a Gaussian variable with zero mean value, unit variance, and density

Therefore, may be used to simulate

2

2

2

1 x

e

tx

ttt WW

)2cos()log(2 21 wwx

Page 17: The Black-Scholes Model for Option Pricing - 2

C++ Code:

Page 18: The Black-Scholes Model for Option Pricing - 2

Initialization:#include <iostream>#include <math.h>#include <stdlib.h>#include <fstream.h>using namespace std;

const int M=100; // # of time steps of size dtconst int N=50000; // # of stochastic realizationconst int L=40; // # of sampling point for Sconst double K = 100; // the strikeconst double leftS=0, rightS=130; //the barriersconst double sigmap=0.2, r=0.1; // volatility, rate

const double pi2 =8*atan(1), dt=1./M, sdt =sqrt(dt), eps=1.e-50;

const double er=exp(-r);

Page 19: The Black-Scholes Model for Option Pricing - 2

Function Declarations:

double gauss();

double EDOstoch(const double x, int m); //Vanilla

double EDOstoch_barrier(const double x, int m, const double Smin, const double Smax); //Barrier

double payoff(double s);

Page 20: The Black-Scholes Model for Option Pricing - 2

Main():int main( void ){ ofstream ff("stoch.dat"); for(double x=0.;x<2*K;x+=2*K/L) { // sampling values for x=S double value =0; double y,S ; for(int i=0;i<N;i++) { S=EDOstoch(x,M); //Vanilla Options

//S=EDOstoch_barrier(x,M, leftS, rightS); //Barrier double y=0; if (S>= 0) y = er*payoff(S); value += y; }

ff << x <<"\t" << value/N << endl; } return 0;}

K=100; L=40; 0 – 200, x+=5 40 iterations

N=50,000; M= 100

er=exp(-r)

Payoff=max(S-K, 0)

#Ops = 40 X 50,000 = 2,000,000

Page 21: The Black-Scholes Model for Option Pricing - 2

Gaussian Random Number

double gauss()

{

return sqrt(eps-2.*log(eps+rand()/(double)RAND_MAX))

*cos(rand()*pi2/RAND_MAX);

}

MAXRAND

www

_:~ )2cos()log(2 21 wwx

eps=1.e-50

pi2=8*atan(1)

Page 22: The Black-Scholes Model for Option Pricing - 2

European Vanilla Call Price ()

double EDOstoch(const double x, int m)

{

double S= x;

for(int i=0;i<m;i++)

S += S*(sigmap*gauss()*sdt+r*dt);

return S; // gives S(x, t=m*dt)

}

X: 0 – 200, x+=5

40 iterations

m= 100 (dt)

Volatility RateSqrt(dt)

dt= 1.0/M

M=500

Page 23: The Black-Scholes Model for Option Pricing - 2

Barrier Call Price()double EDOstoch_barrier(const double x, int m,

const double Smin, const double Smax)

{ if ((x<=Smin)||(x>=Smax)) return -1000; double S= x; for(int i=0;i<m;i++) { if ((S<=Smin)||(S>=Smax))

return -1000; S += S*(sigmap*gauss()*sdt+r*dt); } return S; }

double payoff(double s){ if(s>K) return s-K; else return 0;}

Page 24: The Black-Scholes Model for Option Pricing - 2

Output of the Code: (Vanilla)

Figure: Computation of the call price one year to maturity by using the Monte-Carlo algorithm presented in the slides before. The curve displays C versus S.

X axis: (20*S)/(K)Y axis: C {payoff K=100,=0.2,r=0.1}

Page 25: The Black-Scholes Model for Option Pricing - 2

Output of the Code: (Barrier)

Figure: Computation of the call price one year to maturity by using the Monte-Carlo algorithm presented in the slides before. The curve displays C versus S.

X axis: S a = 0, b = 130Y axis: C {payoff K=100,=0.2,r=0.1}

Page 26: The Black-Scholes Model for Option Pricing - 2

Random Variables using GSL

#include <gsl/gsl_rng.h>

#include <gsl/gsl_rnadist.h>

const gsl_rng_type *Tgsl=gsl_rng_default;

gsl_rng_env_setup();

gsl_rng *rgsl=gsl_rng_alloc(Tgsl);

double gauss(double dt)

{

return gsl_ran_gaussian(rgsk, dt);

}

Page 27: The Black-Scholes Model for Option Pricing - 2

Central Limit Theorem

… to come

Page 28: The Black-Scholes Model for Option Pricing - 2

Variance Reduction

…to come