Numerical Methods in Computational Finance. Daniel J. Duffy. Читать онлайн. Newlib. NEWLIB.NET

Автор: Daniel J. Duffy
Издательство: John Wiley & Sons Limited
Серия:
Жанр произведения: Ценные бумаги, инвестиции
Год издания: 0
isbn: 9781119719724
Скачать книгу
example, theorem 5.2.1 in Øksendal (1998) addresses these issues. We discuss SDEs in more detail in Chapter 13.

      In this section we introduce a class of one-step methods to approximate the solution of ODE system (3.1).

      The first step is to replace continuous time by discrete time. To this end, we divide the interval [0, T] into a number of subintervals. We define upper N plus 1 mesh points as follows:

0 equals t 0 less-than t 1 less-than ellipsis less-than t Subscript n Baseline less-than t Subscript n plus 1 Baseline less-than ellipsis less-than t Subscript upper N Baseline equals upper T period

      In this case we define a set of subintervals left-parenthesis t Subscript n Baseline comma t Subscript n plus 1 Baseline right-parenthesis of size normal upper Delta t Subscript n Baseline identical-to t Subscript n plus 1 Baseline minus t Subscript n, 0 less-than-or-equal-to n less-than-or-equal-to upper N minus 1.

      In general, we speak of a non-uniform mesh when the sizes of the subintervals are not necessarily the same. However, in this book we consider in the main a class of finite difference schemes where the N subintervals have the same length (we then speak of a uniform mesh), namely normal upper Delta t equals upper T slash upper N. The variable h equals upper T slash upper N is also used to denote the uniform mesh size.

      In general, we define y Subscript n to be the approximate solution at time t Subscript n and we write the functional dependence of y Subscript n plus 1 on t Subscript n Baseline comma y Subscript n Baseline and h by:

      where normal upper Phi is called the increment function. For example, in the case of the explicit Euler method, this function is:

normal upper Phi left-parenthesis t comma y comma h right-parenthesis equals f left-parenthesis t comma y right-parenthesis period

      where:

StartLayout 1st Row 1st Column k 1 2nd Column equals f left-parenthesis t comma y right-parenthesis 2nd Row 1st Column k 2 2nd Column equals f left-parenthesis t plus h slash 2 comma y plus one half italic h k 1 right-parenthesis 3rd Row 1st Column k 3 2nd Column equals f left-parenthesis t plus h slash 2 comma y plus one half italic h k 2 right-parenthesis 4th Row 1st Column k 4 2nd Column equals f left-parenthesis x plus h comma y plus italic h k 3 right-parenthesis period EndLayout

      Other methods are:

      Second-order Ralston method:

      and Heun's (improved Euler) method:

      This is a predictor-corrector method that also has applications to stochastic differential equations.

      In general, explicit Runge–Kutta methods are unsuitable for stiff ODEs.

      3.5.1 Code Samples in Python

      The following code is for the methods:

       Explicit Euler

       Fourth-order Runge–Kutta (RK4)

       Second-order Ralston.

       Heun