math 623 - computational finance double barrier option pricing...

9
. Math 623 - Computational Finance Double barrier option pricing using Quasi Monte Carlo and Brownian Bridge methods Pratik Mehta [email protected] Masters of Science in Mathematical Finance Department of Mathematics, Rutgers University This paper describes the implementation of a C++ program to calculate the value of a european style call option and a discretely sampled Double barrier option on an underlying asset, given input parameters for stock price (s=100), strike price (k=110),volatility (v=30%), interest rate (r=5%), maturity (T=1 year), U = 120 knock in, and L = 90 knock out usingBrownian bridge with terminal stratification, Quasi Monte Carlo simulation with low discrepancy Sobol sequences and Monte Carlo with antithetic sampling. We compare the results of all these methods. The underlying stock price is assumed to follow geometric brownian motion. The program calculates the option prices using the Monte Carlo/Quasi MC method with 10,000 simulations, 1000 strata for stratified sampling and uses the solution to the Stochastic differential equation of the stock process [2]. I. INTRODUCTION In this assignment we are pricing a European style vanilla call option and discretely double barrier option (t = 6) using Brownian Bridge with terminal stratifi- cation, low discrepancy Sobol sequences and com- paring results with closed form solution and Monte Carlo using antithetic sampling. dS(t)=(rS(t)dt + σS(t)dW (t) (1) the solution to the above Stochastic Differential Equation is, S(T )= S(0)e (r- 1 2 σ 2 )T +σW(T ) (2) the payoff for the call option is, (S(T ) - k) + (3) We also price a double barrier option, with the condi- tions, Up and in and Down and out. This can be repre- sented by, (S(T ) - k) + 1 max(S(t))U 1 S(t)L (4) We have modified Joshi’s code from chapter 7 (EquityFXMain.cpp), as was required for this assign- ment. II. VANILLA CALL : CLOSED FORM BLACK-SCHOLES-MERTON Here, K is the strike price and S(T ) is the terminal stock price at the payoff date. The price of the underlying at terminal time,T , is given by [3] S(T )= S(0)e (r-a- 1 2 σ 2 )T +σW(T ) (5) A closed form solution for the price of a European Call and Put is given by [3] c(t, x)= xe -aT N (d + (T,x)) - e -rT KN (d - (τ,x)) (6) and p(t, x)= e -rT KN (-d - (T,x)) - xe -aT N (-d + (τ,x)). (7) Here, N is the Normal Cumulative Distribution density and the parameters, d + and d - are given by d + = d - + σ T = 1 σ T log x K + r + 1 2 σ 2 T . (8) The function ”bsm” in the file ”Equity- MainFX.cpp” describes the implementation of the above closed form Black Scholes Merton model. The out- put is as follows, Closed form option price =9.057 (9) III. VANILLA CALL : MONTE CARLO WITH PARK-MILLER AND ANTITHETIC SAMPLING Park-Miller is one of the many random number gen- erators thats are used to produce random samples for Monte Carlo simulation. It is on of the Linear Congru- ential Generators (LCG). It has a period of, 2 31 - 1 (10) The general form of a LCG generator is, x i+1 =(ax i + c) mod m 1 (11) u i+1 = x i+1 /m 1 (12)

Upload: others

Post on 15-Aug-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Math 623 - Computational Finance Double barrier option pricing …pbmehta.weebly.com/uploads/1/1/7/9/11798112/double... · 2019-11-04 · Math 623 - Computational Finance Double barrier

.

Math 623 - Computational FinanceDouble barrier option pricing using Quasi Monte Carlo and Brownian Bridge methods

Pratik Mehta

[email protected] of Science in Mathematical Finance

Department of Mathematics, Rutgers University

This paper describes the implementation of a C++ program to calculate the value of a europeanstyle call option and a discretely sampled Double barrier option on an underlying asset, given inputparameters for stock price (s=100), strike price (k=110),volatility (v=30%), interest rate(r=5%), maturity (T=1 year), U = 120 knock in, and L = 90 knock out usingBrownianbridge with terminal stratification, Quasi Monte Carlo simulation with low discrepancySobol sequences and Monte Carlo with antithetic sampling. We compare the results of all thesemethods. The underlying stock price is assumed to follow geometric brownian motion. The programcalculates the option prices using the Monte Carlo/Quasi MC method with 10,000 simulations, 1000strata for stratified sampling and uses the solution to the Stochastic differential equation of thestock process [2].

I. INTRODUCTION

In this assignment we are pricing a European stylevanilla call option and discretely double barrier option (t= 6) using Brownian Bridge with terminal stratifi-cation, low discrepancy Sobol sequences and com-paring results with closed form solution and Monte Carlousing antithetic sampling.

dS(t) = (rS(t)dt+ σS(t)dW (t) (1)

the solution to the above Stochastic Differential Equationis,

S(T ) = S(0)e(r−12σ

2)T+σW (T ) (2)

the payoff for the call option is,

(S(T )− k)+ (3)

We also price a double barrier option, with the condi-tions, Up and in and Down and out. This can be repre-sented by,

(S(T )− k)+1max(S(t))≥U1S(t)≥L (4)

We have modified Joshi’s code from chapter 7(EquityFXMain.cpp), as was required for this assign-ment.

II. VANILLA CALL : CLOSED FORMBLACK-SCHOLES-MERTON

Here, K is the strike price and S(T ) is the terminalstock price at the payoff date. The price of the underlyingat terminal time,T , is given by [3]

S(T ) = S(0)e(r−a−12σ

2)T+σW (T ) (5)

A closed form solution for the price of a European Calland Put is given by [3]

c(t, x) = xe−aTN(d+(T, x))− e−rTKN(d−(τ, x)) (6)

and

p(t, x) = e−rTKN(−d−(T, x))− xe−aTN(−d+(τ, x)).(7)

Here, N is the Normal Cumulative Distribution densityand the parameters, d+ and d− are given by

d+ = d− + σ√T =

1

σ√T

[log

x

K+

(r +

1

2σ2

)T

].(8)

The function ”bsm” in the file ”Equity-MainFX.cpp” describes the implementation of theabove closed form Black Scholes Merton model. The out-put is as follows,

Closed form option price = 9.057 (9)

III. VANILLA CALL : MONTE CARLO WITHPARK-MILLER AND ANTITHETIC SAMPLING

Park-Miller is one of the many random number gen-erators thats are used to produce random samples forMonte Carlo simulation. It is on of the Linear Congru-ential Generators (LCG). It has a period of,

231 − 1 (10)

The general form of a LCG generator is,

xi+1 = (axi + c) mod m1 (11)

ui+1 = xi+1/m1 (12)

Page 2: Math 623 - Computational Finance Double barrier option pricing …pbmehta.weebly.com/uploads/1/1/7/9/11798112/double... · 2019-11-04 · Math 623 - Computational Finance Double barrier

2

x = initial seeda = multiplierm = modulusc = shift

The following are the values for the variables

m = 231 − 1, a = 16807 (13)

Park Miller’s uniform random number generator is im-plemented by Mark Joshi. We then pass these uniformvalues to inverse cumulative distribution to get normallydistributed variables. We use antithetic sampling whichis described below. We use the barrier class to price thevanilla call option. We set the Upper barrier U =100 and L = 0, so that the barrier option now behaveslike a vanilla option. We have implemented this functionin the file BrownianBridgePath.h and cpp. In Anti-thetic sampling we take one sample using Park Miller andthe use the negative of the same value as second sample.In this was we get the following equation

S(ti+1) = S(ti)(1 + rτ + σ√TZi+1) (14)

S(ti+1) = S(ti)(1 + rτ − σ√TZi+1) (15)

Using the above formula, we can reduce the varianceof the samples.The result of Monte Carlo simulation onusing the above variance reduction technique.

YAV =1

n(Σni=1(

Yi + Yi2

)) (16)

The output for out call option is,

MC vanilla call with Park −Miller = 9.036 (17)

IV. DOUBLE BARRIER OPTIONS

Barrier options are path-dependent options, with pay-offs that depend on the price of the underlying asset atexpiration and whether or not the asset price crossesa barrier during the life of the option. There are twocategories or types of Barrier options: ”knock-in” and”knock-out”. ”Knock-in” or ”in” options are paid for upfront, but you do not receive the option until the assetprice crosses the barrier. This Knock-in can be repre-sented by,

(S(T )− k)+1max(S(t))≥U (18)

”Knock-out” or ”out” options come into existenceon the issue date but becomes worthless if the assetprice hits the barrier before the expiration date. If theoption is a knock-in (knock-out), a predetermined cash

rebate may be paid at expiration if the option has notbeen knocked in (knocked-out) during its lifetime. Thebarrier monitoring frequency specifies how often theprice is checked for a breach of the barrier. All of theanalytical models have a flag to change the monitoringfrequency where the default frequency is continuous.Knock-out options are represented as

(S(T )− k)+1S(t)≥L (19)

Double Barrier options are options with two barri-ers, In this assignment we price a boucle barrier optionwith knock in upper barrier U and a knock out lowerbarrier L. U = 120, L = 90. This means the optionwill only pay if we cross U at least once on the discretemonitoring dates and always remain above the barrierL.[8] This option can be represented as,

(S(T )− k)+1max(S(t))≥U1S(t)≥L (20)

V. DOUBLE BARRIER WITH PARK - MILLERUNIFORMS AND ANTITHETIC SAMPLING

Park Miller’s uniform random number generator is im-plemented by Mark Joshi. We then pass these uniformvalues to inverse cumulative distribution to get normallydistributed variables. We use antithetic sampling whichis described below. We use the barrier class to price dou-ble barrier call option. We set the Upper barrier U= 120 and L = 90, We have implemented this functionin the file BrownianBridgePath.h and cpp. In Anti-thetic sampling we take one sample using Park Miller andthe use the negative of the same value as second sample.In this was we get the following equation

S(ti+1) = S(ti)(1 + rτ + σ√TZi+1) (21)

S(ti+1) = S(ti)(1 + rτ − σ√TZi+1) (22)

We use the above formula for path generation and thencheck for the barrier conditions, and if we satisfy theconditions than we calculate the payoff and then averagethem.

Using the above formula, we can reduce the varianceof the samples.The result of Monte Carlo simulation onusing the above variance reduction technique.

YAV =1

n(Σni=1(

Yi + Yi2

)) (23)

MC double barrier Park −Miller antithetics = 8.6(24)

Page 3: Math 623 - Computational Finance Double barrier option pricing …pbmehta.weebly.com/uploads/1/1/7/9/11798112/double... · 2019-11-04 · Math 623 - Computational Finance Double barrier

3

VI. BROWNIAN BRIDGE WITH TERMINALSTRATIFICATION - VANILLA CALL AND

DOUBLE BARRIER OPTIONS

The brownian bridge path generation is usually usedin conjunction with variance reduction techniques likestratified sampling. Suppose W (t) is a R-valued Brow-nian motion and suppose we know the some values ofBrownian motion,

W (s1) = x1, ....,W (sk) = xk (25)

we can find the value of W (s) where s in (si, si+1) con-ditional on the k values. This conditional distribution ofW (s) is on

W (si) = xi (26)

W (si+1) = xi+1 (27)

and is given by,

W (s) =(si+1 − si)W (si) + (s− si)W (si+1)

(si+1 − si)(28)

+

√(si+1 − si)(s− si))

(si+1 − si)(29)

where Z is Normally distributed random variable.

Stratified (Regional) sampling.

Stratified sampling is a divide-and-conquer strategywhich partitions the state space into regions, and thena sampling plan is devised for each region. Moreover,common sense suggests that the smaller the region, theless variance that should exist in that region, and soa variance reduction may be achievable in each of thesmaller regions that partition the entire space.

Divide U into k subdivisions, or strata, Ui, wherek is the total number of possible combinations describedabove. We have

U = U1 ∪ U2 ∪ . . . Uk such that Ui ∩ Uj = ∅,

for all i 6= j and 1i, j ≤ k. if we let Ni = Ui, then

N =

k∑i=1

Ni.

Draw a sample Si from each stratum Ui. The abovedescription of asian option was taken from [6] The algo-rithm for implementing Brownian bridge with Stratifica-tion is given below

(30)

for i = 1, ..., k, (31)

generate Unif [0, 1]; (32)

V = (i− 1 + U)/K; (33)

W (tm) =√tmφ

−1 (34)

a =(si+1 − si)W (si) + (s− si)W (si+1)

(si+1 − si)(35)

b =

√(si+1 − si)(s− si))

