U.U.D.M. Project Report 2009:5

Optimal Liquidation of a Mispriced Spread

Bing Lu

Examensarbete i matematik, 30 hp Handledare och examinator: Erik Ekström Mars 2009

Department of Mathematics Uppsala University

Optimal Liquidation of a Mispriced Option Spread

Bing Lu

Master’s Thesis at the Department of Mathematics Uppsala University Supervisor: Erik Ekstrom¨ Abstract

Assuming an overestimated implied , the optimal liquidation strategy of a digital option is investigated in this thesis, which extends the paper Optimal Liquidation of an Option Spread by utilizing more realistic models for the underlying asset. Five models for the price of the underlying asset are set up by GBM and the Bachelier model with added liquidation cost, interest rate and positive drift. Additionally, the optimal exercising strategy of a bull call spread with the Bachelier model for the underlying security is also studied. For the six different cases above, the values for the options are formulated as optimal stopping problems which are transformed into free boundary problems. For the free boundary problems with infinite time horizon, the values of the options are solved analytically and the optimal strike prices are chosen. We also analyze the dependence of the size of the continuation region on some paramters. For the free boundary problems with finite time horizon that can only be solved numerically, the free boundaries are drawn by finite different method and the free boundary equations are derived. Contents

1 Introduction 4 1.1 Overview ...... 4 1.2 Volatility ...... 6 1.3 ...... 7 1.4 Digital Option ...... 8

2 Review of Optimal Stopping and Free Boundary Problems 9 2.1 Optimal Stopping Problem for Continuous Time ...... 9 2.2 Transformation From Optimal Stopping Problem to Free Bound- ary Problem ...... 12

3 Adding Liquidation Cost 14 3.1 The Optimal Liquidation Problem ...... 14 3.2 The Optimal Choice of ...... 18 3.3 The Dependence of Size of Continuation Region on Parameters 19

4 Adding Interest Rate 22 4.1 The Optimal Liquidation Problem ...... 22 4.2 The Optimal Choice of Strike Price ...... 26

5 Adding Liquidation Cost and Interest Rate 27 5.1 The Optimal Liquidation Problem ...... 27 5.2 The Optimal Choice of Strike Price ...... 29 5.3 Comparison of the Free Boundaries ...... 30

6 Adding Drift 33 6.1 Finite Difference Method ...... 33 6.2 The Optimal Liquidation Problem ...... 35 6.3 Free Boundary Equation ...... 36

1 7 Geometric Brownian Motion 39 7.1 The Optimal Liquidation Problem ...... 39 7.2 Free Boundary Equation ...... 41

8 The Optimal Liquidation of A Bull Call Spread 44

9 Conclusion 47

Appendices 49

A Matlab Source Code 50

2 List of Figures

1.1 The payoff function of a digital option with overestimated volatility before maturity ...... 7 1.2 The payoff function of a digital option and a at maturity ...... 8

2.1 The superharmonic function V with the obstacle function G . 13

3.1 The dependence of B on β ...... 20 3.2 The dependence of B on ε ...... 21

5.1 The free boundaries in the four cases ...... 31

6.1 The free boundary with the Bachelier model with added drift 37

7.1 The free boundary with GBM for the underlying asset . . . . 41

8.1 The payoff function of a bull call spread ...... 45 8.2 The free boundary of a bull call spread with the Bachelier model for the underlying asset ...... 46

3 Chapter 1

Introduction

1.1 Overview

Regarded as the most crucial element in option pricing, volatility is well- known to be difficult to estimate accurately. In the real world, by the reason of incomplete information and imperfect market, the of an asset can rarely coincide with its true volatility. It is usually assumed that an implied volatility is overestimated. One important way to make profit by taking advantage of a misvalued future volatility is to invest in a vertical spread, which is trading strategy involving a simultaneous purchase and sale of same type of two options with the same maturity but different strike prices. A vertical spread can be constructed by both put and due to the put-call parity. This thesis is based on the paper [2] studying the optimal liquidation strategy of a digital option with the Bachelier model for the underlying asset. It is also an extension of paper [2]. Define a digital option with strike price K paying g(XT ) at terminal time T , where ½ 1 if x ≥ K g(x) = 0 if x < K The digital option closely resembles the bull call spread, which is long in n numbers of call options with strike K and short in n numbers of call with strike K + 1/n as n is large. Therefore, for simplicity, the digital option which can approximately hedge all kinds of vertical spreads is utilized as the contract function. When the underlying price stays above the strike K, with the assump- tion of an overestimated implied volatility, the market price of the digital option is too low (refer to Figure 1.1). Thus the investor would like to hold the option until the terminal time T . What if the underlying price

4 drop off dramatically below strike K? The confidence of the holders for the price soaring back to K will disappear. Therefore, we predict there is an enduring limit under which the investors would give up keeping the posi- tion and liquidate it before maturity. Also, the enduring limit, denoted as free boundary, optimal stopping boundary or optimal exercising boundary is time dependent. One of the critical missions of this thesis is to study the free boundary of the option. As we have already set up a digital option as the contract function, the other essential element is the model of the price of the underlying asset. In paper [2], the Bachelier model is used as the price of the underlying security and the interest rate is assumed to be zero. As an extension of [2], this thesis will utilize more complex models for the underlying security and add liquidation cost for the earlier exercising. There are five cases we are interested in. 1. The Bachelier model with liquidation cost. 2. The Bachelier model with interest rate. 3. The Bachelier model with liquidation cost and interest rate. 4. The Bachelier model with added positive drift. 5. Geometric Brownian Motion. Except the five models above, we will take a look at the case that a bull call spread is provided as contract and the Bachelier model as price of the underlying asset. The first three cases can be studied analytically and solved explicitly, and the last three are mainly studied numerically. The procedures of dealing with the first three models are quite similar. First, formulating the value of the option as an optimal stopping problem in finite time horizon; Second, converting the optimal stopping problem in finite time horizon into an op- timal stopping problem in infinite time horizon by time and space change. Third, transforming the optimal stopping problem in infinite horizon into a free boundary problem with infinite horizon and solving it explicitly. Since the transformation from optimal stopping problem to free boundary prob- lem plays an extremely important role in the study, the theories in that field are reviewed in the next chapter. Additionally, the relations between the size of the continuation region and some parameters are investigated. To maximize the expected profit, the optimal strike price is chosen. We also compare and analyze the free boundaries in the different cases. For the last three models, the values of the options are formulated as the optimal stopping problems in finite time horizon, then the optimal stop- ping problems are reduced into the free boundary problems with finite time horizon. It seems impossible to solve them analytically, so we study them numerically using the finite difference method. The free boundaries are illus-

5 trated in Figure 5.1 with comparison to the free boundary in paper [2]. The free boundary equations are derived for the cases of GBM and the Bachelier model with added drift. First, let’s start with volatility.

1.2 Volatility

In finance, volatility is generally defined as the standard deviation of the continuously compounded returns of a financial security or market index. A bigger volatility indicates the price of the instrument can increase or decrease dramatically in a short period. On the other hand, a smaller volatility implies the security’s price can not change dramatically but varies smoothly during a period of time. Volatility does not imply directions. Historical volatility is calculated using the historical returns. Implied volatility is the volatility set by the market price of the based on an option pricing model. Generally, options with the same underlying asset but different maturity and strike prices will yield different implied volatility. Given the known parameters such as stock price, current time, time, interest rate and strike price, implied volatility can be derived from a model such as the Black-Scholes model. People usually believe that the bullish market is less risky than the bearish market. Hence, the implied volatility is relatively smaller in the bullish market and relatively larger in the bearish market. Due to incomplete information and imperfect market, the implied volatil- ity can hardly agree exactly with the future realized volatility. The difference between the two can be taken advantage to make profit by investing in some financial derivatives. There are some options and variance swaps regarding volatility as the trading asset. For instance, the VSTOXX index is created to reflect the market expectation of the volatility in the near future based on the real time price of EURO STOXX 50. From previous studies [8], it is known that the implied volatilities usually overestimate the realized future volatilities. With an overestimated implied volatility, the market price of a call or is higher than the real value of the option. For a digital option, the market price is not always larger than its real value when the implied volatility is overestimated, as we can see in Figure 1.1. When the stock price is larger than the strike price K, the real value of the digital option is larger than the option’s market price, traders would like to buy the option. On the other hand, when the underlying price is smaller than K, the real value is smaller than the market price, traders thus intend

6 Figure 1.1: The payoff function of a digital option with overestimated volatil- ity before maturity to sell the digital option.

1.3 Vertical Spread

Vertical spread is a trading strategy involving buying and selling multiple options of the same type on the same underlying asset with the same expi- ration date but with different strike prices. It is designed to make limited profit of the moderate change of the underlying prices. It has maximum gain and minimum loss with limited risk. There are two types of vertical spread: bull vertical spread and bear vertical spread. Each of them can be constructed by both call and put options due to the put-call parity. The in- vestors of the bull spread hope the price of the underlying security to go up, whereas the investors of the expect the price of the underlying to go down. Consider the case of a call spread. Regardless of the premium, a bull call spread is built up by a long position in a call with lower strike price and a short position in another call with a higher strike price with the same underlying and maturity. The contract function is as follows

+ + gbull(ST ) = (ST − K) − (ST − K˜ )

A bear call, which is the opposite of the bullish one, is entered by purchasing a call with higher strike and selling a call with lower strike. Here the contract

7 is given by + + gbear(ST ) = (ST − K˜ ) − (ST − K) where K˜ > K. The sum of the same number of bull call and bear call with the same underlying, strike price and expiration date is zero without considering premium. Other options with limited risk and limited profit, such as butterfly spread and can also be constructed by a bull and a bear spreads.

1.4 Digital Option

Digital option, which is also called , all-or-nothing option and fixed return option, is a kind of option with either fixed payoff or nothing at all. There are mainly two kinds: cash-or-nothing option, which pays a fixed amount of cash if the option expires in-the-money; asset-or-nothing option, which pays the value of the underlying asset if in-the-money. The payoff of the digital option resembles closely to that of a bull call spread with strikes in a very close range (see Figure 1.2).

1.2

1

0.8

0.6 Profit 0.4

0.2

0

−0.2 0 0.5 1 1.5 2 2.5 3 3.5 4 Expiration Price

Figure 1.2: The payoff function of a digital option and a bull spread at maturity

