Anda di halaman 1dari 19

Performance and Accuracy Analysis of Integration Schemes for the Black-Scholes Equation

Michael Cooney April 7, 2000

The Black-Scholes Equation

The Black-Scholes Equation is a partial dierential equation which gives the relationship of the price of an option to the various parameters which it depends on. The analysis made by Black and Scholes made a few assumptions about the nature of the stock-market as follows: The asset price follows a log-normal random walk. The risk-free interest rate, r, and the asset volatility , are known functions of time throughout the life-time of the option. There are no transaction costs associated with hedging a portfolio. The underlying asset pays no dividends throughout the life of the option. There are no arbitrage possibilities Trading of the underlying can occur continuously. Short selling is permissible and assets are divisible. The Black-Scholes equating is valid for vanilla calls and puts and the only dierence mathematically between a call and a put is that they lead to dierent boundary conditions, and so often it is not necessary to distinguish between calls and puts. In this case we use V to denote the price of the option. If the nature of the option is relevant, we use C for calls and P for puts. The Black-Scholes partial dierential equation is: V 1 2V V + 2 S 2 + rS rV = 0 (1) t 2 S 2 S The Black-Scholes equation is a parabolic partial dierential equation (which will be discussed further in the appendices), and for European option has two boundary conditions and a nal condition. We start with European call options, denoted by C(S, t). European Call Option: C 1 2C C + 2 S 2 2 + rS rC = 0 t 2 S S with conditions: C(S, T ) = C(0, t) = C(S, t) European Put Option: max(S K, 0) 0 S Ker(T t) as S (2)

P 1 2P P + 2 S 2 2 + rS rP = 0 t 2 S S with conditions: P (S, T ) = P (0, t) = P (S, t) max(K S, 0)

(3)

Ker(T t) 0 as S

For constant and r, this partial dierential equation has an analytic solution: C(S, t) = P (S, t) = SN (d1 ) Ker(T t) N (d2 ) Ke
r(T t)

(4) (5)

N (d2 ) SN (d1 )

where the function N () is dened by the cumulative distribution function


x

N (x) =

e 2 y dy

(6)

and the parameters d1 and d2 are dened by: log(S/K) + (r + 1 2 )(T t) 2 T t log(S/K) + (r 1 2 )(T t) 2 T t
"Call.dat"

d1 d2

= =

0.6

0.5

0.4

0.3

0.2

0.1

0 0.6 0.8 1 1.2 1.4

Figure 1: Call Option Value: T t = 0.1, = 0.1, r = 0.05

Other quantities which are of interest to traders are the derivatives of the option price with respect to its parameters. These quantities are represented by Greek letters and often are colloquially referred to as the Greeks: Delta, , is dened to be the rst partial derivative of the price w.r.t. the underlying, and is given by C = N (d1 ) S P = N (d1 ) 1 S

C P

= =

(7) (8)

1.2 "Delta.dat"

0.8

0.6

0.4

0.2

0 0.6 0.8 1 1.2 1.4

Figure 2: Call Option Delta C : T t = 0.1, = 0.1, r = 0.05 Gamma, , is dened to be the second partial derivative of the price w.r.t. the underlying, given by 2V ed1 /2 C = P = = S 2 S 2(T t)
2

(9)

Theta, , is dened to be the rst partial derivative of the price w.r.t. time, given by C SN (d1 ) rKer(T t) N (d2 ) = t 2 T t P SN (d1 ) = rKer(T t) N (d2 ) t 2 T t

C P

= =

(10) (11)

Rho, , is dened to be the rst partial derivative of the price w.r.t. the interest rate, r, given by

14 "Gamma.dat" 12

10

-2 0.6 0.8 1 1.2 1.4

Figure 3: Call Option Gamma C : T t = 0.1, = 0.1, r = 0.05

C P

= =

C = K(T t)er(T t) N (d2 ) r P = K(T t)er(T t) N (d2 ) r

(12) (13)