(si+1 − si)(36)

Wi = a+ bZ (37)

return(W (t1)....W (tm)) (38)

We have implemented this algorithm in the file Geo-metricBrownianPath.h and cpp. It is implementedas a class and uses different member function to calcu-late prices of Vanilla and Asian options. We have usedthe above algorithm in conjunction with Park-Milleruniforms.

For vanilla Asian call options

(39)

MC V anilla, Park −Miller, stratified = 8.91 (40)

For Double barrier call options

(41)

MC Double Barrier stratified = 7.86 (42)

VII. DOUBLE BARRIER/VANILLA CALL,QUASI MONTE CARLO WITH SOBOL

SEQUENCE

A major drawback of Monte Carlo integration withpseudo-random numbers is given by the fact that theerror term scales only as 1/

√N .This is inherent to meth-

ods based on random numbers.This leads to the idea tochoose the points deterministically such that to minimizethe integration error.Low-discrepancy sequence is a se-quence with the property that for all values of N, itssubsequence x1, ..., xN has a low discrepancy. Roughlyspeaking, the discrepancy of a sequence is low if the num-ber of points in the sequence falling into an arbitrary setB is close to proportional to the measure of B, as wouldhappen on average (but not for particular samples) in thecase of a uniform distribution[4].

We now have the main theorem of quasi-Monte Carlointegration: If f has bounded variation on [0, 1]d then forany x1, ..., xN ∈ [0, 1]d we have∣∣∣∣∣ 1

