Numerical Methods in Computational Finance. Daniel J. Duffy

Чтение книги онлайн.

Читать онлайн книгу Numerical Methods in Computational Finance - Daniel J. Duffy страница 28

Numerical Methods in Computational Finance - Daniel J. Duffy

Скачать книгу

we must resort to some numerical techniques. Approximating (2.28) poses challenges because the resulting difference schemes may also be non-linear, thus forcing us to solve the discrete system at each time level by Newton's method or some other non-linear solver. For example, consider applying the trapezoidal method to (2.28):

      (2.29)u Subscript n plus 1 Baseline equals u Subscript n Baseline plus StartFraction k Over 2 EndFraction left-bracket f left-parenthesis t Subscript n Baseline comma u Subscript n Baseline right-parenthesis plus f left-parenthesis t Subscript n plus 1 Baseline comma u Subscript n plus 1 Baseline right-parenthesis right-bracket n equals 0 comma ellipsis comma upper N minus 1

      where f left-parenthesis t comma u right-parenthesis is non-linear. Here see that the unknown term u is on both the left- and right-hand sides of the equation, and hence it is not possible to solve the problem explicitly in the way that we did for the linear case. However, not all is lost, and to this end we introduce the predictor-corrector method that consists of a set consisting of two difference schemes; the first equation uses the explicit Euler method to produce an intermediate solution called a predictor that is then used in what could be called a modified trapezoidal rule:

      (2.30)StartLayout 1st Row 1st Column Blank 2nd Column Predictor colon u overbar Subscript n plus 1 Baseline equals u Subscript n Baseline plus italic k f left-parenthesis t Subscript n Baseline comma u Subscript n Baseline right-parenthesis 2nd Row 1st Column Blank 2nd Column Corrector colon u Subscript n plus 1 Baseline equals u Subscript n Baseline plus StartFraction k Over 2 EndFraction left-bracket f left-parenthesis t Subscript n Baseline comma u Subscript n Baseline right-parenthesis plus f left-parenthesis t Subscript n plus 1 Baseline comma u overbar Subscript n plus 1 Baseline right-parenthesis right-bracket 3rd Row 1st Column Blank 2nd Column or colon 4th Row 1st Column Blank 2nd Column u Subscript n plus 1 Baseline equals u Subscript n Baseline plus StartFraction k Over 2 EndFraction left-brace f left-parenthesis t Subscript n Baseline comma u Subscript n Baseline right-parenthesis plus f left-parenthesis t Subscript n plus 1 Baseline comma u Subscript n Baseline plus italic k f left-parenthesis t Subscript n Baseline comma u Subscript n Baseline right-parenthesis right-parenthesis right-brace period EndLayout

      The predictor-corrector is used in practice; it can be used with non-linear systems and stochastic differential equations (SDE). We discuss this topic in Chapter 13.

      2.4.3 Extrapolation

StartLayout 1st Row 1st Column Blank 2nd Column upsilon Superscript k Baseline equals u plus italic m k plus 0 left-parenthesis k squared right-parenthesis 2nd Row 1st Column Blank 2nd Column upsilon Superscript k slash 2 Baseline equals u plus m StartFraction k Over 2 EndFraction plus 0 left-parenthesis k squared right-parenthesis period EndLayout

      Then:

w Superscript k slash 2 Baseline identical-to 2 upsilon Superscript k slash 2 Baseline minus upsilon Superscript k Baseline equals u plus 0 left-parenthesis k squared right-parenthesis period

      Thus, w Superscript k slash 2 is a second-order approximation to the solution of (2.1).

      The constant m is independent of k, and this is why we can eliminate it in the first equations to get a scheme that is second-order accurate. The same trick can be employed with the second-order Crank–Nicolson scheme to get a fourth-order accurate scheme as follows:

StartLayout 1st Row 1st Column Blank 2nd Column upsilon Superscript k Baseline equals u plus italic m k squared plus 0 left-parenthesis k Superscript 4 Baseline right-parenthesis 2nd Row 1st Column Blank 2nd Column upsilon Superscript k slash 2 Baseline equals u plus m left-parenthesis StartFraction k Over 2 EndFraction right-parenthesis squared plus 0 left-parenthesis k Superscript 4 Baseline right-parenthesis period EndLayout

      Then:

w Superscript k slash 2 Baseline identical-to four thirds upsilon Superscript k slash 2 Baseline minus one third upsilon Superscript k Baseline equals u plus 0 left-parenthesis k Superscript 4 Baseline right-parenthesis period

      In general, with extrapolation methods we state what accuracy we desire, and the algorithm divides the interval left-bracket 0 comma upper T right-bracket into smaller subintervals until the difference between the solutions on consecutive meshes is less than a given tolerance.

      A thorough introduction to extrapolation techniques for ordinary and partial differential equations (including one-factor and multifactor parabolic equations) can be found in Marchuk and Shaidurov (1983).

      We discuss the following properties of a finite difference approximation to an ODE:

       Consistency

       Stability

       Convergence.

      These topics are also relevant when we discuss numerical methods for partial differential equations.

      In order to reduce the scope of the problem (for the moment), we examine the simple scalar non-linear initial value problem (IVP) defined by:

Скачать книгу