Vega, often denoted as or , is dened to be the rst partial derivative of the option price to the volatility, given by V = S T t N (d1 ) (14) The most important of this quantities is , as many traders create portfolios which reduce this quantity as close as possible to zero. Traders who follow this strategy successfully have portfolios whose value is almost independent of any uctuation in the the underlying, and so can lock the portfolio into a risk-free prot. This concept is known as delta-hedging and is a very popular market strategy. is important for delta-hedging as it indicates how often the portfolio must be re-hedged in order to maintain a delta-neutral position. In the real-world, each transaction cost the trader, and so it is desirable to have a portfolio which also reduces as low as possible. This reduces the need to rehedge and so should help lock-down the portfolio into giving a risk-free return. also contributes to ensuring that the portfolio yields a risk-free return, but it contributes in a denite manner, unlike the , which only does so on average. Another confusing parameter is the Vega. It is a derivative w.r.t. a parameter and not a variable, and so can be very confusing. Reducing the sensitivity of the portfolio to the volatility is known as vega-hedging, and it is used to reduce model risk. C = P =

0.09 "Theta.dat" 0.08

0.07

0.06

0.05

0.04

0.03

0.02

0.01

0 0 0.5 1 1.5 2

Figure 4: Call Option Theta C : T t = 0.1, = 0.1, r = 0.05 Volatility is not handled very realistically by many nancial models, and this inherent inaccuracy can be a cause of inaccuracy (and worry) to many traders. By eliminating the dependence of the portfolio on the value of this quantity, vega-hedging eliminates this risk, allowing the trader to use his nancial models more condently. In many cases vega cannot be measured properly, and the equations above are only truly accurate under certain specic conditions.

An Introduction to Finite Dierence Methods

To start, the domain of the equation is divided up into discrete pieces, known as a mesh. Suppose for example, we are dealing with a 1D problem, and our solution domain is the interval (a, b). We then divide the interval into, say, N , pieces, and for simplicity let us assume that these pieces are of equal length, h, so that h= ba N

The Black-Scholes equation is a PDE with two independent variables; the stock price S and the time t. Thus, we are dealing with a 2D problem, in space (S), and time. The discretisation is quite straight-forward: we split the S dimension into J equal parts, and the time into N equal parts. We then try to nd the approximate solution Vjn for each n = 0, 1, ..., N-1 and j = 0, 1, ..., J-1. Once the mesh has been constructed, we now have to choose which scheme to use to solve the PDE. The choice of numerical scheme is not an exact one, and depends on many factors but three concepts are especially important: Consistency A numerical scheme is said to be consistent if the discretised dierence equation approaches the PDE as the mesh gets ner and ner (i.e. the mesh contains more and more points). Stability A numerical scheme is said to be stable if the solution to the dierence equation approaches the computed numerical solution with increased mesh-size. Convergence A numerical scheme is said to converge if the computed discrete solution approaches the actual solution to the PDE with increasing meshsize. These three concepts are related by a principle known as the Fundamental Equivalence Theorem of Lax: For a well-posed Initial Value Problem, with a consistent discretisation scheme, stability is a necessary and sucient condition for convergence. As a result, in many cases, it is only necessary to ensure the chosen scheme is stable, assuming the scheme is consistent. There are two main types of numerical scheme: Implicit and Explicit schemes. Explicit schemes give equations involving a single unknown mesh-point, allowing a solution at each point to be calculated exactly. Explicit schemes, in principle, are quite straightforward, but in many cases, they have fairly severe limitations on the step-sizes for the scheme to remain stable. The standard approach of using an explicit scheme is to start at a boundary, and calculate the value at each successive step, using knowledge of the value at previous steps: Implicit schemes give equations in more than one unknown mesh-point. This yields a system of linear algebra equations which requires matrix methods to be 7

1 x n, j+1 0 1 0 1 0 1 0 1 0 11 00 x n+1, j 11 00
x n, j

1 x n, j-1 0 1 0
Figure 5: Explicit Methods

used to nd a solution. Implicit schemes have the advantage that they tend to have very lax stability requirements (and in many cases they are unconditionally stable), thus any mesh size can be used, although accuracy then becomes an issue.

1 0x 1 0 n+1, j+1 1 0 11 00 11 00
x n, j

1 0 x n+1, j 1 0 1 0 1 0x 1 0 n+1, j-1

Figure 6: Implicit Methods

