Stability Tests done on Numerical Approaches under Option Pricing (Part 1)

Rancy Chepchirchir
8 min readMar 3, 2023

--

Introduction

Numerical methods are essential tools in modern science, engineering, and finance. They allow for the computation of solutions to complex problems that cannot be solved analytically. However, numerical methods can be susceptible to errors, which can compromise the accuracy and stability of the solution. Stability tests are crucial in ensuring that the numerical method is reliable and can produce accurate results under various conditions. In this essay, we will examine stability tests done on numerical approaches under various studies, focusing on option pricing in finance.

Background

Option pricing, the process of determining the value of an option, is one of the most critical areas of financial mathematics with its applications including; hedging, risk management, and investment strategies. The price of an option is influenced by various factors, including the price of the underlying asset, the strike price, the time to expiration, and the volatility of the underlying asset. The Black-Scholes model, widely used option pricing model, is based on the assumption that the price of the underlying asset follows a geometric Brownian motion. However, the model has several limitations, including the assumption of constant volatility, which is unrealistic in practice. Therefore, various extensions and modifications of the Black-Scholes model have been developed to overcome these limitations, including the binomial model, the trinomial model, the Monte Carlo simulation, and the finite difference method.

Stability Tests

There are several types of stability tests including; the stability of the numerical method, the stability of the numerical solution, and the stability of the algorithm. The stability of the numerical method refers to the ability of the method to produce accurate results as the grid spacing or time step size is decreased. The stability of the numerical solution refers to the ability of the solution to remain bounded as the time step size or grid spacing is decreased. The stability of the algorithm refers to the ability of the algorithm to produce accurate results under various initial conditions, boundary conditions, and model parameters.

The stability of numerical methods is often analyzed using von Neumann stability analysis. This analysis is based on the assumption that the numerical method can be written as a linear difference equation. The difference equation can be expressed in terms of the Fourier modes, which are the eigenfunctions of the difference equation. The von Neumann stability analysis involves computing the amplification factor, which is the ratio of the amplitude of the Fourier mode at the current time step to the amplitude of the Fourier mode at the previous time step.

∣∣∣λΔ0∣∣∣≤1

where λΔt is the amplification factor at time step Δt, λ0 is the amplification factor at time step 0, and the absolute value of the fraction of these two factors must be less than or equal to 1 for numerical stability. The method is considered stable if the amplification factor is less than or equal to 1 for all Fourier modes.

The stability of the numerical solution is often analyzed using the Lax-Richtmyer equivalence theorem. This theorem states that a numerical method is consistent if it converges to the true solution as the grid spacing or time step size is decreased. A numerical method is stable if it is consistent and the solution remains bounded as the grid spacing or time step size is decreased.

limΔt→0 |u(x, tΔt) − U(x, tΔt)| p=0

where u(x, tΔt) is the numerical solution of the partial differential equation at time tΔt using a numerical method with a time step of Δt, U(x, tΔt) is the exact solution of the partial differential equation at time tΔt, |⋅|p denotes the Lp norm, and the limit must approach zero for the numerical method to be consistent.

The stability of the algorithm is often analyzed using numerical experiments. The algorithm is tested under various initial conditions, boundary conditions, and model parameters. The accuracy and stability of the algorithm are assessed by comparing the numerical results with the analytical solution or with experimental data.

Option Pricing Stability Tests

In option pricing, stability tests are essential in ensuring that the numerical methods used to compute option prices are reliable and can produce accurate results under various conditions. The most commonly used numerical methods for option pricing are the binomial method, the trinomial method, the finite difference method, and Monte Carlo simulation. Each of these methods has its strengths and weaknesses, and stability tests are needed to assess their performance under various conditions.

Binomial Method Stability Tests

The binomial method is a discrete-time, lattice-based method for option pricing. It is based on the assumption that the price of the underlying asset can only move up or down by a certain percentage over each time step. The binomial method is simple to implement and can produce accurate results for options with low volatility and short time to expiration. However, the method can be computationally intensive for options with high volatility and long time to expiration. Stability tests for the binomial method can be done using the von Neumann stability analysis. The amplification factor is given by:

A = 1 + 1/2 (ΔtσS)² − 1/2 rΔtS

where Δt is the time step size, σ is the volatility of the underlying asset, S is the price of the underlying asset, and r is the risk-free interest rate. The binomial method is stable if A ≤ 1 for all possible values of S and Δt. The stability test shows that the binomial method is conditionally stable, which means that the time step size must be small enough to ensure stability.

Trinomial Method Stability Tests

The trinomial method is a modification of the binomial method that allows for the price of the underlying asset to move up, down, or stay the same over each time step. The trinomial method is more accurate than the binomial method and can produce accurate results for options with higher volatility and longer time to expiration. However, the trinomial method can be computationally intensive, especially for options with a large number of time steps. Stability tests for the trinomial method can also be done using the von Neumann stability analysis. The amplification factor is given by:

A = 1 + 1/2 (ΔtσS)² − rΔtS+1/2 [(ΔtσS)²+2rΔtS]^1/2

