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

Автор: Daniel J. Duffy
Издательство: John Wiley & Sons Limited
Серия:
Жанр произведения: Ценные бумаги, инвестиции
Год издания: 0
isbn: 9781119719724
Скачать книгу
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 general solution is given by:

upper U Superscript n Baseline equals upper A Superscript n Baseline upper U 0 plus upper B StartFraction 1 minus upper A Superscript n Baseline Over 1 minus upper A EndFraction comma n greater-than-or-equal-to 0

      where we note that upper A Superscript n Baseline identical-to n Superscript italic t h power of constant upper A and upper A not-equals 1.

      In order to prove this, we need the formula for the sum of a series:

1 plus upper A plus ellipsis plus upper A Superscript n Baseline equals StartFraction 1 minus upper A Superscript n plus 1 Baseline Over 1 minus upper A EndFraction comma upper A not-equals 1 period

      For a readable introduction to difference schemes, we refer the reader to Goldberg (1986).

      Contrary to popular thinking, there is more to ODEs than trying to find analytical solutions for them. Very few ODEs have analytical solutions, and we must resort to ODE solvers.