All nite dierencing methods involve calculating discrete approximations to the partial derivatives. The cornerstone of nite dierence methods is Taylors Theorem, which in one dimension can be stated as h2 h3 f (x) + f (x) + ... (15) 2 3! Suppose we are trying to solve a PDE in u(x, t), and we have discretised this u(x, t) on a nite mesh of size N x J. Thus, we have a grid of values un . We j then proceed as follows: f (x + h) = f (x) + hf (x) + u h2 2 u + + O(h3 ) x 2! x2 u h2 2 u u(x, y) h + + O(h3 ) x 2! x2

u(x + h, y) = u(x h, y) = Rearranging, we get

u(x, y) + h

u x u x

= =

u(x + h, y) u(x, y) + O(h) h u(x, y) u(x h, y) + O(h) h 8

When discretised, this leads to the equations:

u x u x

= =

un un i+1 i + O(h) h un un i i1 + O(h) h

The rst approximation is called the Forward Dierence Approximation, and the second is the Backward Dierence Approximation. It is also possible to get a second order approximation, by taking a combination of the forward and backward approximations: u u(x + h, y) u(x h, y) = + O(h2 ) x 2h Which, when discretised, gives the Centred Dierence Approximation, which is accurate to the second order: un un u j+1 j1 = + O(h2 ) x 2h Similarly, for time derivatives, we have: u t un+1 un j j + O(k) h un un1 j j + O(k) h un+1 un1 j j + O(k 2 ) 2h (16)

= = =

Higher-order derivatives are approximated in a similar way: 2u x2 2u t2 un 2un + un j+1 j j1 h2 un+1 2un + un1 j j j k2

= =

2.1

Numerical Schemes for the Black-Scholes PDE

Now we move on to consider some numerical schemes for solving the BlackScholes equation 1, which is a second-order, linear, parabolic PDE: V 1 2V V + 2 S 2 + rS rV = 0 2 t 2 S S 9

When considering the choice of numerical scheme for the Black-Scholes equation, we can treat S as if it were a spatial coordinate. Thus, for a European vanilla option, we have the FTCS scheme Vjn+1 Vjn k 1 n n + (j )2 Sj 2
n n +rj Sj n n Vj+1 2Vjn + Vj1 h2 n rj Vjn = 0

n Vj+1 Vjn h

(17)

with boundary conditions V0n VjN


n VJ

= = =

0
n SJ Ker(T t) where n = 0, ..., N -1 N max(Sj K, 0) where j = 0, ..., J-1

The boundary condition along S cannot be represented exactly by nite precision, so in general a fairly large number (perhaps larger than the strike price K by a factor of 5 or more) is used instead. One more small complication arises from the very nature of our problem. The PDE has two boundary conditions (along S = 0 and S ) and a nal condition (along t = T ). This means our solution will involve moving back through time to nd the solution now (at t = 0). Admittedly, this problem is not exactly major, but it is counter-intuitive, and is a possible source of error when it comes to implementing whatever scheme is decided upon. This matter can easily be avoided by a simple transformation of the time variable t t =T t The eect on the PDE is quite minimal, merely changing the sign of the time derivative in the rst term V 1 2V V + 2 S 2 + rS rV = 0 (18) 2 2 S S Now, however, we have two boundary conditions, with an initial condition. This type of problem is quite common, often referred to as an Initial Boundary Value Problem (or IBVP). This means the scheme steps forward through time, as one would intuitively expect. We can write a general form of the Black-Scholes equation as where c = 1 1 2 2 = S 2 10 u 2u u + 2 +a bu = f (x) t x x (19)

a b f (x)

= rS = r = 0

It has already been mentioned that when the leading coecient is small, the Crank-Nicholson becomes somewhat unreliable. This type of problem occurs in uid ow problems, in problems where the diusion is very small. As a result, some research has gone into nding suitable numerical schemes for this type of problem, and the have come to be known as tted methods. The general principle is to change the coecient of the diusion term, in this case, with a quantity known as a tted operator. There are many methods for combining this operator with all the classical numerical schemes, but we will concentrate on a method by Dr. Daniel J. Duy. The scheme is as follows: cn+1 j un+1 un j j k +an+1 j where
n j = n+1 + j

un+1 2un+1 + un+1 j+1 j j1 h2 bn+1 un+1 = 0 j j (20)

