Tải bản đầy đủ - 0 (trang)
Chapter 11. Project: Crank–Nicolson Option Pricer

# Chapter 11. Project: Crank–Nicolson Option Pricer

Tải bản đầy đủ - 0trang

350

C H A P T E R 11

. Project: Crank–Nicolson option pricer

As described in the previous trinomial project, the nodes are chosen on a log-rectangular

grid as given by equation (10.1) with nonzero drift parameter . For a full description of the

lattice, see the first section of the trinomial project. Again, making use of the risk-neutrality

condition and taking logarithms gives the drift in terms of all other parameters, as given in

equation (10.14) and repeated here for clarity:

=r−

1

log 2p cosh x − 1 + 1

t

(11.1)

The probability p is again given in terms of the lattice volatility parameter , the spacing x,

and t:

p=

2

t

x

2

(11.2)

2

As in the direct method, one chooses a sensible value for the probability p, given a t and a

, and then arrives at the spacing in the logarithm of the stock price:

x=

t/2p

(11.3)

Note that p is normally chosen in the range 0 < p < 21 , although the CN method can be shown

to be stable and convergent for all p > 0. To reiterate, the M + 1 time slices are chosen with

time step t = T − t0 /M, where T is the maturity time and t0 denotes present time.

11.2 Pricing with Crank–Nicolson

Here we shall explicitly discuss the pricing of European-style options; the extension to

Americans is obvious and introduces the same extra step as discussed in the previous project.

The pricing equations for the CN method differ significantly from the direct trinomial pricer,

in that propagation of the solution takes into account both backward and forward motion. In

particular, one can relate the option prices fnm = V Snm tm at the nodes Snm for time tm to

the option prices fnm+1 = V Snm+1 tm+1 at nodes Snm+1 for future time tm+1 = tm + t, via the

probability p for forward-time upward and downward stock motion, as follows:

1 + p fnm −

p m

m

f + fn+1

= e−r

2 n−1

t

1 − p fnm+1 +

p m+1

m+1

f

+ fn+1

2 n−1

(11.4)

Note the difference between this and the explicit finite-difference approach used in the

trinomial lattice project (see Figure 10.2). In this implicit CN scheme, prices at three nodes

at a later time step are related to prices at three nodes before a time step. Equation (11.4) can

be rewritten in matrix format in which the option price solution column vector denoted by f m

m

m

m

at time tm is 2M + 1 -dimensional, with components f−M

f−M+1

f0m

fM−1

fMm :

Zf m = e−r t Af m+1

(11.5)

This is a linear system of equations with tridiagonal matrices A, Z given in terms of the

transfer matrix T,

Z = 23 1 − 21 T

(11.6)

A = 21 1 + 21 T

(11.7)

11.3 Calibration

where 1 is the 2M + 1 -dimensional identity matrix and

1 − 2p

p

0

⎜ p

1

2p

p

0

⎜ 0

p

1

2p

p

0

0

T=⎜

0

0 p

0

0

p

1 − 2p

351

(11.8)

To implement the CN method, equation (11.5) is solved at every time step beginning with

the known terminal payoff vector whose components are given by

fnM = max SnM − K 0

(11.9)

for the case of a call struck at K and

fnM = max K − SnM 0

(11.10)

for a put struck at K. Equation (11.5) constitutes a system of 2M + 1 equations in the 2M + 1

unknowns fnm with band diagonal matrix Z and is hence readily solved by LU factorization.

The routine GBSV in the MFLapack library within MFlibs is useful for this purpose once

the matrices A, Z have been transformed to band matrix format. The latter operation is easily

accomplished using the routines ST2B and GT2B in MFBlas. Having solved for f M−1 by using

the known payoff solution vector f M , the procedure is then iterated by solving equation (11.5)

for f M−2 . Iterating M times in this fashion gives the option price vectors at all time slices,

including the vector f 0 at present time t0 .

As a final important note, we observe that the CN pricing equation (11.5) assumes that

m

m

and small enough values of S−M

the lattice grid takes into account large enough values of SM

where the put and call are negligible, respectively. Moreover, we have purposely excluded

the proper corrections from the boundaries into the matrix pricing equations. The reader can

experiment with the inclusion of boundary conditions at the lower and upper extremities of

the rectangular grid . Without such inclusions the present CN approach will fail to correctly

price options at nodes outside of the proper trinomial lattice (i.e., for nodes lying above or

below the outer cone of the tree).

11.3 Calibration

As in the direct trinomial model, the lattice volatility is determined in such a way as to match

the price of an at-the-money European option chosen as a calibration target. The resulting

optimal implied lattice volatility computed again does not coincide with the implied Black–

Scholes volatility I , but it converges to this value in the limit of infinitesimal time steps. As

in the other lattice methods, the lattice volatility compensates partly for the systematic errors

in the discrete-time approximation scheme inherent in the trinomial method.

Calibration requires the use of a root-finding algorithm. The cranic1 spreadsheet contains

a European at-the-money call with given maturity Tref and strike Kref as the calibration target

or reference. The price of the calibration target is provided as a Black–Scholes implied

volatility I . The market price of this call is then given by the Black–Scholes formula:

Cref = C S0 Kref r

I

Tref − t0

(11.11)

352

C H A P T E R 11

. Project: Crank–Nicolson option pricer

t0 is the time at which we seek the price, and the corresponding spot price is assumed to be

S0 . The implied lattice volatility is obtained by inverting the following equation with a root

finder in the MFZero library:

f00 = f00

r

t

x = Cref

(11.12)

Here we have explicitly written the dependence of the CN approximation on the price, i.e.,

f00 , in terms of the lattice parameters. The value of f00 is found iteratively using the earlier