As we mentioned previously the digital option is almost the same as a bull call spread long in n numbers of call with strike K and short in n 1 numbers of call with strike K + n given n large. Thus, for simplicity we are going to use digital option as contract function.

8 Chapter 2

Review of Optimal Stopping and Free Boundary Problems

2.1 Optimal Stopping Problem for Continuous Time

This subsection is going to exhibit some basic theories of the optimal stop- ping in continuous time, which are introduced in [7]. There are two ap- proaches to study the problem, martingale approach and Markovian ap- proach. Let’s start with the martingale approach.

Martingale Approach

Let G = (Gt)t≥0 be a sequence of observable stochastic process defined on a filtered probability space (Ω, F,(Ft)t≥0, P). If the process is stopped at time t, Gt is the gain we will receive. Explained as the information available to time t, Ft is a σ-algebra of subsets of Ω. Gt is Ft-measurable. To decide the optimal stopping time t, the only information used is Ft, which is the past and the present information.

Definition 1. A stopping time is a random variable τ :Ω → [0, ∞] if {τ ≤ t} ∈ Ft for all t ≥ 0 and τ < ∞ P-a.s. We will only consider stopping time from now on. With the assumption that G is both right-continuous and left-continuous over the stopping time, it has to satisfy the following condition

E( sup |Gt|) < ∞ 0≤t≤T with G∞ = 0. Ft is assumed to be right-continuous and contain all P-null sets from F.

9 The optimal stopping problem is given by

T Vt = sup EGτ t≤τ≤T where the supremum is taken at the stopping time τ and 0 ≤ t ≤ T . T is allowed to be ∞. There is no crucial difference between finite and infinite T horizon T , thus we can simply set Vt = Vt . Define a new process S referring to the Snell envelope of G.

S = (St)t≥0 = esssupτ≥tE(Gτ |Ft) where τ is a stopping time. Consider the stopping time:

τt = inf{s ≥ t : Ss = Gs} for t ≥ 0 where inf ∅ = ∞.

Theorem 1. With the assumptions

E ( sup |Gt|) < ∞ and P (τt < ∞) = 1 0≤t≤T

T consider the optimal stopping problem Vt = supt≤τ≤T EGτ . We have

St ≥ E(Gτ |Ft) for each τ in Nt

St = E(Gτt |Ft)

where Nt is the family of all stopping times. Suppose t is given and fixed, then τt is the optimal stopping time and (Ss)s≥t dominating (Gs)s≥t is the smallest right-continuous supermartingale. There will be no optimal stopping time if P(τt = ∞) > 0.

Markovian Approach

Let X = (Xt)t≥0 be a strong Markov process defined on a probability space (Ω, F,(Ft)t≥0, Px) with values in a measurable space (E,B) where E = Rd, d ≥ 1 and B = B(Rd) is the Borel σ-algeba on Rd. The process X, which starts at x for x ∈ E, is both right and left continuous over stopping times. (Ft)t≥0 is right-continuous. Define a function G : E → R satisfying the condition Ex( sup |G(Xt)|) < ∞ 0≤t≤T

10 for all x ∈ E. The optimal stopping time is given by

V (x) = sup ExG(Xτ ) 0≤τ≤T where τ is the stopping time with respect to (Ft)t≥0 and V is the value function. T can also be ∞, thus the cases of finite horizon and infinite horizon will be studied at the same time. There are two missions when solving the optimal stopping problem: finding out the optimal stopping time and trying to rewrite V (x) in a form as explicit as possible. At any stopping time t, the process X can either continue or stop. Thus, the space E can be divided into two areas, continuation region C and stopping region D = E\C. When Xt(ω) enters the D region, the process should stop and we instantly get an optimal stopping time. One of our key task is to find out the C and D sets. Consider the optimal stopping time with T = ∞, V (x) = sup ExG(Xτ ), where τ is a stopping time. The continuation and τ stopping regions are given by

C = {x ∈ E : V (x) > G(x)} D = {x ∈ E : V (x) = G(x)} respectively. C is an open set and D is closed assuming that V is lower semicontinuous and G is upper semicontinuous. The first entering time τD of the process X into D is

τD = inf{t ≥ 0 : Xt ∈ D}

Definition 2. A measurable function F : E → R is superharmonic if

ExF (Xσ) ≤ F (x) where σ is a stopping time and x ∈ E.

Theorem 2. (The Existence of an Optimal Stopping Time) Given the optimal stopping problem

V (x) = sup ExG(Xτ ) with the condition Ex( sup |G(Xt)|) < ∞ 0≤τ≤T 0≤t≤T where V and G are lower semicontinuous and upper semicontinuous, respec- tively. Let Vˆ be the smallest superharmonic function dominating G on E. When the horizon is finite, i.e. T < ∞, Vˆ = V and the first entering time

11 τD is the optimal stopping time. In the case of infinite horizon, i.e. T = ∞. If Px(τD < ∞) = 1 for all x ∈ E, then Vˆ = V and the entering time τD is the optimal stopping time. If Px(τD < ∞) < 1 for all x ∈ E, then there is no optimal stopping time(with probability 1).

According to the theorem, to find the smallest superharmonic function Vˆ is equivalent to solving the optimal stopping problem. Generally, there are two ways of finding Vˆ : first, iterative procedure, which is constructive but not explicit; second, free boundary problem which could be either explicit or non-explicit. We are going to study it using the free boundary approach.

2.2 Transformation From Optimal Stopping Prob- lem to Free Boundary Problem

Some differential equations are defined in a domain with a previously un- known boundary, which is thus called free boundary. Moreover, some quan- titative conditions are provided to exclude the indeterminacy of the solution. Free boundary problem can be roughly interpreted as above. There are a lot of interesting mathematical issues about the FBP, such as existence and uniqueness of solutions, numerical approximation procedures, properties and so on. Free boundary problem is utilized in the field of physics, engineering, material science, biology and many other scientific areas. In this thesis, we only consider the application of free boundary problem in finance. We adopt all the setting and notations from last subsection. Recall that to solve the optimal stopping time is equivalent to find out Vˆ : E → R, which is the smallest superharmonic function dominating G on E. The optimal stopping time is the first entering time τD of X into the stopping region D = {Vˆ = G}. In the case of infinite horizon Vˆ and C should satisfy the free boundary problem

LX Vˆ ≤ 0 (Vˆ minimal), Vˆ ≥ G (Vˆ > G on C & Vˆ = G on D) where LX is the infinitesimal operator of X. Make V = Vˆ by using some sufficient conditions, it follows that

V (x) = Ex G(XτD )

12 Thus V solves the following Dirichlet problem.

LX V = 0 in C

V |D = G|D

The optimal boundary ∂C has to meet some special properties. It is assumed that function G is smooth. If X starting at ∂C which is sufficiently regular comes into region D instantly, we have the smooth fit condition for one dimension ¯ ¯ ∂V ¯ ∂G¯ ¯ = ¯ (smooth fit) ∂x ∂C ∂x ∂C We do not consider some special cases where smooth fit is replaced by con- tinuous fit. In one dimension, the ODE LX V = 0 usually can be solved explicitly to obtain a candidate function. Hence, problems for infinite hori- zon are easier than the finite horizon case, which usually can not be solved explicitly due to the PDE containing an additional time derivative term. Thus, the finite horizon problem mostly can not yield a candidate function. When X is a one dimensional diffusion and ∂C is regular enough, we have

Vt + LX V = 0 in C,

V |D = G|D ¯ ¯ ∂V ¯ ∂G¯ ¯ = ¯ (smooth fit) ∂x ∂C ∂x ∂C As we know value function V is the smallest superharmonic function dom- inating G on E, V is smallest concave function bigger than G. Let us interpret it geometrically. Let G be a obstacle on the ground, V is the shape of a rubber band put above G with both ends pulled to the ground. We can see the features of V from Figure 2.1.

Figure 2.1: The superharmonic function V with the obstacle function G

13 Chapter 3

Adding Liquidation Cost

As the basic literature of this thesis, paper [2] utilizes the Bachelier model for the underlying asset with overestimated volatility and the interest rate is assumed to be zero for simplicity. In this section, liquidation cost for early exercising before maturity is added to the case above.

3.1 The Optimal Liquidation Problem

We will use the Bachelier model for the price of the underlying asset, and the interest rate is assumed to be zero for simplicity. Hence the price of the underlying asset assumed by the market is

dX˜t =σd ˜ W˜ t whereσ ˜ > 0 is a constant volatility and W˜ t indicates a standard Brownian motion. The payoff function is a digital option with strike price K. At time T , the option pays g(X˜T ), where ½ 1 if x ≥ K g(x) = 0 if x < K If the holder of the option intends to it before maturity, a portion of the market price of the option has to be paid as liquidation cost. We assume that the liquidation cost is 100 × ε (0 ≤ ε ≤ 1) percent of the current market price. Given the underlying asset worth x at time t < T , the market value of the option is

Π(t, x) = (1 − ε)P (X˜T ≥ K) = (1 − ε)P (x +σ ˜W˜ T −t ≥ K) x − K = (1 − ε)Φ( √ ) σ˜ T − t

14 where Z x 2 1 − x Φ(x) = ϕ(z) dz and ϕ(x) = √ e 2 −∞ 2π indicate the cumulative distribution function and the density function of the standard normal distribution, respectively. We reckon that the volatility of the underlying is overestimated asσ ˜, the actual volatility is σ and the real physical price of the underlying asset is thus given by

