Numerical Methods in Computational Finance. Daniel J. Duffy
Читать онлайн книгу.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:
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 general solution is given by:
where we note that
In order to prove this, we need the formula for the sum of a series:
For a readable introduction to difference schemes, we refer the reader to Goldberg (1986).
2.8 SUMMARY AND CONCLUSIONS
In this chapter we gave an introduction to scalar ODEs and systems of ODEs. The main goal was to help the reader become acquainted with their mathematical and numerical foundations as well as become familiar with the associated notation. We recommend learning the main concepts in this chapter because many of them will be used and needed when we model one-factor and two-factor convection-diffusion-reaction PDEs such as the Black–Scholes equation, for example.
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.