Discretizing the Heston Mixed Derivative on a Nonuniform Grid
Summary
The document describes a numerical implementation question about solving the Heston option-pricing equation with an alternating direction implicit finite-difference scheme. The equation is split into operators for the asset-price direction, variance direction, and their correlated mixed derivative. The author asks how to construct the mixed-derivative matrix on a nonuniform grid, adapting a stencil used for uniform spacing, and reports a discrepancy of about 10 percent.
The text supplies a proposed four-corner stencil whose coefficients depend on local asset-price and variance spacing, but it does not establish that this discretization is correct or provide a resolution. It also gives no benchmark, convergence study, or explanation for the observed error. Readers can learn which cross-partial term arises from correlation in the Heston model and why handling nonuniform spacing matters, while treating the proposed coefficient pattern as an unresolved implementation attempt rather than a validated method.
Key ideas
- The Heston pricing operator includes a mixed asset-price and variance derivative weighted by correlation.
- The ADI scheme splits the pricing operator into components for the asset and variance directions and their cross term.
- A nonuniform grid requires local spacing in both dimensions when discretizing the mixed derivative.
- The document presents a four-corner stencil as a question and does not verify its accuracy or resolve the reported discrepancy.
Tags
Full text
# Finite difference method for the Heston model using the ADI scheme
# Finite difference method for the Heston model using the ADI scheme
I am trying to implement the ADI FDM scheme for the heston and I am following The Heston Model and Its Extensions in Matlab and C#. They have the scheme:
$$U'(t) = \textbf{L}U(t),$$
$$\textbf{L} = A_0 + A_1 + A_2$$
$$ \begin{aligned} & \mathbf{A}_0=\rho \sigma v S\left(\frac{\partial U}{\partial S \partial v}\right)_{N \times N} \\ & \mathbf{A}_1=(r-q) S\left(\frac{\partial U}{\partial S}\right)_{N \times N}+\frac{1}{2} v S^2\left(\frac{\partial^2 U}{\partial S^2}\right)_{N \times N}-\frac{1}{2} r(U)_{N \times N} \\ & \mathbf{A}_2=\kappa(\theta-v)\left(\frac{\partial U}{\partial v}\right)_{N \times N}+\frac{1}{2} \sigma^2 v\left(\frac{\partial^2 U}{\partial v^2}\right)_{N \times N}-\frac{1}{2} r(U)_{N \times N} \end{aligned} $$
In their matlab code for the NON-uniform grid, they have:
The issue I have is that they don’t include the $\frac{\partial^2 U}{\partial S \partial v}$ component. My guess is that is we utilise something like this (in python):
```
I_sv = np.where(csv==1)[0]
for k in range(length(I_sv)):
d_vs = (Si[I[k+1]] - Si[I[k]]) * (Vi[I[k]]- Vi[I[k-Ns]])
derSV[I[k],I[k-Ns+1]] = -Vi[I[k]] * Si[I[k]] / (4*d_vs)
d_vs = (Si[I[k+1]] - Si[I[k]]) * (Vi[I[k+Ns]]- Vi[I[k]])
derSV[I[k],I[k+Ns+1]] = Vi[I[k]] * Si[I[k]] / (4*d_vs)
d_vs = (Si[I[k]] - Si[I[k-1]]) * (Vi[I[k+Ns]]- Vi[I[k]])
derSV[I[k],I[k+Ns-1]] = -Vi[I[k]] * Si[I[k]] / (4*d_vs)
d_vs = (Si[I[k]] - Si[I[k-1]]) * (Vi[I[k]]- Vi[I[k-Ns]])
derSV[I[k],I[k-Ns-1]] = Vi[I[k]] * Si[I[k]] / (4*d_vs)
```
This is based on the fact that for their UNIFORM grid, they used:
So I have used the similar format of the uniform grid by adjusting $dv$ & $ds$. But have an error % of about 10%, which is quite large. Anyone have any ideas?Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.