dXt = σdWt where Wt denotes a standard Brownian motion and σ < σ˜. If the holder intends to liquidate the option at time t before maturity, s/he will receive Π(t, Xt) instantly. On the other hand, if the holder decides to keep the option until the expiration date T , s/he will obtain g(XT ) then. Therefore, the optimal stopping problem is built up as follows £ ¤ V (t, x) = sup Et,x (1 − ε)Π(τ, Xτ )1{τ

15 where τ can be any random stopping time with respect to the filtration generated by Z and Φ(Z∞) = limt→∞ Φ(Zt). 1 2 0 Itˆo’s formula gives dΦ(Zs) = 2 (1 − β )Zsϕ(Zs)ds + βϕ(Zs)dWs. The 1 2 drifts of dΦ(Zs) and dZs share the same sign, because 2 (1 − β )ϕ(Zs) > 0. If Zs is positive, dΦ(Zs) is also positive and F (z) is inclined to increase in time. Thus one does not tend to stop the process and the optimal stopping time will not be finite. When Zs < 0, the drift of dΦ(Zs) is negative hence F (z) tends decrease in time. There is a negative limit for Zs under which we believe that the price of underlying will not return above K again. Thus, the option should be exercised immediately when Zs reaches the negative boundary. The optimal stopping time in the perpetual problem should be of the form τB = inf{t ≥ 0 : Zt ≤ B} for some constant boundary B < 0. The theory of transformation from optimal stopping problem to free boundary problem suggests that the function F satisfies the following con- ditions. In the continuation region, i.e. z > B, F solves the ordinary differential equation β2F 00(z) + zF 0(z) = 0 In the stopping region, F coincides with the payoff function

F (z) = (1 − ε)Φ(z)

At the boundary z = B, F has to satisfy the smooth fit

F 0(z) = (1 − ε)ϕ(z)

To sum up, the free boundary problem is as follows   β2F 00(z) + zF 0(z) = 0 if z > B  F (z) = (1 − ε)Φ(z) if z = B  F 0(z) = (1 − ε)ϕ(z) if z = B  limz→∞ F (z) = 1

The general solution of β2F 00(z) + zF 0(z) = 0 is z F (z) = CΦ( ) + D β where C and D are constants. Since the solution satisfies limx→∞ F (x) = 1, it follows that C + D = 1.

16 Let Ψ(z) = 1 − Φ(z). Then the solution to the free boundary problem is

Ψ(B) + εΦ(B) z F (z) = 1 − Ψ( ), z > B B β Ψ( β ) and the following equation offering a unique solution for B must hold. (1 − ε)ϕ(B) 1 ϕ(B/β) = (3.3) Ψ(B) + εΦ(B) β Ψ(B/β)

Theorem 3. The value function of the digital option defined in (3.1) is given by  Ψ(B)+εΦ(B) √  1 − Ψ( x√−K ) if x > Bσ˜ T − t + K Ψ( B ) σ T −t V (t, x) = β √  (1 − ε)Φ( x√−K ) if x ≤ Bσ˜ T − t + K σ˜ T −t where B is the unique solution to equation (3.3). The optimal stopping time is √ τ∗ = inf{t ≤ u ≤ T : Xu ≤ Bσ˜ T − u + K} Proof. The candidate solution is ( 1 − Ψ(B)+εΦ(B) Ψ(z) if z > B Ψ( B ) G(z) = β (1 − ε)Φ(z) if z ≤ B where G ∈ C1(R) ∩ C2(R\{B}). We need to verify that G(z) = F (z) and optimal stopping time τB solves the optimal stopping problem (3.2). Itˆo’s formula implies

Z t 0 0 G(Zt) = G(z) + β G (Zu) dWu (3.4) 0 Z t 1 ¡ 2 00 0 ¢ + β G (Zu) + ZuG (Zu) I(Zu 6= B) du 2 0

2 00 0 It is known that β G (Zu) + ZuG (Zu) ≤ 0 everywhere except for B and G(z) ≥ (1 − ε)Φ(z). It follows that

(1 − ε)Φ(Zt) ≤ G(Zt) ≤ G(z) + Mt

Moreover

(1 − ε)Φ(Zt)I(t < ∞) + I(Z∞ ≥ 0)I(t = ∞) ≤ G(Zt) ≤ G(z) + Mt

17 where Mt is a continuous local martingale given by

Z t 0 0 Mt = β G (Zu) dWu 0 For all n ≥ 0 and any stopping time τ of X we have

(1 − ε)Φ(Zτ∧n)I(τ ∧ n < ∞) + I(Z∞ ≥ 0)I(τ ∧ n = ∞) ≤ G(z) + Mτ∧n

Applying the optional sampling theorem yields EzMτ∧n = 0. Letting n → ∞, by using Fatou’s lemma we find

Ez [(1 − ε)Φ(Zτ )I(τ < ∞) + I(Z∞ ≥ 0)I(τ = ∞)] ≤ G(z)

Hence, taking the supremum over all stopping time, we get

F (z) ≤ G(z) for all z. The next step is to prove the reverse inequality. Given (3.4) and using

β2F 00(z) + zF 0(z) = 0 , z > B for all n > 1 we have

Ez [G(ZτB ∧n )] = G(z)

Letting n → ∞ and using the fact that (1 − ε)Φ(ZτB )I(τB < ∞) + I(τB =

∞)I(Z∞ ≥ 0) = G(ZτB ), the bounded convergence theorem yields

Ez [(1 − ε)Φ(ZτB )I(τB < ∞) + I(τB = ∞)I(Z∞ ≥ 0)] = G(z)

This implies that τB is the optimal stopping time and F (z) = G(z) for all z.

3.2 The Optimal Choice of Strike Price

Since there is liquidation cost for selling an option before maturity, there should be purchasing cost for buying the option too. For buying an option before maturity, except for the original market price, the traders have to pay α × 100 percent of the market price extra. Hence the market price of purchasing the digital option is (1 + α)Φ( x√−K ). The real value of σ˜ T −t the option is V (t, x) = V (t, x; K) by the investors. We assume that the parameters x, T, σ, σ,˜ α and ε are all fixed.

18 Let D(K) be the difference between the value of the option(estimated by investors) and the price of the option (decided by the market). The optimal strike price K should maximize this difference which is the expected profit. x − K D(K) = V (t, x; K) − (1 + α)Φ( √ ) σ˜ T − t Theorem 4. The function D(K) obtains its maximum value at the optimal strike K∗, which satisfies the equation ϕ(B) x − K∗ x − K∗ (1 − ε) ϕ( √ ) = (1 + α)ϕ( √ ) ϕ(B/β) σ T − t σ˜ T − t √ and the inequality K∗ < x − Bσ˜ T − t. Proof. Differentiate D(K) with respect to K. √ √ Ψ(B) + εΦ(B) x − K 1 σ˜ T − tD0(K) = −σ˜ T − t ϕ( √ ) √ Ψ(B/β) σ T − t σ T − t √ x − K 1 +˜σ T − t(1 + α)ϕ( √ ) √ σ˜ T − t σ˜ T − t Ψ(B) + εΦ(B) x − K x − K = − ϕ( √ ) + (1 + α)ϕ( √ ) Ψ(B/β)β σ T − t σ˜ T − t ϕ(B) x − K x − K = −(1 − ε) ϕ( √ ) + (1 + α)ϕ( √ ) ϕ(B/β) σ T − t σ˜ T − t where in the third equality we used equation (3.3). Letting D0(K) = 0 implies ϕ(B) x − K x − K (1 − ε) ϕ( √ ) = (1 + α)ϕ( √ ) ϕ(B/β) σ T − t σ˜ T − t √ The K satisfying the above equation and x > Bσ˜ T − t + K is the optimal strike price giving D(K) the global maximum.

3.3 The Dependence of Size of Continuation Re- gion on Parameters

The Dependence of B on β Given ε fixed, the dependence of the optimal threshold B on β = σ/σ˜ is decided by the equation (1 − ε)ϕ(B) ϕ(B/β) = Ψ(B) + εΦ(B) βΨ(B/β)

19 Figure 3.1: The dependence of B on β

We investigate the relations between the two parameters numerically. For fixed β fixed, the B in the case of adding liquidation cost is lower than the B in the case of no liquidation cost, and the B with smaller ε is larger than the B with bigger ε. This shows that after charging liquidation cost the investors have less tendency to exercise the option. Liquidation cost is the fee paid for exchanging the real volatility σ for the overestimated implied volatilityσ ˜. The smaller the difference between the two volatilities, the less the investors intend to pay for it, thus B deceases in β. When β converges to 1, the threshold B goes to −∞. This implies that when the implied volatility is extremely close to the true volatility, traders would not like to pay for the tiny volatility change hence do not intend to liquidate the option at all. When ε = 0, the underlying model is the Bachelier model without liquidation cost. In this case, the B dependence on β is discussed in paper [2].

The Dependence of B on ε Given β fixed, the dependence of B on ε is also decided by equation

(1 − ε)ϕ(B) ϕ(B/β) = Ψ(B) + εΦ(B) βΨ(B/β)

As we can see in Figure 3.3, the features of curves B(ε) with different β are different. The convexity and concavity of the curve changes with differ- ent β.

20 Figure 3.2: The dependence of B on ε

The liquidation cost ε is charged for the change from the real volatility σ to implied volatilityσ ˜. Thus, the larger the ε, the more the sellers have to pay for the cost , the less they intend to exercice the option. Therefore, the threshold B decreases in ε. When ε converges to 1, the sellers will rarely obtain anything after liquidat- ing the option due to nearly 100% cost, hence the traders will not choose to exercise it no matter how low the price can sink. That explains why B goes to −∞ as ε converges to 100%.

21 Chapter 4

Adding Interest Rate

As the fundamental literature of this thesis, paper [2] uses the Bachelier model for the underlying security with overestimated volatility and the in- terest rate is regarded as zero. In this section, non-zero interest rate is added to the model above.

4.1 The Optimal Liquidation Problem

In this section, the model of the underlying security is the Bachelier model with non-zero interest rate. Hence the price of the underlying asset assumed by the market is dX˜t = rX˜tdt +σd ˜ W˜ t whereσ ˜ is a constant volatility and W˜ t indicates a standard Brownian mo- tion. It is also given that dBt = rBtdt where Bt is the amount of money in a bank account at time t. The digital option paying g(X˜T ) at time T is ½ 1 if x ≥ K g(x) = 0 if x < K Hence the market price of the option with the underlying asset worth x at time t < T is −r(T −t) Π(t, x) = e P (X˜T ≥ K) −rt ˜ −rt Let Yt = e Xt, byR Itˆo’s formula dYt = e σdW˜ t. −rt T −rs Thus YT = e x + t e σ˜ dWs and Z T rT r(T −t) r(T −s) X˜T = e YT = e x + e σ˜ dWs t

22 The price of the option is given by Z T −r(T −t) r(T −s) r(T −t) Π(t, x) = e P ( e σ˜ dWs ≥ K − xe ) t R T r(T −s) t e σ˜ dWs As we know that qR is a standard normal distributed random T 2r(T −s) 2 t e σ˜ ds variable, the market price becomes

r(T −t) r(T −t) −r(T −t) e x − K −r(T −t) e x − K Π(t, x) = e Φ(qR ) = e Φ( q ) T 2r(T −s) 2 e2r(T −t)−1 t e σ˜ ds σ˜ 2r where function Φ(x) denotes the same as in the previous chapter. With the assumption of overestimated volatility, the true price of the underlying asset is given by

dXt = αXdt + σdWt where α is a positive drift and σ is a constant satisfying 0 < σ < σ˜. If the option is exercised at time t before maturity, we will receive Π(t, x). If we keep the option until the expiration time, we can obtain g(XT ) at T . Hence, the optimal stopping problem is given by h i −r(τ−t) −r(T −t) V (t, x) = sup Et,x e Π(τ, Xτ )1{τ

r(T −u) e xu − K Yu = q e2r(T −u)−1 σ˜ 2r for u ∈ [t, T ). Applying Itˆo’s formula gives

r(T −u) r(T −u) r(T −u) e re Xu e Xu − K 2r(T −u) dYu = q dXu − q dt + 2r(T −u) e dt e2r(T −u)−1 e2r(T −u)−1 2˜σ( e −1 )3/2 σ˜ 2r σ˜ 2r 2r r(T −u) 2r(T −u) r(T −u) e Xu Yu e σ e = (α − r) q dt + 2r(T −u) dt + q dWu e2r(T −u)−1 2 e −1 σ˜ e2r(T −u)−1 σ˜ 2r 2r 2r

23 If α = r, then this simplifies to

2r(T −u) r(T −u) Yu e e dYu = 2r(T −u) dt + β q dWu (4.2) 2 e −1 e2r(T −u)−1 2r 2r where β = σ/σ˜ < 1. If α 6= r, then it seems that the time change method 2r(T −u) does not apply. Let N = e , so equation (4.2) can be simply written e2r(T −u)−1 √ 2r Yu as dYu = 2 Ndt + β NdWu. The deterministic time-change is made by letting u = ρ(s) and Z(s) = Y (ρ(s)), which gives r Z(s) dρ(s) dρ(s)√ dZ(s) = N ds + β NdW 0 2 s ds s

0 dρ(s) where Ws is a standard Brownian motion. Now make N s be a constant such as 2r dρ(s) 2re2r(T −ρ) dρ(s) N = = 2r s e2r(T −ρ) − 1 ds Thus we have ds 1 = (4.3) dρ(s) 1 − e2r(ρ−T ) The solution of (4.3) is

ln (1 − e2r(ρ−T )) + ln (1 − e−2rT ) s = ρ − t − (4.4) 2r where ρ(s) ∈ [t, T ) and s ∈ [0, ∞). The equation (4.4) fixing the relations between s and ρ(s) is the core of the time change. Given this equation, the time change results in √ 0 dZ(s) = rZsds + 2rβdWs The original optimal stopping problem (4.1) is altered into

er(T −t) − K V (t, x) = e−r(T −t)F ( q ) e2r(T −t)−1 σ˜ 2r where F is given by

F (z) = sup Ez [Φ(Zτ )] 0≤τ≤∞

24 Thus the finite horizon optimal stopping problem has been converted into the infinite horizon problem. Applying Itˆo’s formula yields

0 1 00 2 dΦ(Zs) = Φ (Zs)dZs + Φ (Zs)(dZs) 2 √ 2 = ϕ(Zs)rZs(1 − β )ds + ϕ(Zs) 2rβdWs

The drift of dΦ(Zs) has the same sign as Zs due to β < 1. Hence the optimal stopping time is of the form

τB = inf{t ≥ 0 : Zt ≤ B} where B is a constant threshold and satisfies the free boundary problem.   rβ2F 00(z) + rzF 0(z) = 0 if z > B  F (z) = Φ(z) if z = B  F 0(z) = ϕ(z) if z = B  limx→∞ F (x) = 1 Solving it gives Ψ(B) z F (z) = 1 − Ψ( ), z > B B β Ψ( β ) and the threshold B satisfies B ϕ( ) ϕ(B) β = (4.5) B Ψ(B) βΨ( β ) where Ψ and ϕ indicate the same functions as they are in the previous chapter. The dependence of B on β is the same as that in the case of Bachelier model as underlying which is analyzed in paper [2]. Theorem 5. The value function defined in the optimal stopping problem (4.1) is given by  " à !#  Ψ(B) r(T −t)  e−r(T −t) 1 − Ψ eq x−K if x > b(t)  Ψ( B ) 2r(T −t) β σ e −1 V (t, x) = à ! 2r  r(T −t)  e−r(T −t)Φ eq x−K if x ≤ b(t)  e2r(T −t)−1 σ˜ 2r where r 1 − e−2r(T −t) b(t) = Bσ˜ + e−r(T −t)K 2r

25 The optimal stopping time is r 1 − e−2r(T −t) τ = inf{t ≤ u ≤ T : X ≤ Bσ˜ + e−r(T −t)K} ∗ u 2r and B is the unique solution to equation (4.5). The verification of the above theorem is similar to that in the case of liquidation cost, hence we are not going to repeat it.

4.2 The Optimal Choice of Strike Price

Define D(K) to be the difference between the value of the option (estimated by the investors) and the market price of the option. We should choose the best strike price K which maximizes the difference. V (t, x; K) = V (t, x) is the real value of the option. Assume that the parameters x, T, σ, σ,˜ and r are all fixed. D(K) is given by er(T −t)x − K D(K) = V (t, x; K) − e−r(T −t)Φ( q ) e2r(T −t)−1 σ˜ 2r q r(T −t) e2r(T −t)−1 Theorem 6. When K = e x + Bσ˜ 2r , the function D(K) takes its maximum value. Proof. Differentiating D(K) w.r.t K yields r e2r(T −t) − 1 er(T −t)x − K σ˜Ψ(B) er(T −t)x − K er(T −t)σ˜ D0(K) = ϕ( q ) − ϕ( q ) 2r e2r(T −t)−1 σΨ(B/β) e2r(T −t)−1 σ˜ 2r σ 2r er(T −t)x − K ϕ(B) er(T −t)x − K = ϕ( q ) − ϕ( q ) 2r(T −t) ϕ(B/β) 2r(T −t) σ˜ e −1 σ e −1 2r  2r  r(T −t) r(T −t) e x − K e x − K 1− 1 1− 1 1 (1− 1 ) = ϕ( q ) ϕ( q ) β2 − ϕ(B) β2  (2π) 2 β2 e2r(T −t)−1 e2r(T −t)−1 σ 2r σ˜ 2r 0 where in the second equality we uses equationq (4.5). When D (K) = 0, it must be either K = er(T −t)x + Bσ˜ e2r(T −t)−1 or K = er(T −t)x − q 2r Bσ˜ e2r(T −t)−1 . Thus, it is straightforward to check that the global maxi- 2r q r(T −t) e2r(T −t)−1 mum of D(K) occurs when K = e x + Bσ˜ 2r .

26 Chapter 5

Adding Liquidation Cost and Interest Rate

In this section, both liquidation cost and interest rate are added to the Bachelier model utilized in paper [2].

5.1 The Optimal Liquidation Problem

The price of the underlying security is the Bachelier model with non-zero interest rate. The price of the underlying asset assumed by the market is given by dX˜t = rX˜tdt +σdW ˜ t and for a bank account it is given that

dBt = rBtdt

If the investors choose to liquidate the option before maturity, the liquidation cost is charged by taking away 100 × ε percent of the original market price. The market price so becomes h i Π(t, x) = (1 − ε)E e−r(T −t)1 {X˜T ≥K} −r(T −t) = (1 − ε)e P (X˜T ≥ K) more explicitly,

r(T −t) r(T −t) −r(T −t) e x − K −r(T −t) e x − K Π(t, x) = (1−ε) Φ(qR ) = (1−ε)e Φ( q ) T 2r(T −s) 2 e2r(T −t)−1 t e σ˜ ds σ˜ 2r The price of the underlying asset with the real volatility considered by the investors is dXt = rXtdt + σdWt

27 where σ is the real volatility satisfying σ < σ˜. The optimal stopping problem is given by h i −r(τ−t) −r(T −t) V (t, x) = sup Et,x (1 − ε)e Π(τ, Xτ )1{τ

In order to solve the OSP, define a new process

r(T −u) e Xu − K Yu = q e2r(T −u)−1 σ˜ 2r and let u = ρ(s) and Z(s) = Y (ρ(s)). Make s and ρ satisfy the following equation ln (1 − e2r(ρ−T )) + ln (1 − e−2rT ) s = ρ − t − 2r Thus it follows √ dZ(s) = rZsds + 2rβdWs Define a new process U(t, x) = er(T −t)V (t, x), consequently the value function is   r(T −t) e Xτ − K U(t, x) = sup Et,x (1 − ε)Φ( q )1{τ

After space and time changes, the optimal stopping problem with infinite horizon is £ ¤ U(t, x) = F (z) = sup Ez (1 − ε)Φ(z)1{τ<∞} + 1{τ=∞}1{z∞≥0} (5.2) 0≤τ≤∞ where τ is any random stopping time with respect to the filtration generated by z. Transform the optimal stopping problem (5.2) into the free boundary prob- lem   rβ2F 00(z) + rzF 0(z) = 0 if z > B  F (z) = (1 − ε)Φ(z) if z = B  F 0(z) = (1 − ε)ϕ(z) if z = B  limx→∞ F (x) = 1

28 The solution is Ψ(B) + εΦ(B) z F (z) = 1 − Ψ( ), z > β B β Ψ( β ) and the constant boundary B always satisfies the equation (1 − ε)ϕ(B) ϕ(B/β) = (5.3) Ψ(B) + εΦ(B) βΨ(B/β) Theorem 7. The value function defined in the optimal stopping problem (5.1) is given by  " à !#  Ψ(B)+εΦ(B) r(T −t)  e−r(T −t) 1 − Ψ eq x−K if x > b(t)  Ψ( B ) 2r(T −t) β σ e −1 V (t, x) = à ! 2r  r(T −t)  (1 − ε)e−r(T −t)Φ eq x−K if x ≤ b(t)  e2r(T −t)−1 σ˜ 2r where r 1 − e−2r(T −t) b(t) = Bσ˜ + e−r(T −t)K 2r The optimal stopping time is r 1 − e−2r(T −t) τ = inf{t ≤ u ≤ T : X ≤ Bσ˜ + e−r(T −t)K} ∗ u 2r and B is the unique solution to (5.3). The verification of the above theorem is similar to that in the case of liquidation cost, hence we are not going to repeat it. The dependence of B on β and ε are the same as that in the case of liquidation cost discussed in Section 3.3.

5.2 The Optimal Choice of Strike Price

Suppose the investors purchasing the option before maturity have to pay the additional buying cost, which is a portion of the original market price of the option. γ × 100 percent of the option price is charged for the cost. Let D(K) be the difference between the true value of the option (assumed by the investors) and the option’s market price. er(T −t)x − K D(K) = V (t, x; K) − (1 + γ)e−r(T −t)Φ( q ) e2r(T −t)−1 σ˜ 2r

29 Theorem 8. D(K) obtains its maximum value at K∗, which satisfies er(T −t)x − K∗ ϕ(B) er(T −t)x − K∗ (1 + γ)ϕ( q ) = (1 − ε) ϕ( q ) e2r(T −t)−1 ϕ(B/β) e2r(T −t)−1 σ˜ 2r σ 2r q ∗ r(T −t) e2r(T −t)−1 and K < e x − Bσ˜ 2r Proof. Take derivative of D(K) with respect to K. r e2r(T −t) − 1 er(T −t)σ˜ D0(K) 2r er(T −t)x − K Ψ(B) + εΦ(B) er(T −t)x − K = (1 + γ)ϕ( q ) − ϕ( q ) e2r(T −t)−1 βΨ(B/β) e2r(T −t)−1 σ˜ 2r σ 2r er(T −t)x − K ϕ(B) er(T −t)x − K = (1 + γ)ϕ( q ) − (1 − ε) ϕ( q ) e2r(T −t)−1 ϕ(B/β) e2r(T −t)−1 σ˜ 2r σ 2r where in the second equality we used equation (5.3). D0(K) = 0 offers the following equation er(T −t)x − K ϕ(B) er(T −t)x − K (1 + γ)ϕ( q ) = (1 − ε) ϕ( q ) e2r(T −t)−1 ϕ(B/β) e2r(T −t)−1 σ˜ 2r σ 2r q 0 ∗ r(T −t) e2r(T −t)−1 K satisfying D (K) = 0 and K < e x−Bσ˜ 2r gives the global maximum of D.

5.3 Comparison of the Free Boundaries

Since the free boundaries of the digital option with different the models have been derived in the previous chapters, we are going to compare and analyze them in this subsection. The free boundary with the original Bachelier model is √ x1 = B1σ˜ T − t + K For the liquidation cost case, the free boundary is √ x2 = B2σ˜ T − t + K Adding interest rate, the free boundary becomes r e2r(T −t) − 1 x = e−r(T −t)(B σ˜ + K) 3 3 2r

30 At last, the free boundary of the case of both liquidation cost and interest rate is r e2r(T −t) − 1 x = e−r(T −t)(B σ˜ + K) 4 4 2r where B1, B2, B3 and B4 are the threshold constants for the four different cases. Given β fixed, B1 is equal to B3 satisfying B ϕ( 1 ) ϕ(B ) β = 1 B1 Ψ(B ) βΨ( β ) 1 and B2 is equal to B4 satisfying (1 − ε)ϕ(B ) ϕ(B /β) 2 = 2 Ψ(B2) + εΦ(B2) βΨ(B2/β) By the expressions of the free boundaries above, we can easily show that x1 > x3 , x2 > x4 , x1 > x2 and x3 > x4 when β is fixed.

Figure 5.1: The free boundaries in the four cases. Here K = 10,T = 1, r = 0.03, ε = 0.1, σ˜ = 5, σ = 4 thus β = 0.8,B1 = B3 = −0.748,B2 = B4 = −1.008

As we can see in Figure 5.1, all the four free boundary curves are convex and end up with the strike price K at maturity time T .

31 The free boundary in the interest rate case is lower than that of the Bachelier model, which agrees with the prediction x1 > x3. When adding interest rate to the Bachelier model, a drift is also added to the underlying model. With a positive drift, investors become less worried when the price reaches the optimal exercise boundary and they still have confidence for the stock price to return above K. Interest rate has the effect of pulling down the free boundary. With the liquidation cost, the investors have less tendency to exercise the options before maturity than without liquidation cost. Thus as we expected, the free boundary in the case of liquidation cost is beneath the boundary for the Bachelier model. Hence the effect of the liquidation cost is to dragging down the free boundary. With liquidation cost and interest rate, the free boundary curve is below the three other ones. On the other hand, the free boundary in the case of zero interest rate and zero liquidation cost is above the other three.

32 Chapter 6

Adding Drift

In this section, a positive drift is added to the Bachelier model which is used as the underlying asset in the [2]. The optimal exercise strategy is studied numerically by the finite difference method.

6.1 Finite Difference Method

The finite difference method is a numerical method for solving differen- tial equations approximately. It is usually used to solve partial differential equations for pricing financial derivatives and it can manage free boundary problems and optimal stopping problems very well. The key spirit of the method is to replace derivative expressions with approximately equivalent difference equations over a small interval. Let V (t, x) be a function of time t and space x, which indicates stock price in our case. We assume that the domains of t and x are bounded, i.e. 0 ≤ t ≤ T and 0 ≤ x ≤ X. The time domain can be divided by a mesh t0, t1, t2, ...tI and domain of x can be partitioned using another mesh x0, x1, x2, ...xJ . The mesh size for t is ∆t = T/I and for x is ∆x = X/J, the following equations are satisfied

ti = i∆t tI = T xj = j∆x xJ = X for i = 0, 1, ..., I and j = 0, 1, ..., J. V (ti, xj) can be simply denoted as Vi,j. Regarding the different ways of representing the derivatives, there are three approaches to set up the difference equations: explicit method, implicit method and Crank-Nicolson method. Let us start with the explicit method. For the explicit method, the expression of the next value can be written in terms of the known values explicitly, so the solution can be obtained by direct computation. It is easy to implement by any programming language being able to store arrays of data.

33 Using forward difference at time ti to approximate the derivative yields ∂V V − V i,j = i+1,j i,j ∂t ∆t Symmetric approximation at Xj gives ∂V V − V i,j = i,j+1 i,j−1 ∂x 2∆x The second order central difference implies ∂2V V + V − 2V i,j = i,j+1 i,j−1 i,j ∂x2 (∆x)2

Thus knowing the values of the function at time ti, we can obtain the values at time ti+1 by some recurrence equation. The explicit method is not stable under some conditions, which we will discuss later when given some specific difference equations. This scheme is accurate up to O(∆t, ∆x2) (compare [6]). In the case of the implicit method, backward difference at time ti+1 is used to approximate the time derivative ∂V V − V i+1,j = i+1,j i,j ∂t ∆t Similar to the explicit method, symmetric approximation and the second order central difference yield ∂V V − V i+1,j = i+1,j+1 i+1,j−1 ∂x 2∆x ∂2V V + V − 2V i+1,j = i+1,j+1 i+1,j−1 i+1,j ∂x2 (∆x)2

The value of Vi+1,j is obtained by solving a system of algebraic equations. At each time interval it requires to solve a system of linear equations. Implicit method is more numerically intensive than explicit method. This scheme is always numerical stable as well as convergent and accurate up to O(∆t, ∆x2) (compare [6]). The Crank-Nicolson method is the average of explicit method and im- plicit method. The derivatives are shown as follows ∂V V − V V − V i,j = i+1,j+1 i+1,j−1 + i,j+1 i,j−1 ∂x 4∆x 4∆x ∂2V V + V − 2V V + V − 2V i,j = i+1,j+1 i+1,j−1 i+1,j + i,j+1 i,j−1 i,j ∂x2 2(∆x)2 2(∆x)2 ∂V V − V i,j = i+1,j i,j ∂t ∆t

34 Similarly to the implicit method, we obtain Vi+1,j by solving a system of linear equations. It is more numerically intensive than implicit method as it requires solving a more complex system of linear equations. This scheme is always numerically stable as well as convergent and has an accuracy of O(∆t2, ∆x2) (compare [5]). Generally, Crank-Nicolson method is the most accurate scheme and explicit method is the least accurate scheme but the easiest one to implement.

6.2 The Optimal Liquidation Problem

The price of the underlying security assumed by the market is the Bachelier model and for simplicity the interest rate is zero.

dX˜t =σd ˜ W˜ t whereσ ˜ > 0 is a constant. The real value of the underlying asset estimated by the investors is dXt = αdt + σdWt where α is the positive drift andσ ˜ > σ > 0. Given the the digital option with strike K defined previously as the contract function, the market price of the option is x − K Π(t, x) = Φ( √ ) σ˜ T − t where Φ(x) denotes the same function as it does in the previous chapters. At any time t before maturity, we can liquidate the option and receive Π(t, Xt) immediately. If the option is held until the expiration date, we will obtain g(XT ) denoting the same function as before. The optimal stopping problem is given by · ¸ Xτ − K V (t, x) = sup Et,x Φ( √ )1{τ b(t)  t x 2 xx  V (t, x) = Φ( x√−K ) if x = b(t) σ˜ T −t 1 x−K  Vx(t, x) = √ ϕ( √ ) if x = b(t)  σ˜ T −t σ˜ T −t V (T,XT ) = g(XT ) = 1{XT ≥K}

35 where b(t) is the optimal stopping boundary. The optimal stopping time is

τb = inf{t ≥ 0 : Xt ≤ b(t)} We are going to use the explicit method to draw the free boundary. First change the direction of time by t → T − t, thus the original terminal time T becomes the initial time. The PDE and the terminal condition are converted into ½ σ2 −Vt + αVx + 2 Vxx = 0 if x > b(t)

V (0,X0) = g(X0) = 1{X0≥K} Plugging the derivatives in the PDE yields

σ2 −Vt + αVx + 2 Vxx = 2 − Vi+1,j −Vi,j + α Vi,j+1−Vi,j−1 + σ Vi,j+1+Vi,j−1−2Vi,j = 0 ∆t 2∆x 2 ∆x2 Thus σ2∆t α∆t σ2∆t α∆t σ2∆t Vi+1,j = ( + )Vi,j+1 + ( − )Vi,j−1 + (1 − )Vi,j 2∆x2 2∆x 2∆x2 2∆x ∆x2 In order to make sure the explicit method is stable and convergent, the drifts of Vi,j+1, Vi,j−1 and Vi,j must be non-negative. It follows that

∆t ≤ ∆x2/σ2 and ∆x ≤ σ2/α

Since the time t is changed to t = T −t, when drawing the free boundary we have to change the backwards-going time t back into the original time, thus the initial condition becomes terminal condition again. Figure 6.1 shows the free boundaries in the case of adding drift to the Bachelier model and the Bachelier model.

Due to the existence of positive drift, it is expected that the underlying asset has larger possibility to increase its price than that of the Bachelier model. Therefore, the free boundary of the former should be lower than the latter, which implies that investors’ enduring limitation becomes higher with an underlying asset of better prospect.

6.3 Free Boundary Equation

Although the free boundary problem can not be solved analytically, an equa- tion containing the free boundary can be derived. The free boundary equa- tion of American put option with Black-Sholes model is shown in [7]. By

36 1

0.9

0.8

0.7

0.6

0.5 Positive Drift Zero−Drift 0.4

0.3

0.2 0 0.1 0.2 0.3 0.4 0.5

Figure 6.1: The free boundary with the Bachelier model with added drift. Here K = 10,T = 1, r = 0.03, σ˜ = 0.7, σ = 0.6 and α = 0.1 using a similar method, the free boundary equation in the case of adding drift can also be deduced. Given the initial time t and the starting price x, apply Itˆo’s formula to V (u, Xu)

V (T,XT ) = V (t, x) + (6.1) R ¡ ¢ R T 1 2 T t Vu(u, Xu) + αVx(u, Xu) + 2 Vxx(u, Xu)σ du + t σVx(u, Xu) dWu 2 2 where Vx(u, Xu) = ∂V (u, Xu)/∂Xu and Vxx(u, Xu) = ∂ V (u, Xu)/∂Xu. In the continuation region, the PDE is given by 1 V (u, X ) + αV (u, X ) + V (u, X )σ2 = 0 u u x u 2 xx u

In the stopping region, V (u, Xu) = Π(u, Xu). Taking expectation under Pt,x on both sides of equation (6.1) yields

P (XT ≥ K) = V (t, x) + (6.2) R £¡ ¢ ¤ T 1 2 t E Πu(u, Xu) + αΠx(u, Xu) + 2 Πxx(u, Xu)σ I (Xu ≤ b(u)) du where b(u) is the free boundary. As defined previously, Π(t, x) = Φ( x√−K ), σ˜ T −t hence we have

1 2 Πt(t, x) + αΠx(t, x) + Πxx(t, x)σ ·2 ¸ 1 x − K (x − K)(˜σ2 − σ2) = √ ϕ( √ ) + α σ˜ T − t σ˜ T − t 2˜σ2(T − t)

37 and x + α(T − t) − K P (XT ≥ K) = P (x + α(T − t) + σWT −t ≥ K) = Φ( √ ) σ T − t

Thus, the equation (6.2) becomes

x+α(T −t)−K Φ( √ ) = V (t, x) + (6.3) h σ³ T −t ´ i R T (X −K)(˜σ2−σ2) E √1 ϕ( X√u−K ) u + α I (X ≤ b(u)) du t σ˜ T −u σ˜ T −u 2˜σ2(T −u) u

It is known that

Xu = x + α(u − t) + σWu−t so the indicator function is µ ¶ Wu−t b(u) − x − α(u − t) I (Xu ≤ b(u)) = I √ ≤ √ u − t σ u − t It follows that h ³ ´ i (X −K)(˜σ2−σ2) E √1 ϕ( X√u−K ) u + α I(X ≤ b(u)) (6.4) σ˜ T −u σ˜ T −u 2˜σ2(T −u) u b(u)−x−α(u−t) ³ √ ´ R √ x+α(u−t)+σz u−t−K = σ u−t √1 ϕ √ −∞ σ˜ T −u σ˜ T −u µ √ ¶ (x+α(u−t)+σz u−t−K)(˜σ2−σ2) 2 + α √1 e−z /2 dz 2˜σ2(T −u) 2π

Inserting x = b(t) in equation (6.3) and using (6.4) gives the final form of the free boundary equation. ³ ´ µ ¶ b(t)+α(T −t)−K b(t)−K Φ √ = Φ √ σ T −t σ˜ (T −t) b(u)−b(t)−α(u−t) ³ √ ´ R T R √ b(t)+α(u−t)+σz u−t−K + σ u−t √ 1 ϕ √ t −∞ σ˜ 2π(T −u) σ˜ T −u ³ √ ´ (b(t)+α(u−t)+σz u−t−K)(˜σ2−σ2) −z2/2 2˜σ2(T −u) + α e dz du for all t ∈ [0,T ]. This equation seems difficult to solve analytically, but can be used to determine the free boundary numerically.

38 Chapter 7

Geometric Brownian Motion

7.1 The Optimal Liquidation Problem

In this section, we are going to use Geometric Brownian Motion for the underlying asset. Hence, the price of the underlying assumed by the market is

dX˜t = rX˜tdt +σ ˜X˜tdW˜ t

dBt = rBtdt where r is the constant interest rate,σ ˜ > 0 is a constant volatility and Bt is the amount of money in a bank account at time t. The digital option with strike K used previously will also be used as the contract function in this case. Thus, given the underlying security worth y at time t < T , the market price of the digital option is −r(T −t) (r− 1 σ˜2)(T −t)+˜σW Π(t, y) = e P (ye 2 T −t ≥ K) Ã ! (r − 1 σ˜2)(T − t) − ln K = e−r(T −t)Φ 2 √ y . σ˜ T − t With the assumption of an overestimated volatility, the actual underlying price is given by dXt = αXtdt + σXtdWt where 0 < σ < σ˜ and the drift α > 0. If we liquidate the option at time t before maturity, we will therefore obtain the market price Π(t, Xt) at t. If we decide to keep the option until expiration time T , we will receive g(XT ) then. Hence, the optimal stopping problem is £ ¤ −r(τ−t) −r(T −t) V (t, x) = sup Et,x e Π(τ, Xτ )1{τ

39 where τ indicates a stopping time with respect to the filtration generated by X. Transform the optimal stopping problem into the free boundary problem with finite horizon   V (t, x) + αxV (t, x) + 1 σ2x2V (t, x) − rV (t, x) = 0 if x > b(t)  t x µ 2 xx ¶  (r− 1 σ˜2)(T −t)−ln K  V (t, x) = e−r(T −t)Φ 2 √ y if x = b(t) σ˜µ T −t ¶  (r− 1 σ˜2)(T −t)−ln K  V (t, x) = e−r(T −t) √1 ϕ 2 √ y if x = b(t)  x xσ˜ T −t σ˜ T −t  V (T,XT ) = g(XT ) = 1{XT ≥K} and the optimal stopping time is

τb = inf{t ≥ 0 : Xt ≤ b(t)} for some free boundary b(t). Due to the finite horizon, it is impossible to solve the free boundary problem explicitly. Thus, we are going to draw the free boundary numerically using the explicit method. Since the terminal condition instead of initial condition is provided, the derivatives for the backward explicit method are given according to [4]. ∂V (t, x) V − V = i+1,j+1 i+1,j−1 ∂x 2∆x ∂2V (t, x) V + V − 2V = i+1,j+1 i+1,j−1 i+1,j ∂x2 (∆x)2 ∂V (t, x) V − V = i+1,j i,j ∂t ∆t Hence, the PDE can be represented by these derivatives 1 V (t, x) + αxV (t, x) + σ2x2V (t, x) − rV (t, x) ≈ t x 2 xx V − V V − V i+1,j i,j + αj∆x i+1,j+1 i+1,j−1 ∆t 2∆x 1 V + V − 2V + σ2(j∆x)2 i+1,j+1 i+1,j−1 i+1,j − rV = 0 2 (∆x)2 i,j The equation is given by µ ¶ 1 j∆t j∆t V = (α + σ2j)V + (1 − σ2j2∆t)V + (jσ2 − α)V i,j 1 + r∆t 2 i+1,j+1 i+1,j 2 i+1,j−1

The drifts of Vi+1,j+1, Vi+1,j and Vi+1,j−1 have to be non-negative to make sure stability and convergence of the explicit method. Below is the diagram of free boundaries with different drifts of the GBM

40 1

0.95

0.9

0.85 Price 0.8

alpha=0.05 0.75 Bachelier model alpha=0.01 0.7

0.65 0 0.1 0.2 0.3 0.4 0.5 Time

Figure 7.1: The free boundary with GBM for the underlying asset. Here K = 1,T = 0.5, r = 0.03, σ˜ = 0.5, σ = 0.4 thus β = 0.8

Compared to the Bachelier model, the GBM adds a drift to the underly- ing. Thus, although the stock price drops off below the free boundary in the case of Bachelier model, investors still have confidence on the underlying to return above K given the drift α > r. As a result, the free boundary in the case of GBM is below that in the case of Bachelier model if α > r. The free boundary with a bigger drift α is below that with a smaller α, which means a bigger drift provides investors more hope for the underlying price to jump back above K. On the other hand, when α is assigned a number smaller than r, the free boundary in the GBM case is above that of the Bachelier model. α < r means the rate of return of the risky asset is even lower than that of the non-risk asset, hence no investor would like to invest in such a security.

7.2 Free Boundary Equation

By using a similar method used in the book [7], we can derive the free boundary equation in the case of GBM. Given the initial time t and initial

41 price x, Itˆo’s formula implies

−r(s−t) −r(s−t) −r(s−t) de V (s, Xs) = −re V ds + e Vsds 1 +e−r(s−t)V dx + e−r(s−t)V (dx)2 x 2 xx 1 = e−r(s−t)(−rV + V + αX V + σ2x2V )dt s s x 2 xx −r(s−t) +e σXsVxdWs

2 2 for t < s < T and Vx = ∂V (s, Xs)/∂Xs and Vxx = ∂ V (s, Xs)/∂Xs . Thus

−r(T −t) e V (T,XT ) = V (t, x) + (7.1) R R T −r(s−t) 1 2 2 T −r(s−t) t e (−rV + Vs + αXsVx + 2 σ x Vxx) ds + t e σXsVx dWs As we know in continuation region 1 −rV + V + αX V + σ2x2V = 0 s s x 2 xx and in stopping region V (s, Xs) = Π(s, Xs). Taking expectation under Pt,x on both side of equation (7.1) yields

−r(T −t) e P (XT ≥ K) = V (t, x) (7.2) R £ ¤ T −r(s−t) 1 2 2 + t E e (−rΠ + Πs + αXsΠx + 2 σ x Πxx)I(Xs ≤ b(s)) ds where b(s) is the free boundary. In stopping region à ! 1 2 −r(T −s) (r − 2 σ˜ )(T − s) − ln(K/Xs) Π(s, Xs) = e Φ √ σ˜ T − s

It follows that

1 2 2 (−rΠ + Πs + αXsΠx + σ x Πxx) = (7.3) ³ ´ ³ 2 ´ −r(T −s) (r− 1 σ˜2)(T −s)−ln K/X 2 2 (r− 1 σ˜2)(T −s)−ln(K/X ) e √ ϕ 2 √ s α − r − 1 − σ −σ˜ 2 s σ˜ T −s σ˜ T −s 2 σ˜2(T −s)

Given the initial time t and price x, we know that à ! 1 2 (α − 2 σ )(T − t) − ln(K/x) P (XT ≥ K) = Φ √ (7.4) σ T − t

42 Using (7.3) and (7.4), equation (7.2) becomes ³ ´ (α− 1 σ2)(T −t)−ln(K/x) e−r(T −t)Φ 2 √ (7.5) σ T −t ³ 1 2 ´ R T (r− σ˜ )(T −s)−ln K/Xs = V (t, x) + e−r(T −t) E[ √1 ϕ 2 √ t σ˜ T −s σ˜ T −s ³ ´ 2 2 1 2 σ −σ˜ (r− 2 σ˜ )(T −s)−ln(K/Xs) α − r − 1 − 2 σ˜2(T −s) I(Xs ≤ b(s))] ds

Geometric Brownian Motion implies

1 2 (α− σ˜ )(s−t)+σWs−t Xs = xe 2

The indicator function becomes à ! 1 2 Ws−t ln(b(s)/x) − (α − 2 σ )(s − t) I (Xs ≤ b(s)) = I √ ≤ √ s − t σ s − t

Thus we have ³ ´ (r− 1 σ˜2)(T −s)−ln K/X E[ √1 ϕ 2 √ s (7.6) σ˜ T −s σ˜ T −s ³ ´ 2 2 1 2 σ −σ˜ (r− 2 σ˜ )(T −s)−ln(K/Xs) α − r − 1 − 2 σ˜2(T −s) I(Xs ≤ b(s))] = 1 2 ln(b(u)/x)−(α− 2 σ )(s−t) ³ √ ´ R √ (r− 1 σ˜2)(T −s)−ln K+x+(α− 1 σ2)(s−t)+σz s−t σ s−t √1 ϕ 2 √ 2 −∞ σ˜ T −s σ˜ T −s ³ 1 √ ´ 2 2 (r− σ˜2)(T −s)−ln K+x+(α− 1 σ2)(s−t)+σz s−t 2 α − r − 1 − σ −σ˜ 2 2 √1 e−z /2 dz 2 σ˜2(T −s) 2π

Using (7.6) and inserting x = b(t) in equation (7.5) leads to the final form of the free boundary equation ³ ´ ³ ´ (α− 1 σ2)(T −t)−ln K+ln b(t) (r− 1 σ˜2)(T −t)−ln K+ln b(t) Φ 2 √ = Φ 2 √ + σ T −t σ˜ T −t 1 2 ln(b(s)/b(t))−(α− 2 σ )(s−t) ³ √ ´ R T R √ (r− 1 σ˜2)(T −s)−ln K+b(t)+(α− 1 σ2)(s−t)+σz s−t σ s−t √1 ϕ 2 √ 2 t −∞ σ˜ T −s σ˜ T −s ³ 1 √ ´ 2 2 (r− σ˜2)(T −s)−ln K+b(t)+(α− 1 σ2)(s−t)+σz s−t 2 α − r − 1 − σ −σ˜ 2 2 √1 e−z /2 dz ds 2 σ˜2(T −s) 2π for all t ∈ [0,T ]. Again, this free boundary equation can not be solved analytically, but it may be used to determine the boundary numerically.

43 Chapter 8

The Optimal Liquidation of A Bull Call Spread

The model for the price of the underlying asset is the Bachelier model. We assume the interest rate is zero for simplicity. Thus the underlying price estimated by the market is

dX˜t =σd ˜ W˜ t

With the assumption of overestimated volatility, the true physical price of the underlying asset is dXt = σdWt whereσ ˜ and σ are the implied volatility and the real volatility, respectively. They satisfyσ ˜ > σ > 0. A bull call spread, which is a bullish vertical spread strategy aiming for the underlying price with moderate rise, is utilized as the contract. To explain more explicitly, a bull spread is option long in a call and short in another call with the same underlying security and the same expiration time, but the strike price of the latter is larger than that of the formers. This bull call spread is given by

+ + g(XT ) = (XT − K) − (XT − K˜ ) where K˜ > K. Hence, given the underlying security worth x at time t < T , the market price of the option is h i + + Π(t, x) = E (XT − K) − (XT − K˜ ) £ ¤ h i = E (X − K)1 − E (X − K˜ )1 T {XT ≥K} T {XT ≥K˜ }

44 Let us calculate the market value of the first call option. £ ¤ h i ˜ E (XT − K)1{XT ≥K} = E (x +σ ˜WT −t − K)1{XT ≥K} Z ∞ 1 2 √ = √ e−z /2(x +σ ˜ T − tz − K) dz K√−x 2π σ˜ T −t x − K √ K − x = (x − K)Φ( √ ) +σ ˜ T − t ϕ( √ ) σ˜ T − t σ˜ T − t Thus, the market price of the bull spread becomes x − K √ K − x Π(t, x) = (x − K)Φ( √ ) +σ ˜ T − t ϕ( √ ) σ˜ T − t σ˜ T − t x − K˜ √ K˜ − x −(x − K˜ )Φ( √ ) − σ˜ T − t ϕ( √ ) σ˜ T − t σ˜ T − t The figure of the payoff function of a bull call spread is similar to that of the digital option. As we can see, when the price of the underlying is smaller than (K + K˜ )/2, the payoff curve is convex. When the price is larger than (K + K˜ )/2, the payoff curve turns out to be concave.

6

5

4

3

2

1 Payoff at expiry time Payoff before expiration

0

−1 0 5 10 15 20 25 30 35

Figure 8.1: The payoff function of a bull call spread

We will obtain Π(t, Xt), if we liquidate the option at time t before ma- turity. If we hold the option until expiration time, we will receive g(XT ). Thus, the optimal stopping time is given by £ ¤ V (t, x) = sup Et,x Π(τ, Xτ )1{τ

45 where Π(τ, Xτ ) and g(XT ) are denoted previously. Convert the optimal stopping problem into free boundary problem  σ2  Vt + Vxx = 0 if x > b(t)  2 V (t, x) = Π(t, x) if x = b(t) dΠ(t,x)  Vx(t, x) = if x = b(t)  dx V (T, x) = g(XT ) where Π(t, x) and g(XT ) are given previously. Using explicit method, we can draw the free boundary of the bull spread with Bachelier model for the underlying asset.

1.5

1.45

1.4

1.35

1.3

1.25

1.2

1.15

1.1

1.05

1 0 0.1 0.2 0.3 0.4 0.5

Figure 8.2: The free boundary of a bull call spread with the Bachelier model for the underlying asset. Here K = 1, K˜ = 1.5,T = 0.5, σ˜ = 0.5, σ = 0.45 thus β = 0.9

The free boundary ending up with K˜ at T is convex and increasing in time. When the underlying price is smaller than (K + K˜ )/2, the free boundary curve is relatively flat, whereas the free boundary is comparatively steep when the price is larger than (K + K˜ )/2. The reason for the change from a flat to a steep curve is the dramatic change of convexity to concavity at the middle point of the two strike prices. For the free boundary of a digital option, there does not exist such a point separating the free boundary curve into relatively flat and steep parts. Therefore, although the digital option resembles very much to a bull call spread with very close strike range, the digital option still can not represent bull call perfectly.

46 Chapter 9

Conclusion

As an extension of paper [2], which studies the optimal liquidation strat- egy of a digital option with the Bachelier model for the underlying asset, this thesis also uses the digital option as the contract function and the as- sumption of overestimated implied volatilities. Since the underlying asset in paper [2] is the simple Bachelier model, this thesis extends it to more realistic models for the underlying asset. For the first three models, which are (i) the Bachelier model with liquidation cost, (ii) the Bachelier model with interest rate and (iii) the Bachelier model with both liquidation cost and interest rate, the optimal stopping problems can be translated into free boundary problems with infinite horizon. They can therefore be solved analytically. The optimal choice of the strike price K can be obtained in these three cases. For the first and the third models, the dependence of the constant boundary B on β = σ/σ˜ are the same given the liquidation cost ε fixed. B decreases in β and B goes to −∞ as β converges to 1. For the second model, the Bachelier model with interest rate, B decreases in β and the curve B(β), which is the same as in paper [2], is convex in 0 ≤ β ≤ 1. The dependence of B on liquidation cost ε for the first and the third models are the same, B decreases in ε and B goes to infinity as ε converges to 1. The free boundaries of the three models and the Bachelier model are com- pared. All the free boundaries are convex and end up with strike price K at terminal time. Adding interest rate which is almost equivalent to adding a drift makes the free boundary move downwards. Charging liquidation cost reduces the traders’ revenue of exercising the option, thus it also has the effect of pulling down the free boundary. The fourth and the fifth models are (iv) the Bachelier model with drift and (v) Geometric Brownian Motion, respectively. For both of them, the op- timal stopping problems can only be converted into free boundary problems

47 with finite horizon, so they can mainly be studied numerically. Using the explicit method of finite difference methods, the optimal stopping bound- aries can be drawn with Matlab. The free boundary in the case of adding a positive drift is lower than that of zero-drift, because drift implies the un- derlying asset has a bigger tendency to rise than the asset of no drift. The free boundary of the GBM model is lower than that of a Bachelier model due to the relatively positive drift of the GBM given that α > r. The larger the α the lower the free boundary will be. However, when α < r, the free boundary of GBM will be above that of the Bachelier model. Except the numerical analysis, the complicated free boundary equations are deduced in both cases. After utilizing the digital option as the contract, the bull call spread option is used as the contract function. The optimal stopping problem can only be transformed into free boundary problem with finite horizon, thus it is solved numerically. The behavior of the free boundary curve of the bull call changes dramatically at the middle point of the two strikes. However, there is no such point existing for the free boundary of a digital option. Although the digital option resembles the bull call spread with a narrow strike range very closely, it can not represent the bull spread perfectly. Some further study in this field could be the optimal liquidation strategy of a digital option with jumps added to the Bachelier model. The model for the price of the underlying asset could be the model in paper [3], which consists a Brownian motion and a compensated Poisson process. We can also construct models with jumps by other Poisson processes which are described in [1]. Since the option spread can not be represented perfectly by a digital option, it is necessary to study the two kinds of options separately. Thus bull spread or bear spread should be used as contract functions and the models for the underlying asset, which are more complex than the Bachelier model, should be built up.

48 Bibliography

[1] Rama Cont and Peter Tankov. Financial Modelling with Jump Processes. CRC Press, 2004.

[2] Erik Ekstr¨om,Carl Lindberg, Johan Tysk, and Henrik Wanntorp. Op- timal liquidation of an option spread, 2008.

[3] Erik Ekstr¨omand Johan Tysk. Properties of option prices in models with jumps, 2005.

[4] Lishang Jiang. Matematical Modeling and Methods of Option Pricing. World Scientific Publishing Co. Pte. Ltd., 2005.

[5] Jouni Kerman. Numerical methods for option pricing: Binomial and finite difference approximations, 2002.

[6] K. W. Morton and David Francis Mayers. Numerical Solution of Partial Differential Equations: An Introduction. Cambridge University Press, 2005.

[7] G. Peskir and A. Shiryaev. Optimal Stopping and Free-Boundary Prob- lems. Lectures in Mathematics ETH Z¨urich. Birkh¨auserVerlag, Basel., 2006.

[8] J.C. Sosa. On the informational content of implied volatility. Boston College Dissertations and Theses, 2000.

49 Appendix A

Matlab Source Code

Explicit method for the digital option in the case of adding drift

T = 0 . 5 ; dt = 0.00004; k = 1 ; ds = 0 . 0 0 4 ; tn = round(T/ dt ) ; sn = round(3∗ k/ ds ) ; alpha = 0 . 1 ; sigma b = 0 . 7 ; sigma = 0 . 6 ; smax =3∗k ; threshold = 0.001; a = (alpha/2) ∗ dt ∗ ds + ((sigmaˆ2) / 2) ∗ dt ; b = ds ˆ2 − sigma ˆ2 ∗ dt ; c = ((sigmaˆ2) / 2) ∗ dt − ( alpha / 2) ∗ ds ∗ dt ; d = ds ˆ 2 ; t i = 0 : dt :T; sj = 0:ds:smax;

[f, comp] = matrix(sn+1, tn+1, round ((2∗ k/ds)+1), a, b, c , d , k , sigma b, T, ds, dt); q = −0.79∗ sigma b ∗ sqrt (T−t i )+k ; plottx(comp, T, dt, k) hold on plot ( 0 : dt :T, q )

50 function [ out, compare ] = matrix( rows, cols, num ones , a , b, c, d, k, sigma b , T, ds , dt ) threshold = 0.0001; f = zeros (rows, cols); comp = zeros (rows, cols); for i = 1 : num ones f(i,cols) = 1; end for i = 1 : c o l s f (1 , i ) = 1 ; end for cc = ( c o l s −1): −1:1 t = dt ∗ ( cc −1) ;

xvec = 3∗k − ds . ∗ (((1:rows) ’) −1) ;

gtmp = normcdf((xvec−k ) /( sigma b ∗ sqrt (T−t ) ) ) ;

for r r = 2 : ( rows −1) ftmp = ( a∗ f ( rr −1, cc +1) + b∗ f(rr, cc+1) + c∗ f ( r r +1, cc +1) ) / d ;

f ( rr , cc ) = max(ftmp, gtmp(rr));

i f ( abs ( f ( rr , cc ) − gtmp ( r r ) ) < t h r e s h o l d ) comp(rr, cc) = 1; end end end out = f ( [ num ones:rows], :); compare = comp([num ones:rows], :); function [ ] = plottx( comp, T, dt, k ) s s = size (comp) ; rows = ss(1); cols = ss(2); val = zeros (1 , c o l s −1) ; for cc = 1 : c o l s −1

51 for r r = 1 : rows i f (comp(rr, cc) == 1 && val(cc) == 0) val(cc) = ((rows−rr+1) / rows) ∗ k ; end end end plot ( 0 : dt :T−dt , val ) ;

Explicit method for the digital option in the case of GBM

T = 0 . 5 ; dt = 0.00001; k = 1 ; ds = 0 . 0 0 3 ; tn = round(T/ dt ) ; smax =1.8∗k ; sn = round( smax/ ds ) ; alpha = 0.01 ;%0.05 r =0.03; sigma b = 0 . 5 ; sigma = 0 . 4 ; threshold = 0.00001; t i = 0 : dt :T; sj = 0:ds:smax;

[f, comp] = gmatrix(sn+1, tn+1, round ( ( 0 . 8 ∗ k/ds)+1),r, k, sigma, sigma b, T, ds, dt,alpha,smax); q = −0.7486∗ sigma b ∗ sqrt (T−t i )+k ; plottx(comp, T, dt, k) hold on plot ( 0 : dt :T, q ) function [ out, compare ] = gmatrix( rows, cols, num ones , r , k,sigma, sigma b, T, ds, dt,alpha,smax ) threshold = 0.0001; f = zeros (rows, cols);

52 comp = zeros (rows, cols); for i = 1 : num ones f(i,cols) = 1; end for i = 1 : c o l s f (1 , i ) = exp(−r ∗(T−(i −1)∗ dt ) ) ; end for cc = ( c o l s −1): −1:1 t = dt ∗ ( cc −1) ;

xvec = smax − ds . ∗ (((1:rows) ’) −1) ;

gtmp = exp(−r ∗(T−t ) ) ∗normcdf(((r−sigma b ˆ2/2) ∗(T−t )−log ( k )+log (xvec))/(sigma b ∗ sqrt (T−t ) ) ) ;

for r r = 2 : ( rows −1)

a = 1+r ∗ dt ; b = dt ∗ alpha ∗( smax/ ds+1−rr)/2+(sigmaˆ2) ∗ ( ( smax/ ds +1−r r ) ˆ2) ∗ dt / 2 ; c = 1−(sigma ˆ2) ∗ ((smax/ds+1−r r ) ˆ2) ∗ dt ; d = −alpha ∗( smax/ ds+1−r r ) ∗ dt/2+(sigmaˆ2) ∗ ( ( smax/ ds +1−r r ) ˆ2) ∗ dt / 2 ;

ftmp = (b∗ f ( rr −1, cc +1) + c∗ f(rr, cc+1) + d∗ f ( r r +1, cc +1) ) / a ;

f ( rr , cc ) = max(ftmp, gtmp(rr));

i f ( abs ( f ( rr , cc ) − gtmp ( r r ) ) < t h r e s h o l d ) comp(rr, cc) = 1; end end end out = f ( [ num ones:rows], :); compare = comp([num ones:rows], :);

Explicit method for bull spread with Bachelier model

53 T = 0 . 5 ; dt = 0.000025; k = 1 ; k t =1.5; ds = 0 . 0 0 2 5 ; tn = round(T/ dt ) ; smax =3∗k ; sn = round( smax/ ds ) ; alpha = 0 ; sigma b = 0 . 5 ; sigma = 0.45; threshold = 0.00001; t i = 0 : dt :T; sj = 0:ds:smax;

[f, comp] = gmatrixf(sn+1, tn+1, round ((2∗ k/ds)+1),k,k t , sigma, sigma b, T, ds, dt,alpha,smax); plottxf(comp, T, dt, k t ) %function plottxf is the same as p l o t t x function [ out, compare ] = gmatrixf( rows, cols, num ones , k , k t ,sigma, sigma b, T, ds, dt,alpha,smax ) threshold = 0.0001; f = zeros (rows, cols); comp = zeros (rows, cols); for i = 1 : ( k t / ds+1) f(i,cols) = k t−k ; end for i = ( ( ( smax−k)/ds)+2): rows f(i ,cols)=0; end for i= ( k t/ds+2):(((smax−k ) / ds ) +1) f(i ,cols)= (rows−i ) ∗ ds −k ; end

54 for i = 1 : c o l s f (1 , i ) = k t−k ; end for cc = ( c o l s −1): −1:1 t = dt ∗ ( cc −1) ;

xvec = smax − ds . ∗ (((1:rows) ’) −1) ;

gtmp = ( xvec−k ) . ∗ normcdf((xvec−k ) /( sigma b ∗ sqrt (T−t ) ) ) + sigma b ∗ sqrt (T−t ) ∗ normpdf((− xvec+k)/(sigma b ∗ sqrt (T−t ) ) )−(xvec−k t ) . ∗ normcdf((xvec−k t ) /( sigma b ∗ sqrt (T−t ) ) )− sigma b ∗ sqrt (T−t ) ∗ normpdf((− xvec+k t ) /( sigma b ∗ sqrt (T−t ) ) ) ;

for r r = 2 : ( rows −1)

a = (alpha/2) ∗ dt ∗ ds + ((sigmaˆ2) / 2) ∗ dt ; b = ds ˆ2 − sigma ˆ2 ∗ dt ; c = ((sigmaˆ2) / 2) ∗ dt − ( alpha / 2) ∗ ds ∗ dt ; d = ds ˆ 2 ;

ftmp = ( a∗ f ( rr −1, cc +1) + b∗ f(rr, cc+1) + c∗ f ( r r +1, cc +1) ) / d ;

f ( rr , cc ) = max(ftmp, gtmp(rr));

i f ( abs ( f ( rr , cc ) − gtmp ( r r ) ) < t h r e s h o l d ) comp(rr, cc) = 1; end end end out = f ( [ ( ( k t/ds)+1):rows], :); compare = comp([(( k t/ds)+1):rows], :);

55