N

N∑n=1

f(xn)−∫dxf(x)

∣∣∣∣∣ ≤ V (f)D∗(x1, ..., xN ). (43)

Sobol sequences [5] are obtained by first choosing aprimitive polynomial over Z of degree g:

P = xg + a1xg−1 + ...+ ag−1x+ 1, (44)

Page 4: Math 623 - Computational Finance Double barrier option pricing …pbmehta.weebly.com/uploads/1/1/7/9/11798112/double... · 2019-11-04 · Math 623 - Computational Finance Double barrier

4

where each ai is either 0 or 1. The coefficients ai are usedin the recurrence relation

vi = a1vi−1 ⊕ a2vi−2 ⊕ ...⊕ ag−1vi−g+1 ⊕ vi−g ⊕ [vi−g/2g],(45)

where ⊕ denotes the bitwise exclusive-or operation andeach vi is a number which can be written as vi = mi/(2

i)with 0 < mi < 2i. Consequetive quasi-random numbersare then obtained from the relation

xn+1 = xn ⊕ vc, (46)

where the index c is equal to the place of the rightmostzero-bit in the binary representation of n. For examplen = 11 has the binary representation 1011 and the right-most zero-bit is the third one. Therefore c = 3 in thiscase. For a primitive polynomial of degree g we also haveto choose the first g values for the mi. The only restric-tion is that the mi are all odd and mi < 2i. There is analternative way of computing xn:

xn = g1v1 ⊕ g2v2 ⊕ ... (47)

where ...g3g2g1 is the Gray code representation of n. Thebasic property of the Gray code is that the representa-tions for n and n + 1 differ in only one position. TheGray code representation can be obtained from the bi-nary representation according to

...g3g2g1 = ...b3b2b1 ⊕ ...b4b3b2. (48)

The above description of the sobol sequence genera-tion was taken from [1].We have used Sobol sequencegenerator by S.Joe and R.Y.Kuo. We pass a file withthe primitive polynomial and values of all the coefficient.This Sobol generator is capable of producing vary highdimensional sequences from 0 to 1. In our application weneed only 1 dimensional sequence since we are evaluat-ing a vanilla call option at expiry. We have implementeda function MCSobol in Sobol.cpp which uses sobolsequences to implement Quasi Monte Carlo simulation.The function ”sobolpoints” returns an array with sobolsequences which are used for option price calculation.The price with this method is,

QMC vanilla call with Sobol sequences = 9.056 (49)

The double barrier call option with Sobol sequence priceis,

QMC Double Barrier Sobol sequences = 8.10 (50)

As we can see that the option price using sobol sequencesand quasi monte carlo method is the closest to the closedformed solution.

VIII. ANSWER TO THE QUESTIONS

Q1We have compared our results with those of the closed-form continuously monitored single barrier options from

Kerry Back’s and Espen Haug’s spreadsheets . We haveattached the snapshots below. The results are as follows,

Haug down and out call = 6.335 (51)

Haug up and in call = 9.006 (52)

Black′s down and out call = 6.33 (53)

Q2We have compared our results with those of the closed-form continuously monitored double barrier options fromEspen Haug’s spreadsheet. We have compared our re-sults,

Haug up− in and down− in call = 9.05 (54)

Haug up− out and down− out call = 0.0035 (55)

Q3 Brownian Bridge

Effect of varying strata sizeWe have varied the number of strata, and hence thestrata size and calculated the option price. We usedthe following number of strata, 10,100,300,600,900,1200and 5000. The results of varying the number of strataare presented in the second table below. We find thatvarying the size changes the answers marginally. Thechange is not significant. THe answer seems to increasewith the strata size till about 600 and then decreases.

IX. BENCHMARKING

We have used many spreadsheet based model to bench-mark our results. The summary go the benchmarking isgiven below and is also tabularised below. Excel spread-sheets by Haug and Black does not provide Up-and-in-down-and-out call option . Hence we have bench-marked our results using, Numerix, the closed form singlebarrier and up and in down and in double barrier optionsfrom the VBA sheets. The results are,

Numerix option price vanilla = 9.08 (56)

Numerix up− in− and− down− out = 8.24 (57)

