Numerical Methods in Computational Finance. Daniel J. Duffy

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

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

Numerical Methods in Computational Finance - Daniel J. Duffy

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

ellipsis comma n"/> are arbitrary constants and g left-parenthesis t right-parenthesis is a particular integral. In this case we can employ exponential fitting by fitting the dominant eigenvalues which can be computed by the Power method, for example.

      If we assume that the real parts of the eigenvalues are less than zero, we can conclude that the solution tends to the steady-state. Even though this solution is well-behaved the cause of numerical instabilities is the presence of quickly decaying transient components of the solution caused by the dominant eigenvalues of the matrix A in (2.45).

StartLayout 1st Row 1st Column Blank 2nd Column StartFraction d Over italic d t EndFraction StartBinomialOrMatrix y 1 Choose y 2 EndBinomialOrMatrix equals Start 2 By 2 Matrix 1st Row 1st Column minus alpha 1 2nd Column 0 2nd Row 1st Column 0 2nd Column minus alpha 2 EndMatrix StartBinomialOrMatrix y 1 Choose y 2 EndBinomialOrMatrix 2nd Row 1st Column Blank 2nd Column y 1 left-parenthesis 0 right-parenthesis equals y 2 left-parenthesis 0 right-parenthesis equals 1 comma 0 less-than-or-equal-to alpha 2 less-than less-than alpha 1 period EndLayout

      The solution of this system is given by:

StartLayout 1st Row 1st Column y 1 left-parenthesis t right-parenthesis 2nd Column equals e Superscript minus alpha 1 t Baseline 2nd Row 1st Column y 2 left-parenthesis t right-parenthesis 2nd Column equals e Superscript minus alpha 2 t Baseline period EndLayout

      The solutions decay at different rates, and in the case of the explicit Euler method the inequality:

normal upper Delta t less-than-or-equal-to StartFraction 2 Over alpha 1 EndFraction

      must be satisfied if the first component of the solution is to remain within the region of absolute stability. Unfortunately, choosing a time step of these proportions will be too small to allow for control over the round-off error in the second component.

      In this case we fit the dominant eigenvalue. For variable coefficient systems and non-linear systems, we periodically compute the Jacobian matrix and carry out fitting on it.

      The presence of different time scales in ODEs leads to a number of challenges when approximating them using the standard finite difference schemes. In particular, schemes such as explicit and implicit Euler, Crank–Nicolson, and predictor-corrector do not approximate these systems well, unless a prohibitively small time step is used. Let us take the example (Dahlquist and Björck (1974)):

StartFraction italic d y Over italic d t EndFraction equals 100 left-parenthesis sine t minus y right-parenthesis comma y left-parenthesis 0 right-parenthesis equals 0

      with exact solution:

y left-parenthesis t right-parenthesis equals StartFraction sine t minus 0.01 cosine t plus 0.01 e Superscript minus 100 t Baseline Over 1.0001 EndFraction period

      This is a stiff problem because of the different time scales in the solution. We carried out an experiment using the explicit Euler method, and we had to divide the interval left-bracket 0 comma 3 right-bracket into 1.2 million subintervals in order to achieve accuracy to three decimal places. The implicit Euler and Crank–Nicolson methods are not much better.

      Robust ODE solvers for stiff system using the Boost C++ library odeint are discussed in Duffy (2018).

StartLayout 1st Row 1st Column Blank 2nd Column italic upper L u identical-to StartFraction italic d u Over italic d t EndFraction plus a left-parenthesis t right-parenthesis u equals f left-parenthesis t right-parenthesis comma 0 less-than normal t less-than upper T 2nd Row 1st Column Blank 2nd Column u left-parenthesis 0 right-parenthesis equals u 0 EndLayout

      where a left-parenthesis t right-parenthesis greater-than-or-equal-to alpha greater-than 0 comma for-all t element-of left-bracket 0 comma upper T right-bracket period

      The reader can check that the one-step methods (Equations (2.10), (2.11) and (2.12) can all be cast as the general form recurrence relation:

upper U Superscript n plus 1 Baseline equals upper A Subscript n Baseline upper U Superscript n Baseline plus upper B Subscript n Baseline comma n greater-than-or-equal-to 0 comma

      where upper A Subscript n Baseline equals upper A left-parenthesis t Subscript n Baseline right-parenthesis comma upper B Subscript n Baseline equals upper B left-parenthesis t Subscript n Baseline right-parenthesis period Then, using this formula and mathematical induction we can give an explicit solution at any time level as follows:

upper U Superscript n Baseline equals left-parenthesis product Underscript j equals 0 Overscript n minus 1 Endscripts upper A Subscript j Baseline right-parenthesis upper U 0 plus sigma-summation Underscript v equals 0 Overscript n minus 1 Endscripts upper B Subscript v Baseline product Underscript j equals v plus 1 Overscript n minus 1 Endscripts upper A Subscript j Baseline comma n greater-than-or-equal-to 1

      with:

product Underscript j equals upper I Overscript j equals upper J Endscripts g Subscript j Baseline identical-to 1 if upper I greater-than upper J

      for a mesh function g Subscript j. A special case is when the coefficients upper A Subscript n and upper B Subscript n are constant left-parenthesis upper A Subscript n Baseline equals upper A comma upper B Subscript n Baseline equals upper B right-parenthesis, that is:

upper U Superscript n plus 1 Baseline equals italic upper A upper U Superscript n Baseline plus upper B comma n greater-than-or-equal-to 0 period

      Then the

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