un+1 un+1 j+1 j1 2h

han j coth 2

han j 2

(21)

n Note that this j is a completely separate entity from the co-ecient in 1. n j is the tting factor which arises from the use of the Duy scheme 20. is a parameter representing the volatility in the value of the underlying asset in the Black-Scholes model. It is unfortunate that the notation clashes, but confusion can be avoided if care is taken. We can re-arrange the terms of the Crank-Nicholson and Duy schemes as follows:

Crank-Nicholson n k ak k j j 2h2 4h = n k bk j h2 2 n k an k j j + 2h2 4h n k an k j j + 2h2 4h

un+1 + cn j j1

un+1 + j un + j

un+1 j+1 un j+1 (22)

n k ak k j j 2h2 4h

u n + cn j1 j

n k bk j h2 2

Duy
n+1 j an+1 j h2 2h n+1 2j cn+1 j h2 k

un+1 + j1 +

bn+1 2 j

un+1 j cn n j u k j (23)

n+1 j an+1 j + h2 2h

un+1 = j+1

11

or for short Crank-Nicholson


n+1 n+1 n+1 Aj un+1 + Bj un+1 + Cj un+1 j1 j j+1 n n = An un + Bj un + Cj un j j1 j j1

(24)

Duy
n+1 n+1 n An+1 un+1 + Bj un+1 + Cj un+1 = rj un j j+1 j j1 j

(25)

Both numerical schemes are implicit and so, as can be seen, they generate a system of linear equations, which requires some type of linear algebra matrix solvers to nd the solution. this is quite easy to see when the schemes are written in their second form. We now need to discuss the various ways in which these schemes can be solved on a computer, and especially how this problem will map onto a parallel architecture.

Richardsons Deferred Approach to the Limit

Sometimes although a numerical scheme is well-suited to a particular problem, it may not be accurate to a high enough order. In this case we can use a numerical trick which is known as Richardsons deferred approach to the limit to get around this. For illustration purposes, a 1D problem is used to highlight the concepts, as the analysis can easily be generalised to higher dimensions. Let the exact solution to the 1D problem be represented by , and let the rst order approximate solution obtained be given by u(h), where h is the length between mesh-points. u(h) is rst order accurate, and so u(h) = + A1 h + A2 h2 + A3 h3 + . . . A better solution may be obtained by taking a ner mesh. Let the new mesh contain twice the number of points as the rst solution, to get u h 2 = + A1 h 2 + A2 h2 4 + A3 h3 8 + ...

By a simple linear combination of the two solutions, a new approximation can be obtained which cancels the O(h) term, giving a solution which is accurate to O(h2 ). v(h) = 2u h 2 u(h)