Haug down and out call = 6.335 (58)

Haug up and in call = 9.006 (59)

Black′s down and out call = 6.33 (60)

Haug up− in and down− in call = 9.05 (61)

Haug up− out and down− out call = 0.0035 (62)

Page 5: Math 623 - Computational Finance Double barrier option pricing …pbmehta.weebly.com/uploads/1/1/7/9/11798112/double... · 2019-11-04 · Math 623 - Computational Finance Double barrier

5

TABLE I: Vanilla and Asian Call pricing using Methods for S(0)=100 and K=110

Option Closed Form Park-Miller,Antithetic Park-Miller with Stratified Sobol sequence Numerix

European Vanilla Call 9.05 9.036 8.91 9.056 9.08

Double barrier (Up-in, Down-out) Call - 8.60 7.86 8.10 8.24

TABLE II: Effect of varying Strata size S(0)=100 and K=110

Strata size Double barrier call Vanilla Call

10 7.79 8.81

100 7.82 8.83

300 7.83 8.82

600 7.78 8.78

900 7.84 8.81

1200 7.80 8.79

5000 7.80 8.78

Page 6: Math 623 - Computational Finance Double barrier option pricing …pbmehta.weebly.com/uploads/1/1/7/9/11798112/double... · 2019-11-04 · Math 623 - Computational Finance Double barrier

6

1.StandardBarrier

Standard Barrier option

[5] Down-and-out call

LongYears

Continuous

Continuous

Continuously

By Espen Gaarder Haug

Standard Barrier option

[5] Down-and-out call

LongYears

Continuous

Continuous

Continuously

Standard Barrier option

[5] Down-and-out call

LongYears

Continuous

Continuous

Continuously

Standard Barrier option

[5] Down-and-out call

LongYears

Continuous

Continuous

Continuously

Standard Barrier optionImplementation By Espen Gaarder Haug, Copyright 2006

[5] Down-and-out call

LongYears

Continuous

Continuous

Continuously

Implementation By Espen Gaarder Haug, Copyright 2006

[5] Down-and-out call

LongYears

Continuous

Continuous

Continuously

Implementation By Espen Gaarder Haug, Copyright 2006

[5] Down-and-out call

LongYears

Continuous

Continuous

Continuously

Implementation By Espen Gaarder Haug, Copyright 2006

[5] Down-and-out call

LongYears

Continuous

Continuous

Continuously

Implementation By Espen Gaarder Haug, Copyright 2006

[5] Down-and-out call

LongYears

Continuous

Continuous

Continuously

[5] Down-and-out call

LongYears

Continuous

Continuous

Continuously

[5] Down-and-out call

LongYears

Continuous

Continuous

Continuously

[5] Down-and-out call

LongYears

Continuous

Continuous

Continuously

[5] Down-and-out call

LongYears

Continuous

Continuous

Continuously

[5] Down-and-out call

LongYears

Continuous

Continuous

Continuously

[5] Down-and-out call

LongYears

Continuous

Continuous

Continuously

[5] Down-and-out call

LongYears

Continuous

Continuous

Continuously

[5] Down-and-out call

LongYears

Continuous

Continuous

ContinuouslyTime in :

[5] Down-and-out call

LongYears

Continuous

Continuous

ContinuouslyTime in :

[5] Down-and-out call

LongYears

Continuous

Continuous

ContinuouslyTime in :

[5] Down-and-out call

LongYears

Continuous

Continuous

ContinuouslyTime in :Asset price ( S ) 100.00

[5] Down-and-out call

LongYears

Continuous

Continuous

Continuously

Asset price ( S ) 100.00

[5] Down-and-out call

LongYears

Continuous

Continuous

Continuously

Asset price ( S ) 100.00

[5] Down-and-out call

LongYears

Continuous

Continuous

Continuously

Asset price ( S ) 100.00Strike price ( X ) 110.00

[5] Down-and-out call

LongYears

Continuous

Continuous

Continuously

Asset price ( S ) 100.00Strike price ( X ) 110.00

[5] Down-and-out call

LongYears

Continuous

Continuous

Continuously

Strike price ( X ) 110.00

[5] Down-and-out call

LongYears

Continuous

Continuous

Continuously

Strike price ( X ) 110.00

[5] Down-and-out call

LongYears

Continuous

Continuous

Continuously

Strike price ( X ) 110.00Barrier ( H ) 90.00

[5] Down-and-out call

LongYears

Continuous

Continuous

Continuously

Barrier ( H ) 90.00

[5] Down-and-out call

LongYears

Continuous

Continuous

Continuously

Barrier ( H ) 90.00

[5] Down-and-out call

LongYears

Continuous

Continuous

Continuously

Barrier ( H ) 90.00Rebate ( K ) 0.00Rebate ( K ) 0.00

[5] Down-and-out call

LongYears

Continuous

Continuous

Continuously

Rebate ( K ) 0.00

[5] Down-and-out call

LongYears

Continuous

Continuous

Continuously

Rebate ( K ) 0.00

[5] Down-and-out call

LongYears

Continuous

Continuous

Continuously

Rebate ( K ) 0.00

Time to maturity ( T ) 1.00

[5] Down-and-out call

LongYears

Continuous

Continuous

Continuously

Time to maturity ( T ) 1.00

[5] Down-and-out call

LongYears

Continuous

Continuous

Continuously

Time to maturity ( T ) 1.00

[5] Down-and-out call

LongYears

Continuous

Continuous

Continuously

Time to maturity ( T ) 1.00

[5] Down-and-out call

LongYears

Continuous

Continuous

Continuously

Time to maturity ( T ) 1.00Risk-free rate ( r ) 5.00%

[5] Down-and-out call

LongYears

Continuous

Continuous

Continuously

Risk-free rate ( r ) 5.00%

[5] Down-and-out call

LongYears

Continuous

Continuous

Continuously

Risk-free rate ( r ) 5.00%

[5] Down-and-out call

LongYears

Continuous

Continuous

Continuously

Risk-free rate ( r ) 5.00%Cost of carry ( b ) 3.00%

[5] Down-and-out call

LongYears

Continuous