pricing equations for a European call option. Note that the interest rate r is held fixed and

that t is also fixed by the chosen number of time steps in the lattice. The value for the strike

is set as K = Kref .

11.4 Pricing Barrier Options

The procedure for pricing barrier options is almost identical to what is formulated in

Section 10.4 of the previous project. One important distinction arises, however, when using

a drifted lattice (as is the case in the current CN approach) versus a nondrifted lattice. The

differences that arise between the use of drifted and nondrifted lattices were also briefly

discussed in the previous project, where the nondrifted lattice was favored over the use of

drifted lattices when pricing options with a constant barrier level. Within the CN drifted-lattice

approach, the price of a up-and-out barrier call, for example, with barrier at S = H, requires

one to employ the pricing procedure as given in Section 11.2. At each time tm , however, the

price components fnm must be reset to zero for all n ≥ nH (i.e., all nodes at and above the

barrier level H) before the next propagation time step. The integer nH can be taken to be

the least integer value of n such that Snm ≥ H. Figure 11.1 demonstrates a possible source of

inaccuracy arising from the use of a drifted-lattice geometry when pricing a barrier option,

with barrier level at a fixed height. The zero-boundary conditions imposed on the “boundary”

nodes creates only a coarse approximation to the actual horizontal straight-line barrier. Note

approximated barrier

upper barrier

S

S0

t

FIGURE 11.1 A drifted trinomial lattice used to price a barrier option. The barrier level lies along a

horizontal line, which is inaccurately approximated by the zero-boundary nodes.

11.4 Pricing Barrier Options

353

that as one makes the time step smaller and smaller, this approximation becomes more and

more accurate. In the limit t → 0, this approximation becomes exact.

The pricing of down-and-out options is similar, while the pricing of knock-in options

reduces to that of knockouts, thanks to the in-out symmetry relation of equation (10.26). The

American barrier options, if desired.

CHAPTER

. 12

Project: Static Hedging of Barrier

Options

The objective of this study is to hedge European barrier options by means of a static replication

strategy involving a market-restricted set of available plain-vanilla European call and put

options. The hedge trade occurs at the initial time and is unwound either at maturity or when

the barrier is crossed.

Worksheets: bhedge

Required Libraries: MFioxl, MFBlas, MFFuncs, MFLapack, MFStat, MFCollection

12.1 Analytical Pricing Formulas for Barrier Options

We consider four flavors of single-barrier options: (1) down-and-out, (2) up-and-out, (3) downand-in, (4) up-and-in. Each option can be either a call or a put, for a total of eight different

types of contracts.

12.1.1 Exact Formulas for Barrier Calls for the Case H ≤ K

Let us recall from Section 3.3 the pricing formulas for barrier options in the geometric

Brownian motion model. The European down-and-out call option has nonzero value only for

S > H:

C DO S K T − t = C S K T − t − S/H

1−k

C H 2 /S K T − t

(12.1)

with k ≡ r/ 21 2 . This shows that the barrier option value at spot S > H can be expressed

in terms of the plain-vanilla call evaluated at effective spot values of S and H 2 /S. The

corresponding down-and-in call option value is then

C DI S K T − t = C S K T − t − C DO S K T − t

(12.2)

355

356

C H A P T E R 12

. Project: Static hedging of barrier options

The formula for the value of the call C S K T − t is given by the plain Black–Scholes

formula. Using it gives [i.e., equation (3.52)]:

C DO S K

= SN d1 S/K − Ke−r N d2 S/K

−S H/S

k+1

N d1 H 2 /SK

+Ke−r H/S

k−1

N d2 H 2 /SK

(12.3)

where d1 x and d2 x are defined as

d1 x =

log x + r + 21

d2 x = d1 x −

2

log x 1

√ + 2 k+1

=

(12.4)

(12.5)

Note that we have reexpressed the formulas in terms

√ of the time to maturity ≡ T − t. As

well, for clarity the obvious dependence on k and

within the functions d1 and d2 is not

expressed in terms of

written explicitly. Note that the down-and-in call option C DI S K

cumulative normal distribution functions is just the negative of the sum of the last two terms

in equation (12.3).

In contrast to the down-and-out call, the up-and-out call option is defined to have nonzero

value for values S < H and also has the same pay-off, namely, that of the plain call struck

at K. The European up-and-out call option is zero for all spot values in the case H ≤ K, i.e.,

C UO = 0. This follows since the asset price S must be below the barrier, S < H, for nonzero

values of the option. However, the pay-off is that of a call struck at K, where K ≥ H, which

always gives a pay-off of zero, hence C UO = 0. Then from in-out symmetry we immediately

=C S K .

have C UI S K

12.1.2 Exact Formulas for Barrier Calls for the Case H ≥ K

For a European down-and-out call option value we have [i.e., equation (3.51)]:

C DO S K

= SN d1 S/H − Ke−r N d2 S/H

−S H/S

+Ke

−r

k+1

N d1 H/S

H/S

k−1

N d2 H/S

(12.6)

and from symmetry the corresponding down-and-in call has value

C DI S K

=C S K

− C DO S K

(12.7)

The European up-and-in call option now has value [i.e., equation (3.62)]:

C UI S K

= SN d1 S/H − Ke−r N d2 S/H

−S H/S

k+1

+Ke−r H/S

N −d1 H 2 /SK − N −d1 H/S

k−1

N −d2 H 2 /SK − N −d2 H/S

(12.8)

and from symmetry the corresponding up-and-out call has value

C UO S K

=C S K

− C UI S K

(12.9)

### Tài liệu bạn tìm kiếm đã sẵn sàng tải về

Chapter 11. Project: Crank–Nicolson Option Pricer

Tải bản đầy đủ ngay(0 tr)

×