h h2 + A2 + . . .) ( + A1 h + A2 h2 + . . .) 2 4 = + B2 h2 + . . . = 2( + A1 12

v(h) is correct to O(h2 ) This is quite easy to implement, requiring a solution for N and 2N meshpoints be generated. The new solution is then calculated point-wise. It is important to note that half of the mesh-points in u h are never used, since 2 they do not have corresponding values in the u(h). In principle, this analysis can be extended to cancel the O(h2 ), O(h3 ), etc. terms by generating enough solutions at dierent mesh-sizes, and then using a linear combination so that all the lower-order corrections cancel. Richardsons approach is a very good way of verifying that a scheme is of the expected order of accuracy since if a scheme is not, the analysis breaks down, and the supposedly higher-order solution obtained will be utter garbage. In many cases, this technique is used to generate solutions which approximate h , which is, in principle, an exact solution.

13

4
4.1

Results
Accuracy

We compared the Crank-Nicholson scheme to the Fitted Duy scheme by plotting them both (and their derivatives) against the exact solution. Figs (7 13) show the plots of the two schemes against the exact solution. In all the solutions shown, the mesh-size was the same S = 0.001 t = 0.001 The rst three graphs (Figs 7 9) are solutions for the relatively normal conditions = 0.10 and r = 0.05. The rst three graphs (Figs 11 13) are for the more extreme conditions = 0.10 and r = 0.05.
0.25 "Sol_Exact.crs" "Sol_CN_Bal.crs" "Sol_Duff_Bal.crs"

0.2

0.15

0.1

0.05

0 0.8

0.85

0.9

0.95

1.05

1.1

1.15

1.2

Figure 7: Call Option Value: = 0.1, r = 0.05

It can be seen quite easily that there is a problem with spurious oscillations for the more extreme case. In an attempt to perform a quantiable error-analysis, we examined the relative error: Err =

dS dt (xerr xex )2 W (S, t) dS dt x2 W (S, t) ex

where W (S, t) is a weighting function over the solution domain. This integral is quite easy to calculate over the domain, and so not be too computationally intensive. It also has the benet that any spurious oscillations should become apparent in this calculation. This error calculation was performed for the Call value, as well as for C , C and C . The results are shown below, along with execution times and mesh-size.

14

1.2 "Del_Exact.crs" "Del_CN_Bal.crs" "Del_Duff_Bal.crs" 1

0.8

0.6

0.4

0.2

0 0.8

0.85

0.9

0.95

1.05

1.1

1.15

1.2

Figure 8: Delta: = 0.01, r = 0.05

Quantity 100x100 Timing C C C C 0.211 7.208e-05 0.019 6.978 886.2

CN 500x500 5.438 1.610e-05 0.062 53.44 1066.2

1000x1000 21.883 1.126e-05 0.118 89.35 1243.4

100x100 0.258 3.122e-05 0.004 0.810 2.794

Duy 500x500 6.578 9.840e-06 0.003 0.979 1.146

1000x1000 26.250 8.275e-06 0.003 0.995 1.065

Table 1: Error analysis and performance analysis for = 0.1 and r = 0.05

Quantity 100x100 Timing C C C C 0.203 1.060e-04 0.032 3.516 13.780

CN 500x500 5.414 1.637e-05 0.024 5.145 6.010

1000x1000 21.844 1.060e-05 0.018 4.716 4.782

100x100 0.250 4.113e-05 0.005 0.792 0.847

Duy 500x500 6.711 1.052e-05 0.003 0.947 0.915

1000x1000 27.117 8.520e-06 0.004 0.982 0.954

Table 2: Error analysis and performance analysis for = 0.01 and r = 0.15

15

14 "Gam_Exact.crs" "Gam_CN_Bal.crs" "Gam_Duff_Bal.crs" 12

10

-2 0.8

0.85

0.9

0.95

1.05

1.1

1.15

1.2

Figure 9: Gamma: = 0.1, r = 0.05

0.1 0.09 0.08 0.07 0.06 0.05 0.04 0.03 0.02 0.01 0 0.8 "The_Exact.crs" "The_CN_Bal.crs" "The_Duff_Bal.crs"

0.85

0.9

0.95

1.05

1.1

1.15

1.2

Figure 10: Theta: = 0.1, r = 0.05

16

0.07 "Sol_Exact.crs" "Sol_CN_Bal.crs" "Sol_Duff_Bal.crs" 0.06

0.05

0.04

0.03

0.02

0.01

0 0.96 0.98 1 1.02 1.04

Figure 11: Call Option Value: = 0.01, r = 0.15

1.2 "Del_Exact.crs" "Del_CN_Bal.crs" "Del_Duff_Bal.crs" 1

0.8

0.6

0.4

0.2

0 0.96 0.98 1 1.02 1.04

Figure 12: Delta: = 0.01, r = 0.15

17

60 "Gam_Exact.crs" "Gam_CN_Bal.crs" "Gam_Duff_Bal.crs" 40

20

-20

-40

-60 0.96 0.98 1 1.02 1.04

Figure 13: Gamma: = 0.01, r = 0.15

0.18 "The_Exact.crs" "The_CN_Bal.crs" "The_Duff_Bal.crs"

0.16

0.14

0.12

0.1

0.08

0.06

0.04

0.02

0 0.96 0.98 1 1.02 1.04

Figure 14: Theta: = 0.01, r = 0.15

18

Various Symbols

S is the price of the asset (the underlying). P is the price of a put on that asset. C is the price of a call on that asset. K is the strike price of the option. r is the risk-free interest rate. is the volatility of the underlying T is the total lifetime of the option. t is the time since the option was bought.

19

Anda mungkin juga menyukai