An Introduction to ADI and Splitting Schemes - Stéphane Crépey's

In this book we look at finite difference methods for such problems and ... extend the methods to handle convection–diffusion equations in general (and Black–Scholes in ... To this end, we use some notation for difference operators in the x and y ..... We have given an introduction to Alternating Direction Implicit (ADI) and ...
371KB taille 154 téléchargements 141 vues
< Day Day Up >

Chapter 20: An Introduction to ADI and Splitting Schemes 20.1INTRODUCTION AND OBJECTIVES In this chapter we discuss how to apply finite difference schemes to approximate the solution of multidimensional diffusion equations. In general, an exact solution to these problems is not possible to find, and even when an exact solution is known it is complicated to evaluate. Our interest is in applying and extending the schemes from previous chapters in this book to multi-factor problems. Some typical applications are: Asian options (payoff depends on the underlying S and the average price of S over some prescribed period) Multi-asset options (for example, basket options and options with two underlyings) Convertible bonds (bond price is a function of the underlying S and the (stochastic) interest rate r) Multidimensional interest rate models. In general, each of the above models can be subsumed under the general parabolic partial differential equation (Bhansali, 1998) (20.1)

Here we see that the derivative quantity V is a function of n underlyings. Furthermore, these underlyings may be correlated. As discussed in Bhansali (1998), the rate of change of V with respect to time may be written as the sum of three elements (20.2)

(20.3)

(20.4)

Of course, we must provide initial (terminal) and boundary conditions in order to produce a unique solution to (20.1). As there is no explicit formula for the solution in general, we must resort to approximate methods. In this book we look at finite difference methods for such problems and concentrate on two-factor equations (that is where n = 2 in equation (20.1)). In particular, we first of all discuss discretising all variables in (20.1) simultaneously, and we show the consequences of such an approach. In particular, we encounter the curse of dimensionality because solving two-factor equations by a straightforward finite difference scheme leads to large systems of equations that are difficult (but not impossible) to solve. Another approach is to reduce the multidimensional problem to a series of one-dimensional sub-problems where each sub-problem corresponds to one specific underlying variable. For this latter case we discuss two major approaches called Alternating Direction Implicit (ADI) and splitting (or splitting up) methods, respectively. In this chapter we shall concentrate on the heat equation in a rectangle in order to motivate the ADI and splitting methods. Furthermore, we focus on Dirichlet conditions only. In the next chapter we shall extend the methods to handle convection–diffusion equations in general (and Black–Scholes in

particular). Understanding how ADI and splitting methods work for the heat equation will help you to appreciate similar schemes for convection–diffusion and Black–Scholes equations.

< Day Day Up >

< Day Day Up >

20.2A MODEL PROBLEM In this chapter we focus primarily on the two-dimensional heat equation (20.5)

that is defined in some region of (x,y,t) space. In this section we extend the finite difference method that we defined in previous chapters to the case where the continuous (x,y) space is replaced by a two-dimensional mesh. To this end, we use some notation for difference operators in the x and y directions: (20.6)

These operators are just the two-dimensional extensions of the one-dimensional discrete operators of previous chapters. Thus, when approximating the heat equation (20.5) we can choose centred differencing in the x and y directions while we can choose the following options for the time direction: Explicit Euler (EE) Implicit Euler (IE) Crank–Nicolson (CN). For EE, the finite difference scheme becomes (neglecting boundary and initial conditions for the moment) (20.7)

Of course, this is an explicit scheme and stability is only conditional. By a von Neumann stability analysis we can prove that (20.7) is stable if (20.8)

where we assume now that the step sizes in the x and y directions are the same (see Peaceman, 1977). Rewritingequation (20.7) in a different form allows us to write the approximate solution at time level n + 1 in terms of the solution at time level n (20.9) It is then easy to develop some C++ code to implement this algorithm without the need to solve a linear system of equations. However, you must keep the constraint (20.8) in mind (you must satisfy it!) otherwise you will get non-realistic results. The IE scheme for (20.5) is given by

(20.10)

This is an unconditionally stable scheme (for all values of k and h) but we see that the solution at time leveln + 1 is defined on both sides of equation (20.10). We must resort to some kind of matrix solver if we wish to find this solution. A good treatment is given in Peaceman (1977). For the heat equation we get a system of the form (20.11) If we assume that the x and y regions have been partitioned into N and M intervals, respectively, then the matrix A has N row and M columns if we use Dirichlet boundary conditions. ThusA has a block form. In general, the vector U will have N × M elements, where N is the number of sub-divisions of the x dimension and M is the number of sub-divisions of the y dimension. There are methods for solving systems of the form (20.11) (Peaceman, 1977; Tavella and Randall, 2000) but such a discussion is outside the scope of this book. The methods are very advanced, in my opinion, and there are more effective ways of solving such systems as we shall see in this chapter and the next.

< Day Day Up >

< Day Day Up >

20.3MOTIVATION AND HISTORY We now give a short introduction to the origins and history of the ADI and splitting methods. Like much of numerical analysis, many techniques were developed during the 1960s when the digital computer started to be used to model various industrial, scientific and engineering problems. Some examples are: Reservoir engineering (Peaceman, 1977) Solving the heat equations in several dimensions (Douglas and Rachford, 1955) Problems in hydrodynamics and elasticity (Yanenko, 1971). The ADI method was pioneered in the United States by Douglas, Rachford, Peaceman, Gunn and others. The ADI method has a number of advantages over the methods that are discussed in section 20.2. First, explicit difference methods are rarely used to solve initial boundary value problems due to their poor stability properties. Implicit methods have superior stability properties but unfortunately they are difficult to solve in two or more dimensions. Consequently, ADI methods became an alternative because they can be programmed by solving a simple tridiagonal system of equations in the x and y directions, respectively. During the period that ADI was being developed, a number of Soviet numerical analysts (most notably Yanenko, Marchuk, Samarskii and D’Yakanov) were developing splitting methods (also known as fractional step or locally one-dimensional (LOD) methods) for solving time-dependent partial differential equations in two and three dimensions. It would seem that the financial engineering community tends to use the ADI method when solving multi-factor Black–Scholes equations (see Sun, 1999; Wilmott, 1998) although there is evidence to show that it is inferior to splitting methods, especially when cross-derivatives (correlation terms) must be modelled. Furthermore, great leaps of faith have been taken by some authors who think that numerical recipes that work well for the two-dimensional heat equation can be applied with the same success to convection–diffusion equations in two and three dimensions. Unfortunately, there is evidence to show that ADI performs badly for convection-dominated systems. We shall discuss this particular topic in the next chapter. In this chapter we introduce the ADI and splitting methods for the two-dimensional heat equation and shall also pay a fleeting visit to approximating three-dimensional equations using these methods. However, these are the easiest cases and we must also extend our knowledge to include answers for the following problems: Approximating cross-derivatives in the multi-factor Black–Scholes equation How to handle boundary conditions and determine how their approximation affects accuracy of the scheme Approximating multidimensional convection–diffusion problems Dealing with convection-dominated problems Developing algorithms that we map to C++ code. In particular, we shall address these issues in the next chapter. We concentrate solely on splitting methods in that chapter for the following reasons: I find them more appealing than ADI methods, they tend to perform better, and it would seem that ‘pure ADI’ has gone out of fashion.

< Day Day Up >

< Day Day Up >

20.4BASIC ADI SCHEME FOR THE HEAT EQUATION We shall now introduce the basic ADI scheme for the two-dimensional heat equation, and for the moment shall neglect boundary and initial conditions. The basic idea behind ADI is to replace a twodimensional scheme such as (20.10) (which is implicit in the x and y directions) by two simpler equations, each of which is implicit in one direction only. To this end, we devise what is in fact a kind of predictor–corrector scheme (as discussed in Chapter 11) as follows: (20.12a)

(20.12b)

Here we see the introduction of an intermediate value in equation (20.12a). This equation is implicit in x and explicit in y and hence can be solved by LU decomposition or the Double Sweep method that we examined in Chapter 8. Having found the intermediate value we then calculate the value of the approximate solution at time level n + 1using equation (20.12b). This equation is implicit in y and explicit in x and again can be solved using LU decomposition or the Double Sweep method. It can be shown that the scheme (20.12) is unconditionally stable. Thus there are no restrictions on the mesh size k. The scheme (20.12) is sometimes called the Peaceman–Rachford scheme.

20.4.1Three-dimensional heat equation Let us try to extend the Peaceman–Rachford scheme to three dimensions as follows: (20.13)

(notice that we have suppressed the space indices in (20.13) for readability reasons). A lengthy stability analysis (see Peaceman, 1977) should be that scheme (20.13) is stable if (20.14)

Thus, the three-dimensional version of the Peaceman–Rachford method is not unconditionally stable. The first unconditionally stable ADI method for three dimensions was developed by J. Douglas Jr. and H. Rachford and is given by (20.15)

< Day Day Up >

< Day Day Up >

20.5BASIC SPLITTING SCHEME FOR THE HEAT EQUATION Splitting schemes are more ruthless than ADI schemes in the sense that they reduce a partial differential equation to a series of one-dimensional equations. Each of the latter equations is then approximated by a suitable one-dimensional finite difference scheme. We can choose between explicit and implicit schemes, whereas ADI uses an implicit scheme only. For the two-dimensional heat equation, for example, we define the splitting scheme by solving two legs in one specific direction. In the case of the explicit splitting scheme we get (20.16)

We assume that the mesh size in both x and y directions is a constant h. Then (20.16) is stable under the condition (20.17) (for a proof, see Godunov and Riabenki, 1987). A schematic representation of the above scheme is shown in Figure 20.1 where the explicit nature of the scheme can be clearly seen. The implicit splitting scheme for the two-dimensional heat equation is given by (20.18)

Figure 20.1: Mesh for explicit scheme and its graphical representation is shown in Figure 20.2.

Figure 20.2: Mesh for implicit scheme

20.5.1Three-dimensional heat equation Analysis of the stability of ADI methods shows that approximation with an explicit operator reduces the stability of the scheme. This suggests using an implicit operator at each leg or fractional step (Yanenko, 1971). In order to improve the accuracy of this scheme Yanenko proposes using the weighted scheme (20.19)

For example, in the case = 1/2, the scheme (20.19) has second-order accuracy in both space and time.

< Day Day Up >

< Day Day Up >

20.6APPROXIMATING CROSS-DERIVATIVES In many financial engineering applications we must model cross-derivative terms, for example with various kinds of PDEs for bonds and interest-rate models. To this end, we devise good schemes for handling these terms. The mathematical financial literature is a bit fuzzy on this topic. Let us take the following example: (20.20)

Again, Yanenko states that the ADI method is not applicable to solving (20.20) because its application does not lead to a simple three-point scheme (in fact we get a nine-point scheme). Instead, the following splitting scheme is proposed (20.21)

We conclude our discussion of splitting methods by introducing a predictor–corrector method (compare withChapter 11) for the three-dimensional heat equation. It consists of four equations, the first three of which are predictors in the x,y and z directions while the last equation is a corrector based on the ‘full’ discrete operator: (20.22)

Thus, the predictor is based on a splitting scheme.

< Day Day Up >

< Day Day Up >

20.7HANDLING BOUNDARY CONDITIONS Of course, when solving initial boundary value problems for the heat equation (and for any parabolic equation for that matter) we must model the bounded or unbounded region in which the equation is to be valid. In particular, we must describe the conditions on the solution at the boundary of the region. There are five main issues that we must address: The shape or geometry of the region The kinds of boundary conditions (Dirichlet, Neumann, Robins, linearity) How to approximate the boundary conditions How to incorporate the boundary conditions into the ADI or splitting equations Ensuring that boundary approximation does not adversely affect the stability and accuracy of the difference approximation. We now give a brief discussion of each of these topics and focus on creating the algorithm for the twodimensional heat equation in a rectangular region with Dirichlet boundary conditions. In general, it would seem that ADI and splitting methods are better suited to rectangular regions rather than nonrectangular regions because it is more difficult to approximate function values and their derivatives on curved boundaries than on horizontal or vertical boundaries. In this chapter we concentrate on Dirichlet boundary conditions for the two-dimensional heat equation, how to approximate such conditions and to incorporate them into ADI and splitting schemes. A good discussion of these and other issues can be found in Thomas (1998). In particular, Thomas discusses how to define first-order and second-order approximations to the derivative of the exact solution on the boundary of the region of interest. We now discuss the case of Dirichlet boundary conditions. To this end, we consider the model problem on a unit square:

1. 2. 3.

We rewrite the ADI equations (20.12a) and (20.12b) for the two-dimensional heat equation by grouping known terms on the right-hand side of the equations and unknown terms on the left-hand side: (20.23a)

(20.23b)

In general, there is not much difficulty involved if we wish to calculate the boundary values of the approximate solution at times n and n + 1. The real challenge is to determine suitable boundary conditions for the intermediate value in equations (20.23). To this end, we add the left-hand side of equation (20.23a) to the right-hand side of equation (20.23b) and vice versa. This give us a formula for the intermediate solution in terms of the solution at time levels n and n + 1: (20.24)

This formula allows us to find the appropriate boundary values. For example, in the x direction these will be: (20.25)

Of course, we can find the corresponding boundary conditions in the y direction by plugging in special index values of j in equation (20.24). Equation (20.25) is a second-order (in time) accurate approximation to the boundary condition. An alternative solution is to use the (again) second-order approximation (20.26)

Thus, you may choose between (20.25) and (20.26) as each gives second-order accuracy. See Thomas (1998) for a justification.

< Day Day Up >

< Day Day Up >

20.8ALGORITHMS AND DESIGN ISSUES We now discuss how to solve ADI systems. First, we set up the system of equations, then we describe the solution using some kind of pseudo-code and, finally, we map this pseudo-code to C++. Since ADI is essentially a method for solving an n-dimensional problem as a series of (simpler) one-dimensional problems we would hope that many of our classes and results from previous chapters can also be used in this chapter. This hope is realistic. In particular, we shall be able to reuse the following artefacts: Data structures for vectors and numeric matrices (template classes Vector and NumericMatrix). Furthermore, we will need structures for tridiagonal matrices. Code that generates meshes in one and two dimensions. Mechanisms that implement divided difference schemes in one and two directions. For example, we wish to implement divided differences for first and second derivatives in the x and y directions. Algorithms, schemes and code that solve linear systems of equations, in particular LU decomposition and Double Sweep method (see Chapter 8) in conjunction with tridiagonal matrices. Using the above artefacts improves the quality of our code for ADI in a number of ways. First, this approach improves reliability because we are using code that has already been written, reviewed and tested, albeit in a possibly simpler context. It is hoped that the same code can be used as is in the present context. Second, this approach improves the understandability of the code because we are using the code as façcades or black boxes; you do not need to know about the internals of the code because you just need to use the appropriate interfaces. Finally, the resulting code is maintainable. This means that you can change and modify the source code to suit new wants and needs. For example, the C++ code that implements ADI and splitting schemes can be extended to include models for convection–diffusion equations in general and multi-factor Black–Scholes equations in particular. It may even be possible to extend the two-dimensional schemes and corresponding code to three dimensions. Let’s get down to business. We develop the algorithms that describe the ADI scheme (20.12) or its equivalent representation (20.23). We discuss the algorithm that gets us from the solution U at time leveln to the solution U at level n + 1. We first describe the algorithm in general terms. Once we have done that we then describe the algorithm in more detail so that the cognitive distance between this level of detail and C++ is not too great. The first cut algorithm for solving (20.23) is described by a series of activities: A1: Calculate the right-hand side (RHS) of equation (20.23a) A2: Create the stencil (system of equations) for (20.23a) A3: Solve system of equations (by LU decomposition, for example) A4: Calculate the right-hand side (RHS) of equation (20.23b) A5: Create the stencil (system of equations) for (20.23b) A6: Solve system of equations (by LU decomposition, for example) This approach is based on the algorithms in Thomas (1998). Each of the above activities has input I and output O. It is useful to motivate the information flow by an activity diagram in UML. We develop a somewhat more top-down approach in the first instance in order to scope the problem. To this end, the major input and output from the top-level activity corresponding to equations (20.23) is given in Figure 20.3. We decompose the main activity into two sub-activities, each one corresponding to a ‘leg’(whether it be x or y) in the ADI scheme (20.23). This is shown in Figure 20.4. We now can subsume the activities A1 to A6 above under each leg: Leg 1 consists of activities A1, A2 and A3 while Leg 2 consists of activities A4, A5 and A6.

Figure 20.3: ADI main activity

Figure 20.4: Activity decomposition x and y legs There is a lot of commonality between the eventual code that implements Legs 1 and 2. In fact they share the following common steps: Calculate a RHS vector (A1 and A4) Create a tridiagonal matrix (A2 and A5) Solve the tridiagonal system (A3 and A6). The steps for these algorithms are given in detail in Thomas (1998) in the form of pseudo-code. In our code we can give C++ as an alternative to this pseudo-code.

< Day Day Up >

< Day Day Up >

20.9CONCLUSIONS AND SUMMARY We have given an introduction to Alternating Direction Implicit (ADI) and splitting methods that are used in engineering and science to solve multidimensional partial differential equations. These methods are based on the assumption that a multidimensional problem can be broken down into a series of onedimensional problems. We then solve each sub-problem using the techniques for one-factor equations, already discussed in earlier chapters of this book. We have included this chapter for a number of reasons. First, there is growing interest in ADI as can be seen in the financial literature, and it is probably a good idea to present the essence of the method for a simple but important model problem, namely the two-dimensional heat equation. Second, ADI is a bit overhyped and in some cases it is better to use splitting methods. There is some evidence to show that splitting methods give better results than ADI for two-factor Black–Scholes equations. Third, ADI and splitting methods are easy to understand and to implement and they are preferable to direct methods (as discussed in Tavella and Randall, 2000) in this respect. Thus, these methods are easier to understand for a reader with a non-numerical analysis background. Finally, once you have understood how ADI and splitting methods work for diffusion problems it is relatively easy to move to more complex problem such as multidimensional convection–diffusion PDE and multi-factor Black–Scholes equations. This is the content of the next chapter.

< Day Day Up >

< Day Day Up >

Chapter 21: Numerical Approximation of TwoFactor Derivative Models 21.1INTRODUCTION AND OBJECTIVES In this chapter we discuss how to approximate two-factor derivative models using finite difference schemes. We focus on ADI and splitting methods because they are easy to implement and build on the methods that we developed in Chapter 20. Furthermore, they are easier to understand than directly discretising space and time variables simultaneously (for an introduction to this approach, see Peaceman, 1977, and Tavella and Randall, 2000, for example). The general two-dimensional Black–Scholes equation is given by (21.1)

Here we see that there are three main operators, namely two convection–diffusion operators and a cross-term. These correspond to single-factor models and coupling, respectively. There are many special cases of (21.1) in the numerical analysis and financial literature and we give an introduction to some of these cases and how they are approximated using finite difference schemes. There is a vast literature on this subject (dating from the 1950s) and, in particular, the ADI method is also making inroads in the financial literature. The main issue is how to split a two-dimensional problem into simpler problems, proving that the scheme is stable (or not), avoiding spurious oscillation and proving that the schemes are (reasonably) accurate. We do not pretend to have all the answers but we do give some guidelines and results based on a number of successful models for two-factor problems.

< Day Day Up >

< Day Day Up >

21.2TWO-FACTOR MODELS IN FINANCIAL ENGINEERING We now give some interesting examples of problems in financial engineering that can be approximated by parabolic partial differential equations in two ‘space’ variables. These variables will have a specific meaning depending on the context. For example, options based on the maximum or minimum of two stocks have the space variables based on the variation of the two stocks.

21.2.1Asian options An Asian option is a contract that gives the holder the right to buy the underlying asset for an average price over some prescribed interval. This kind of option is popular in the currency and commodity markets and there are two ways of averaging the value: Arithmetic averaging Geometric averaging If the underlying asset is assumed to be lognormally distributed then the geometric average of the asset will also be lognormally distributed. Arithmetic averaging takes the arithmetic average of the underlying asset. We must also determine when this sampling takes place: Discretely averaged samples Continuously averaged samples. The formulae for the averaging scenarios are shown in equations (21.2) and (21.3) and are well documented in the literature (Haug, 1998; Wilmott et al., 1993). Arithmetic averaging (21.2)

Geometric averaging (21.3)

The corresponding PDEs are given in equations (21.4) and (21.5): (21.4)

Asian option (Arithmetic averaging)

(21.5)

We note that these equations are convection–diffusion in the S variable (thus, of parabolic type) while in the I direction it is essentially a first-order hyperbolic equation: (21.6)

and since we only have a derivative of, at most, order one in the I direction we can only accommodate one boundary condition. Furthermore, centred difference schemes are not suitable (they are weakly stable) and we must resort to one-sided (upwinded) schemes (Peaceman, 1977; Duffy, 1977) that take the so-called characteristic direction of the first-order equations into account.

21.2.2Convertible bonds with random interest rates A convertible bond is like a normal bond except that it may be exchanged for an asset. The exchange is called conversion . The corresponding PDE is: (21.7)

This equation is based on the stochastic differential equations (SDEs) that describe the evolution of the asset and random interest rate: (21.8)

Here, dX1 is a normally distributed random variable with mean 0 and variance dt. The drift µ and volatilitys depend on both the asset price S and time t. For the SDE describing the interest rate, dX 2 is a normally distributed random variable with mean 0 and variance dt. We note that the convertible bond has an underlying asset of either European or American type. In the latter case we note the existence of a free boundary that depends on both the interest rate r and time t (see Sun, 1999). Note the presence of the cross-derivative term in equation (21.7) in which the correlation of the random variables in S and r is given by: (21.9) InChapter 20 we discussed a number of finite difference discretisations for approximating this crossterm.

21.2.3Options with two underlying assets A general PDE that describes a derivative quantity that depends on two underlying assets is given by:

(21.10)

(Topper, 1998). The PDE is played out in a general two-dimensional region D having boundary R. On one part of the boundary we can specify Dirichlet boundary conditions while on its complement we specify Neumann boundary conditions. We must also specify terminal conditions: (21.11)

When the region D is rectangular we can apply finite differences to approximate the space variable, but if it has a more general form we may need to resort to finite element methods (Strang and Fix, 1973; Topper, 1998). In particular, approximating the derivatives of the option variable on curved boundaries is a challenge if we use finite differences.

21.2.4Basket options It is known that there is no known analytical solution to options on baskets and we must thus resort to numerical approximations. A common simplifying technique is to combine the volatilities of the underlying assets and their correlations into a single volatility of the basket. The basket is then treated as a single underlying. In this section we pose the problems as a PDE: (21.12)

in a bounded domain D, as shown in Figure 21.1.

Figure 21.1: Region of integration The corresponding terminal and boundary conditions are given by:

(21.13)

(Topper, 1998) where w is a weight corresponding to each of the underlyings.

21.2.5Fixed-income applications This section is a short introduction to a two-factor model that links instrument-specific cash flows and random prices to the observed term structure of interest rates. As with convertible bonds we assume the following SDEs: (21.14)

wherev is a special variable. If we apply Ito’s lemma we get the following PDE: (21.15)

whereP is the price that we wish to calculate. In general, r, and the µ ’s depend on both r and v (Levin, 2000).

< Day Day Up >

< Day Day Up >

21.3FINITE DIFFERENCE APPROXIMATIONS The two main competing finite difference schemes are ADI and splitting. ADI seems to be more popular than splitting methods in the financial literature, and there are historical reasons for this state of affairs, the main one being that splitting methods originated in the former Soviet Union and many of the original articles may have been difficult to access by western researchers in the past. However, there is anecdotal evidence to show that splitting methods give better results than ADI for two-dimensional convection–diffusion problems (Levin, 2000). We have various choices when approximating a two-factor model: 1. ADI with standard centred differencing 2. Splitting with standard centred differencing 3. ADI with exponential fitting 4. Splitting with exponential fitting. We stress that we are still developing the above kinds of schemes and these will be dealt with in more detail in Duffy (2004b).

< Day Day Up >

< Day Day Up >

21.4ADI SCHEMES FOR ASIAN OPTIONS We rewrite the PDE for an Asian option (21.4) and (21.5) in the slightly more general form: (21.16)

We apply the ADI by discretising (21.16) in two steps. We first proceed from time level n to n + 1/2 by using the implicit exponentially fitted scheme (see Chapter 18) in S and centred differencing in the I direction: (21.17)

wherek,h and m are the mesh sizes in the time, and S and I are variables. This equation can also be written in the form (21.18) which we can solve, for example, by the use of LU decomposition or by the Double Sweep method (see Chapter 8). The next step is to obtain the solution at level n + 1 in terms of the solution at level n + 1/2 by using explicit fitting (see Chapter 18) and the implicit method in the I direction: (21.19)

Again, we can write (21.19) as a tridiagonal system: (21.20)

21.4.1Upwinding In equations (21.17) and (21.19) we have approximated the first-order derivative with respect to the independent variable I by using centred differences. A better approach is to use a one-sided scheme depending on the sign of the coefficient a appearing in equation (21.16). The correct schemes are: (21.21)

Of course, we must augment this problem with Dirichlet boundary conditions.

< Day Day Up >

< Day Day Up >

21.5SPLITTING SCHEMES Let us consider the general two-dimensional equation: (21.22)

whereL is an operator of the form in equation (21.1) and D is some two-dimensional bounded region in which the equation is defined. The function f is a non-homogeneous term defined on D × (0, T). Let us assume that we have finite difference approximations to the components of the operator L. Then our first splitting method (with f = 0) is given by the following sequence of Crank–Nicolson schemes (written in vector form): (21.23)

This set of equations can be solved by iterated LU decompositions, as discussed in Chapter 20 and Thomas (1998). The finite difference schemes defined by the discrete operators in system (21.23) can take various forms depending on the peculiarities of the continuous problem: Use exponential fitting for convection-dominated flow Upwinding for first-order hyperbolic operators Traditional finite difference methods (for example, centred differencing). This represents work in progress. A full discussion is provided in Duffy (2004b).

< Day Day Up >

< Day Day Up >

21.6CONCLUSIONS AND SUMMARY We have given a discussion of how to apply ADI and splitting methods to several two-factor derivatives models. In general, these approximate methods replace a two-dimensional problem into a sequence of simpler one-dimensional problems that we solve using tridiagonal solvers at each time level. Of course, we have to incorporate boundary conditions into the finite difference schemes. We summarise the strengths and weaknesses of the finite difference method. First, the strengths: Easy to map a PDE to a FDM scheme (use divided difference) Stability and convergence properties known Can be applied to a wide range of one-factor and two-factor problems Simpler than FEM or finite volume (less mathematical sophistication required) Is far superior to the binomial method. The difficulties are: Difficult with non-rectangular domains Does not scale well to more than three factors Conventional schemes can show spurious oscillations (in fairness, the same holds for FEM) Lots of tricks to be learned; it is as much an art form as a science.

< Day Day Up >