Continuous

Continuously

Cost of carry ( b ) 3.00%

[5] Down-and-out call

LongYears

Continuous

Continuous

Continuously

Cost of carry ( b ) 3.00%

[5] Down-and-out call

LongYears

Continuous

Continuous

Continuously

Cost of carry ( b ) 3.00%Volatility ( σ ) 30.00%

[5] Down-and-out call

LongYears

Continuous

Continuous

Continuously

Volatility ( σ ) 30.00%

[5] Down-and-out call

LongYears

Continuous

Continuous

Continuously

Volatility ( σ ) 30.00%

[5] Down-and-out call

LongYears

Continuous

Continuous

Continuously

Volatility ( σ ) 30.00%Adjusted Barrier 90.0000

[5] Down-and-out call

LongYears

Continuous

Continuous

Continuously

Volatility ( σ ) 30.00%Adjusted Barrier 90.0000

[5] Down-and-out call

LongYears

Continuous

Continuous

Continuously

Adjusted Barrier 90.0000

[5] Down-and-out call

LongYears

Continuous

Continuous

Continuously

Adjusted Barrier 90.0000

[5] Down-and-out call

LongYears

Continuous

Continuous

Continuously

Adjusted Barrier 90.0000Forward price 103.0455

[5] Down-and-out call

LongYears

Continuous

Continuous

Continuously

Forward price 103.0455

[5] Down-and-out call

LongYears

Continuous

Continuous

Continuously

Forward price 103.0455

[5] Down-and-out call

LongYears

Continuous

Continuous

Continuously

Forward price 103.0455Value 6.3350

[5] Down-and-out call

LongYears

Continuous

Continuous

Continuously

Value 6.3350

[5] Down-and-out call

LongYears

Continuous

Continuous

Continuously

Value 6.3350

[5] Down-and-out call

LongYears

Continuous

Continuous

Continuously

Value 6.3350

[5] Down-and-out call

LongYears

Continuous

Continuous

Continuously

Value 6.3350

[5] Down-and-out call

LongYears

Continuous

Continuous

Continuously

By Espen Gaarder HaugBy Espen Gaarder HaugBy Espen Gaarder HaugBy Espen Gaarder Haug

FIG. 1: Haug, Down-and-Out.

1.StandardBarrier

Standard Barrier option

[2] Up-and-in call

LongYears

Continuous

Continuous

Continuously

By Espen Gaarder Haug

Standard Barrier option

[2] Up-and-in call

LongYears

Continuous

Continuous

Continuously

Standard Barrier option

[2] Up-and-in call

LongYears

Continuous

Continuous

Continuously

Standard Barrier option

[2] Up-and-in call

LongYears

Continuous

Continuous

Continuously

Standard Barrier optionImplementation By Espen Gaarder Haug, Copyright 2006

[2] Up-and-in call

LongYears

Continuous

Continuous

Continuously

Implementation By Espen Gaarder Haug, Copyright 2006

[2] Up-and-in call

LongYears

Continuous

Continuous

Continuously

Implementation By Espen Gaarder Haug, Copyright 2006

[2] Up-and-in call

LongYears

Continuous

Continuous

Continuously

Implementation By Espen Gaarder Haug, Copyright 2006

[2] Up-and-in call

LongYears

Continuous

Continuous

Continuously

Implementation By Espen Gaarder Haug, Copyright 2006

[2] Up-and-in call

LongYears

Continuous

Continuous

Continuously

[2] Up-and-in call

LongYears

Continuous

Continuous

Continuously

[2] Up-and-in call

LongYears

Continuous

Continuous

Continuously

[2] Up-and-in call

LongYears

Continuous

Continuous

Continuously

[2] Up-and-in call

LongYears

Continuous

Continuous

Continuously

[2] Up-and-in call

LongYears

Continuous

Continuous

Continuously

[2] Up-and-in call

LongYears

Continuous

Continuous

Continuously

[2] Up-and-in call

LongYears

Continuous

Continuous

Continuously

[2] Up-and-in call

LongYears

Continuous

Continuous

ContinuouslyTime in :

[2] Up-and-in call

LongYears

Continuous

Continuous

ContinuouslyTime in :

[2] Up-and-in call

LongYears

Continuous

Continuous

ContinuouslyTime in :

[2] Up-and-in call

LongYears

Continuous

Continuous

ContinuouslyTime in :Asset price ( S ) 100.00

[2] Up-and-in call

LongYears

Continuous

Continuous

Continuously

Asset price ( S ) 100.00

[2] Up-and-in call

LongYears

Continuous

Continuous

Continuously

Asset price ( S ) 100.00

[2] Up-and-in call

LongYears

Continuous

Continuous

Continuously

Asset price ( S ) 100.00Strike price ( X ) 110.00

[2] Up-and-in call

LongYears

Continuous

Continuous

Continuously

Asset price ( S ) 100.00Strike price ( X ) 110.00

[2] Up-and-in call

LongYears

Continuous

Continuous

Continuously

Strike price ( X ) 110.00

[2] Up-and-in call

LongYears

Continuous

Continuous

Continuously

Strike price ( X ) 110.00

[2] Up-and-in call

LongYears

Continuous

Continuous

Continuously

Strike price ( X ) 110.00Barrier ( H ) 120.00

[2] Up-and-in call

LongYears

Continuous

Continuous

Continuously

Barrier ( H ) 120.00

[2] Up-and-in call

LongYears

Continuous

Continuous

Continuously

Barrier ( H ) 120.00

[2] Up-and-in call

LongYears

Continuous

Continuous

Continuously

Barrier ( H ) 120.00Rebate ( K ) 0.00Rebate ( K ) 0.00

[2] Up-and-in call

LongYears

Continuous

Continuous

Continuously

Rebate ( K ) 0.00

[2] Up-and-in call

LongYears

Continuous

Continuous

Continuously

Rebate ( K ) 0.00

[2] Up-and-in call

LongYears

Continuous

Continuous

Continuously

Rebate ( K ) 0.00

Time to maturity ( T ) 1.00

[2] Up-and-in call

LongYears

Continuous

Continuous

