2025-05-09 03:40:39
This post is part of a series of articles on the Finite Difference Method, with other posts in the series focusing on solving the heat equation/diffusion equation explicitly, the implicit Crank-Nicolson method, and solving tridiagonal matrix systems using Thomas's algorithm.
This is the first in a multi-part tutorial series on using Finite Difference Methods (FDM) to numerically solve parabolic partial differential equations. In particular, the heat equation will be solved. Given that the Black-Scholes pricing equation can be transformed into a heat equation, these methods can be applied to solve the equation numerically.
If we let
The Finite Difference Method provides a numerical solution to this equation via the discretisation of its derivatives. The derivatives will be approximated via a Taylor Series expansion. Recall that a Taylor Series provides a value for a function
Note that
In a similar manner, we can determine f when the dependent variable x is translated by an identical amount
These two equations when rearranged allow a first order approximation for the derivative
In addition, subtracting the backward Taylor expansion from the forward Taylor expansion provides a second order approximation for the derivative
To obtain a second order approximation for the second derivative of
Now that the derivatives have been approximated in a one-dimensional continuous setting, it is time to discretise the domain of the heat equation. The function f is now a function of two real variables x and t which represent space and time, respectively. The function
The 1D continuous bar can be discretised into I separate points
Note that the superscript n does not refer to a power of f or its nth derivative, instead it refers to its value at the time
They are, respectively, the forward difference, backward difference, centered difference and centered second difference.
Given that the differences are approximations it is natural to question how errors can arise in the overall solution. In fact, two types of errors can occur. They are the truncation error and the roundoff error. Truncation error is the error associated with the discretisation of the derivatives, i.e. those occuring due to the additional higher order derivative terms.
Roundoff error is that which occurs due to the precision of the solution being stored on a computer. Usually double precision floating point values are used which store 16 digits for each value. These errors can accumulate, particularly if single precision is used, which only stores 8 digits for floating point values.
In the next tutorial the heat equation will be solved numerically. It will be seen how truncation error can rapidly accumulate if certain conditions are not enforced.
Reference: Derivative Approximation via Finite Difference Methods
From https://www.quantstart.com/articles/Derivative-Approximation-via-Finite-Difference-Methods/
2025-01-10 10:12:01
2024-05-31 03:06:49
2024-05-28 03:09:25
There are many other interesting articles, try selecting them from below.
2025-03-10 01:39:46
2023-09-20 02:39:12
2024-03-18 04:29:28
2023-11-23 10:13:04
2025-03-12 05:01:12
2025-04-18 08:16:25
2025-01-23 09:21:51
2023-11-06 11:34:51
2025-03-13 05:03:55