The trinomial method is stable if A ≤ 1 for all possible values of S and Δt. The stability test shows that the trinomial method is conditionally stable, which means that the time step size must be small enough to ensure stability.

Finite Difference Method Stability Tests

The finite difference method is a numerical method that discretizes the differential equation governing the option price. The method can handle a wide range of option types and can produce accurate results for options with any level of volatility and time to expiration. However, the method can be computationally intensive, especially for options with complex payoffs.

Stability tests for the finite difference method can be done using the Lax-Richtmyer equivalence theorem. The method is consistent if it converges to the true solution as the grid spacing or time step size is decreased. The method is stable if it is consistent and the solution remains bounded as the grid spacing or time step size is decreased.

Monte Carlo Simulation Stability Tests

Monte Carlo simulation is a numerical method that simulates the random motion of the underlying asset and computes the option price by averaging the payoff over a large number of simulations. The method can handle a wide range of option types and can produce accurate results for options with any level of volatility and time to expiration. However, the method can be computationally intensive, especially for options with complex payoffs.

Stability tests for Monte Carlo simulation can be done using the central limit theorem. The theorem states that the distribution of the sample average approaches a normal distribution as the sample size increases, regardless of the underlying distribution of the random variable. The stability test shows that Monte Carlo simulation is stable, which means that the method can produce accurate results with a large number of simulations.

In addition to stability tests, there are other performance metrics used to evaluate the numerical methods used for option pricing. These include accuracy, speed, and convergence. Accuracy measures how close the numerical solution is to the true solution, while speed measures the time it takes to compute the option price. Convergence measures how quickly the numerical method approaches the true solution as the time step size or grid spacing is decreased.

Stability Tests in Other Fields

Stability tests are not limited to option pricing in finance. They are used in other fields where numerical methods are used to solve differential equations, partial differential equations, and other mathematical models. Some examples include:

i.) Computational fluid dynamics: Stability tests are used to evaluate the performance of numerical methods used to simulate fluid flows. The methods must be stable to ensure that the simulation results are accurate and reliable.

ii.) Finite element analysis: Stability tests are used to evaluate the performance of numerical methods used to solve structural and mechanical problems. The methods must be stable to ensure that the results are accurate and reliable.

iii.) Electromagnetic simulations: Stability tests are used to evaluate the performance of numerical methods used to simulate electromagnetic fields. The methods must be stable to ensure that the simulation results are accurate and reliable.

Here is an example of how you could implement a stability test for a simple numerical method in Python using synthetic data. Suppose we have a differential equation of the form:

dy/dt = f(y)

where y is a vector of state variables and f(y) is a vector of functions that define the dynamics of the system.

We can use a numerical method such as the Euler method to solve this equation. The Euler method is a simple, first-order method that approximates the solution of the differential equation using discrete time steps. To test the stability of the Euler method, we can generate synthetic data by simulating the differential equation using different time step sizes and initial conditions. We can then compare the results of the numerical solution with the true solution to see how accurately the Euler method approximates the true solution and whether the results are stable across different time step sizes and initial conditions. Here is an example of how you could implement this test in Python:

import numpy as np
import matplotlib.pyplot as plt

# Define the differential equation
def f(y):
return -y

# Define the true solution
def y_true(t, y0):
return y0*np.exp(-t)

# Define the Euler method
def euler(f, y0, t, dt):
y = np.zeros(len(t))
y[0] = y0
for i in range(1, len(t)):
y[i] = y[i-1] + dt*f(y[i-1])
return y

# Generate synthetic data
y0 = 1.0
t = np.arange(0, 10, 0.01)
dt_list = [0.1, 0.01, 0.001, 0.0001]
y_true_data = y_true(t, y0)
euler_data = {}
for dt in dt_list:
euler_data[dt] = euler(f, y0, t, dt)

# Plot the results
fig, ax = plt.subplots()
ax.plot(t, y_true_data, label='True Solution')
for dt, y_euler in euler_data.items():
ax.plot(t, y_euler, label=f'Euler Method (dt={dt})')
ax.set_xlabel('Time')
ax.set_ylabel('y')
ax.legend()
plt.show()

Here, we define a.) the differential equation dy/dt = -y, where y is a single state variable, and b.) the true solution to this equation as y_true(t, y0) = y0*exp(-t), where y0 is the initial condition. We then define the Euler method as euler(f, y0, t, dt), which takes the function f, the initial condition y0, an array of time steps t, and a time step size dt as inputs, and returns an array of approximate solutions. We then generate synthetic data by simulating the differential equation using the true solution and the Euler method with different time step sizes. We plot the results of the true solution and the Euler method solutions with different time step sizes to see how accurately the Euler method approximates the true solution and whether the results are stable across different time step sizes.

This is just a simple example, but the same general approach can be used to test the stability of more complex numerical methods for solving differential equations, partial differential equations, and other mathematical models.

P.S. Just realized if I’m to do empirical implementations under option pricing, the post’d be too long..I will illustrate these concepts with simulated data in part 2.

Thanks again!

--

--