Continuously

Time to maturity ( T ) 1.00

[2] Up-and-in call

LongYears

Continuous

Continuous

Continuously

Time to maturity ( T ) 1.00

[2] Up-and-in call

LongYears

Continuous

Continuous

Continuously

Time to maturity ( T ) 1.00

[2] Up-and-in call

LongYears

Continuous

Continuous

Continuously

Time to maturity ( T ) 1.00Risk-free rate ( r ) 5.00%

[2] Up-and-in call

LongYears

Continuous

Continuous

Continuously

Risk-free rate ( r ) 5.00%

[2] Up-and-in call

LongYears

Continuous

Continuous

Continuously

Risk-free rate ( r ) 5.00%

[2] Up-and-in call

LongYears

Continuous

Continuous

Continuously

Risk-free rate ( r ) 5.00%Cost of carry ( b ) 3.00%

[2] Up-and-in call

LongYears

Continuous

Continuous

Continuously

Cost of carry ( b ) 3.00%

[2] Up-and-in call

LongYears

Continuous

Continuous

Continuously

Cost of carry ( b ) 3.00%

[2] Up-and-in call

LongYears

Continuous

Continuous

Continuously

Cost of carry ( b ) 3.00%Volatility ( σ ) 30.00%

[2] Up-and-in call

LongYears

Continuous

Continuous

Continuously

Volatility ( σ ) 30.00%

[2] Up-and-in call

LongYears

Continuous

Continuous

Continuously

Volatility ( σ ) 30.00%

[2] Up-and-in call

LongYears

Continuous

Continuous

Continuously

Volatility ( σ ) 30.00%Adjusted Barrier 120.0000

[2] Up-and-in call

LongYears

Continuous

Continuous

Continuously

Volatility ( σ ) 30.00%Adjusted Barrier 120.0000

[2] Up-and-in call

LongYears

Continuous

Continuous

Continuously

Adjusted Barrier 120.0000

[2] Up-and-in call

LongYears

Continuous

Continuous

Continuously

Adjusted Barrier 120.0000

[2] Up-and-in call

LongYears

Continuous

Continuous

Continuously

Adjusted Barrier 120.0000Forward price 103.0455

[2] Up-and-in call

LongYears

Continuous

Continuous

Continuously

Forward price 103.0455

[2] Up-and-in call

LongYears

Continuous

Continuous

Continuously

Forward price 103.0455

[2] Up-and-in call

LongYears

Continuous

Continuous

Continuously

Forward price 103.0455Value 9.0063

[2] Up-and-in call

LongYears

Continuous

Continuous

Continuously

Value 9.0063

[2] Up-and-in call

LongYears

Continuous

Continuous

Continuously

Value 9.0063

[2] Up-and-in call

LongYears

Continuous

Continuous

Continuously

Value 9.0063

[2] Up-and-in call

LongYears

Continuous

Continuous

Continuously

Value 9.0063

[2] Up-and-in call

LongYears

Continuous

Continuous

Continuously

By Espen Gaarder HaugBy Espen Gaarder HaugBy Espen Gaarder HaugBy Espen Gaarder Haug

FIG. 2: Haug, Up-and-In.

Page 7: Math 623 - Computational Finance Double barrier option pricing …pbmehta.weebly.com/uploads/1/1/7/9/11798112/double... · 2019-11-04 · Math 623 - Computational Finance Double barrier

7

Asset price S 100Exercise price K 110Interest rate r 0.05Volatility sigma 0.3Dividend yield q 0.02Time to maturity T 1Barrier Barrier 90

6.334982Down_And_Out_Call

FIG. 3: Black, Down-and-Out.

2.DoubleBarrier

Double Barrier Option (Ikeda Kuntimo) only holds when X is inside barrier range, for X outside barrier range look into Double Barrier Symmetry by Haug

[3] Call up-and-in-down-and-in

LongYears

Continuous

Continuous

Continuously

By Espen Gaarder Haug

Double Barrier Option (Ikeda Kuntimo) only holds when X is inside barrier range, for X outside barrier range look into Double Barrier Symmetry by Haug

[3] Call up-and-in-down-and-in

LongYears

Continuous

Continuous

Continuously

Double Barrier Option (Ikeda Kuntimo) only holds when X is inside barrier range, for X outside barrier range look into Double Barrier Symmetry by Haug

[3] Call up-and-in-down-and-in

LongYears

Continuous

Continuous

Continuously

Double Barrier Option (Ikeda Kuntimo) only holds when X is inside barrier range, for X outside barrier range look into Double Barrier Symmetry by Haug

[3] Call up-and-in-down-and-in

LongYears

Continuous

Continuous

Continuously

Double Barrier Option (Ikeda Kuntimo) only holds when X is inside barrier range, for X outside barrier range look into Double Barrier Symmetry by HaugImplementation By Espen Gaarder Haug, Copyright 2006

[3] Call up-and-in-down-and-in

LongYears

Continuous

Continuous

Continuously

Implementation By Espen Gaarder Haug, Copyright 2006

[3] Call up-and-in-down-and-in

LongYears

Continuous

Continuous

Continuously

Implementation By Espen Gaarder Haug, Copyright 2006

[3] Call up-and-in-down-and-in

LongYears

Continuous

Continuous

Continuously

Implementation By Espen Gaarder Haug, Copyright 2006

[3] Call up-and-in-down-and-in

LongYears

Continuous

Continuous

Continuously

[3] Call up-and-in-down-and-in

LongYears

Continuous

Continuous

Continuously

[3] Call up-and-in-down-and-in

LongYears

Continuous

Continuous

Continuously

[3] Call up-and-in-down-and-in

LongYears

Continuous

Continuous

Continuously

[3] Call up-and-in-down-and-in

LongYears

Continuous

Continuous

Continuously

[3] Call up-and-in-down-and-in

LongYears

Continuous

Continuous

Continuously

[3] Call up-and-in-down-and-in

LongYears

Continuous

Continuous

Continuously

[3] Call up-and-in-down-and-in

LongYears

Continuous

Continuous

Continuously

[3] Call up-and-in-down-and-in

