Numerical Methods in Computational Finance. Daniel J. Duffy
Чтение книги онлайн.
Читать онлайн книгу Numerical Methods in Computational Finance - Daniel J. Duffy страница 33
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).
Let us take an example whose matrix has already been given in diagonal form:
The solution of this system is given by:
The solutions decay at different rates, and in the case of the explicit Euler method the inequality:
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)):
with exact solution:
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
Robust ODE solvers for stiff system using the Boost C++ library odeint are discussed in Duffy (2018).
2.7 INTERMEZZO: EXPLICIT SOLUTIONS
A special case of an initial value problem is when the number of dimensions n in an initial value problem is equal to 1. In this case we speak of a scalar problem, and it is useful to study these problems if one wishes to get some insights into how finite difference methods work. In this section we discuss some numerical properties of one-step finite difference schemes for the linear scalar problem:
where
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:
where
with:
for a mesh function
Then the