LongYears

Continuous

Continuous

ContinuouslyTime in :

[3] Call up-and-in-down-and-in

LongYears

Continuous

Continuous

ContinuouslyTime in :

[3] Call up-and-in-down-and-in

LongYears

Continuous

Continuous

ContinuouslyTime in :

[3] Call up-and-in-down-and-in

LongYears

Continuous

Continuous

ContinuouslyTime in :

[3] Call up-and-in-down-and-in

LongYears

Continuous

Continuous

ContinuouslyTime in :Asset price ( S ) 100.00

[3] Call up-and-in-down-and-in

LongYears

Continuous

Continuous

Continuously

Asset price ( S ) 100.00

[3] Call up-and-in-down-and-in

LongYears

Continuous

Continuous

Continuously

Asset price ( S ) 100.00

[3] Call up-and-in-down-and-in

LongYears

Continuous

Continuous

Continuously

Asset price ( S ) 100.00Strike price ( X ) 110.00

[3] Call up-and-in-down-and-in

LongYears

Continuous

Continuous

Continuously

Strike price ( X ) 110.00

[3] Call up-and-in-down-and-in

LongYears

Continuous

Continuous

Continuously

Strike price ( X ) 110.00

[3] Call up-and-in-down-and-in

LongYears

Continuous

Continuous

Continuously

Strike price ( X ) 110.00Lower ( L ) 90.00

[3] Call up-and-in-down-and-in

LongYears

Continuous

Continuous

Continuously

Lower ( L ) 90.00

[3] Call up-and-in-down-and-in

LongYears

Continuous

Continuous

Continuously

Lower ( L ) 90.00

[3] Call up-and-in-down-and-in

LongYears

Continuous

Continuous

Continuously

Lower ( L ) 90.00ContinuousUpper ( U ) 120.00

[3] Call up-and-in-down-and-in

LongYears

Continuous

Continuous

Continuously

Upper ( U ) 120.00

[3] Call up-and-in-down-and-in

LongYears

Continuous

Continuous

Continuously

Upper ( U ) 120.00

[3] Call up-and-in-down-and-in

LongYears

Continuous

Continuous

Continuously

Upper ( U ) 120.00

Time to maturity ( T ) 1.00

[3] Call up-and-in-down-and-in

LongYears

Continuous

Continuous

Continuously

Time to maturity ( T ) 1.00

[3] Call up-and-in-down-and-in

LongYears

Continuous

Continuous

Continuously

Time to maturity ( T ) 1.00

[3] Call up-and-in-down-and-in

LongYears

Continuous

Continuous

Continuously

Time to maturity ( T ) 1.00Risk-free rate ( r ) 5.00%

[3] Call up-and-in-down-and-in

LongYears

Continuous

Continuous

Continuously

Time to maturity ( T ) 1.00Risk-free rate ( r ) 5.00%

[3] Call up-and-in-down-and-in

LongYears

Continuous

Continuous

Continuously

Risk-free rate ( r ) 5.00%Risk-free rate ( r ) 5.00%Risk-free rate ( r ) 5.00%Cost of carry ( b ) 3.00%Cost of carry ( b ) 3.00%Cost of carry ( b ) 3.00%Cost of carry ( b ) 3.00%Volatility ( σ ) 30.00%Volatility ( σ ) 30.00%Volatility ( σ ) 30.00%Volatility ( σ ) 30.00%

δUpper curvature ( δ ) 0.00Upper curvature ( δ1 ) 0.00Upper curvature ( δ1 ) 0.00Upper curvature ( δ1 ) 0.00δLower curvature ( δ ) 0.00Lower curvature ( δ2 ) 0.00Lower curvature ( δ2 ) 0.002

Adjusted lower barrier 90.00000Adjusted lower barrier 90.00000Adjusted lower barrier 90.00000Adjusted lower barrier 90.00000Adjusted upper barrier 120.00000Adjusted upper barrier 120.00000Adjusted upper barrier 120.00000Adjusted upper barrier 120.00000Forward price 103.04545Forward price 103.04545Forward price 103.04545Value 9.0535Value 9.0535Value 9.0535Value 9.0535

By Espen Gaarder HaugBy Espen Gaarder HaugBy Espen Gaarder Haug

FIG. 4: Haug Doublw Barrier, Up-and-In,Down-and-in

Page 8: Math 623 - Computational Finance Double barrier option pricing …pbmehta.weebly.com/uploads/1/1/7/9/11798112/double... · 2019-11-04 · Math 623 - Computational Finance Double barrier

8

FIG. 5: Numerix, Double Barrier

2.DoubleBarrier

Double Barrier Option (Ikeda Kuntimo) only holds when X is inside barrier range, for X outside barrier range look into Double Barrier Symmetry by Haug

[1] Call up-and-out-down-and-out

LongYears

Continuous

Continuous

Continuously

By Espen Gaarder Haug

Double Barrier Option (Ikeda Kuntimo) only holds when X is inside barrier range, for X outside barrier range look into Double Barrier Symmetry by Haug

[1] Call up-and-out-down-and-out

LongYears

Continuous

Continuous

Continuously

Double Barrier Option (Ikeda Kuntimo) only holds when X is inside barrier range, for X outside barrier range look into Double Barrier Symmetry by Haug

[1] Call up-and-out-down-and-out

LongYears

Continuous

Continuous

Continuously

Double Barrier Option (Ikeda Kuntimo) only holds when X is inside barrier range, for X outside barrier range look into Double Barrier Symmetry by Haug

[1] Call up-and-out-down-and-out

LongYears

Continuous

Continuous

Continuously

Double Barrier Option (Ikeda Kuntimo) only holds when X is inside barrier range, for X outside barrier range look into Double Barrier Symmetry by HaugImplementation By Espen Gaarder Haug, Copyright 2006

[1] Call up-and-out-down-and-out

LongYears

Continuous

Continuous

Continuously

Implementation By Espen Gaarder Haug, Copyright 2006

[1] Call up-and-out-down-and-out

LongYears

Continuous

Continuous

Continuously

Implementation By Espen Gaarder Haug, Copyright 2006

[1] Call up-and-out-down-and-out

LongYears

Continuous

Continuous

Continuously

Implementation By Espen Gaarder Haug, Copyright 2006

[1] Call up-and-out-down-and-out

LongYears

Continuous

Continuous

Continuously

[1] Call up-and-out-down-and-out

LongYears

Continuous

Continuous

Continuously

[1] Call up-and-out-down-and-out

LongYears

Continuous

Continuous

Continuously

[1] Call up-and-out-down-and-out

LongYears

Continuous

Continuous

Continuously

[1] Call up-and-out-down-and-out

LongYears

Continuous

Continuous

Continuously

[1] Call up-and-out-down-and-out

LongYears

Continuous

Continuous

Continuously

[1] Call up-and-out-down-and-out

LongYears

Continuous

Continuous

Continuously

[1] Call up-and-out-down-and-out

LongYears

Continuous

Continuous

Continuously

[1] Call up-and-out-down-and-out

LongYears

Continuous

Continuous

ContinuouslyTime in :

[1] Call up-and-out-down-and-out

LongYears

Continuous

Continuous

ContinuouslyTime in :

[1] Call up-and-out-down-and-out

LongYears

Continuous

Continuous

ContinuouslyTime in :

[1] Call up-and-out-down-and-out

LongYears

Continuous

Continuous

ContinuouslyTime in :

[1] Call up-and-out-down-and-out

LongYears

Continuous

Continuous

ContinuouslyTime in :Asset price ( S ) 100.00

[1] Call up-and-out-down-and-out

LongYears

Continuous

Continuous

Continuously

Asset price ( S ) 100.00

[1] Call up-and-out-down-and-out

LongYears

Continuous

Continuous

Continuously

Asset price ( S ) 100.00

[1] Call up-and-out-down-and-out

LongYears

Continuous

Continuous

Continuously

Asset price ( S ) 100.00Strike price ( X ) 110.00

[1] Call up-and-out-down-and-out

LongYears

Continuous

Continuous

Continuously

Strike price ( X ) 110.00

[1] Call up-and-out-down-and-out

LongYears

Continuous

Continuous

Continuously

Strike price ( X ) 110.00

[1] Call up-and-out-down-and-out

LongYears

Continuous

Continuous

Continuously

Strike price ( X ) 110.00Lower ( L ) 90.00

[1] Call up-and-out-down-and-out

LongYears

Continuous

Continuous

Continuously

Lower ( L ) 90.00

[1] Call up-and-out-down-and-out

LongYears

Continuous

Continuous

Continuously

Lower ( L ) 90.00

[1] Call up-and-out-down-and-out

LongYears

Continuous

Continuous

Continuously

Lower ( L ) 90.00ContinuousUpper ( U ) 120.00

[1] Call up-and-out-down-and-out

LongYears

Continuous

Continuous

Continuously

Upper ( U ) 120.00

[1] Call up-and-out-down-and-out

LongYears

Continuous

Continuous

Continuously

Upper ( U ) 120.00

[1] Call up-and-out-down-and-out

LongYears

Continuous

Continuous

Continuously

Upper ( U ) 120.00

Time to maturity ( T ) 1.00

[1] Call up-and-out-down-and-out

LongYears

Continuous

Continuous

Continuously

Time to maturity ( T ) 1.00

[1] Call up-and-out-down-and-out

LongYears

Continuous

Continuous

Continuously

Time to maturity ( T ) 1.00

[1] Call up-and-out-down-and-out

LongYears

Continuous

Continuous

Continuously

Time to maturity ( T ) 1.00Risk-free rate ( r ) 5.00%

[1] Call up-and-out-down-and-out

LongYears

Continuous

Continuous

Continuously

Time to maturity ( T ) 1.00Risk-free rate ( r ) 5.00%

[1] Call up-and-out-down-and-out

LongYears

Continuous

Continuous

Continuously

Risk-free rate ( r ) 5.00%Risk-free rate ( r ) 5.00%Risk-free rate ( r ) 5.00%Cost of carry ( b ) 3.00%Cost of carry ( b ) 3.00%Cost of carry ( b ) 3.00%Cost of carry ( b ) 3.00%Volatility ( σ ) 30.00%Volatility ( σ ) 30.00%Volatility ( σ ) 30.00%Volatility ( σ ) 30.00%

δUpper curvature ( δ ) 0.00Upper curvature ( δ1 ) 0.00Upper curvature ( δ1 ) 0.00Upper curvature ( δ1 ) 0.00δLower curvature ( δ ) 0.00Lower curvature ( δ2 ) 0.00Lower curvature ( δ2 ) 0.002

Adjusted lower barrier 90.00000Adjusted lower barrier 90.00000Adjusted lower barrier 90.00000Adjusted lower barrier 90.00000Adjusted upper barrier 120.00000Adjusted upper barrier 120.00000Adjusted upper barrier 120.00000Adjusted upper barrier 120.00000Forward price 103.04545Forward price 103.04545Forward price 103.04545Value 0.0035Value 0.0035Value 0.0035Value 0.0035

By Espen Gaarder HaugBy Espen Gaarder HaugBy Espen Gaarder Haug

FIG. 6: Haug Doublw Barrier, Up-and-out,Down-and-out

Page 9: Math 623 - Computational Finance Double barrier option pricing …pbmehta.weebly.com/uploads/1/1/7/9/11798112/double... · 2019-11-04 · Math 623 - Computational Finance Double barrier

9

[1] wwwthep.physik.uni-mainz.de/ ste-fanw/download/lecture

[2] M.S. Joshi, C++ design Patterns and Derivative Pricing,(Wiley 2008).

[3] S.E. Shreve, Stochastic Calculus for Finance II ContinuousTime Models, (Springer, 2004).

[4] Wikipedia page for low discrepancy sequence[5] I M Sobol, USSR comp. Math[6] www.cecs.csulb.edu/ ebert/teaching/lectures/552/[7] rss.acs.unt.edu/Rdoc/library/fExoticOptions[8] rss.acs.unt.edu/Rdoc/library/fExoticOptions/latex/BarrierOptions