Path: blob/master/3.2 Variance Gamma model, PIDE method.ipynb
1675 views
The Variance Gamma Partial Integro-Differential Equation
Contents
I suggest the reader to read the notebook 3.1 on the Merton PIDE, and the Appendix A3 for an introduction to the Variance Gamma (VG) process.
The knowledge of the VG process, is not necessary to understand this notebook, which is focused on the numerical solution of a PIDE. In my opinion the wiki page is not that clear, and if the reader is interested to understand something more, I suggest to have a look at the notebooks 1.5 and A3.
Now I'm going to present an approximated equation, whose solution converges to the solution of the original VG equation for . The reason for using an approximation, is that the Lévy measure is singular in the origin. Therefore, we have to remove the singularity from the integration region.
The VG PIDE
The approximated VG PIDE has the following form:
with parameters
and Lévy measure:
where I used the parametrization coming from the Brownian subordination. See equation [35] in A3 or wiki subordinator. If you are reading quickly, and you have no time to study the Brownian subordination, just think of , and as the three parameters of the model.
As I said before, the Lévy measure has a singularity at .
The activity of the VG process is infinite, i.e. . Since the interval is removed from the region of integration, all the parameters defined above are finite!
This equation is almost identical to the Merton PIDE, except for the truncation in the integral.
At this point, we can restrict the computational domain on and the integral region on , following the idea presented in 3.1.
Using the same discretization used for the Merton PIDE, we can solve the problem with the IMEX scheme.
I will not re-write the discrete equation. Everything will be clear (hopefully) from the following python code:
In A3 we defined the "martingale correction" term:
In the previous cell I defined (called W
) just to compare it with . We expect that as .
Following Section 2.3 of A.3, I introduce the auxiliary parameters A and B. They will make the Lévy measure definition more readable.
The extra points are obtained by extraP = int(np.floor(3*dev_X/dx))
, where dev_X
is the standard deviation of the VG process. The choice of 3 stardard deviation is arbitrary, and in the pricer class this number is different (it is 5).
The extra points are the points in the intervals and . In this case we have:
Let us define the cutoff term and the relevant parameters.
Note: The integrals are performed using the function quad
. The integrals are split in the two regions: and
Since we computed we can compute also . We expect that . Due to the limitation of the integral in , the two are not perfectly equal. But for a big enough choice of , , the equality is satisfied, as we can see in the output of the cell below.
Let us inspect better the parameters we obtained:
The parameter (i.e. w) is very different from the theoretical (i.e. W). This is a consequence of the discretization. I showed that the integral of on is almost zero. It follows that the integral in the region is almost equal to .
Ok... now that we have some confidence on this topic, we can continue with the solution of the PIDE. As usual we create the diffusion matrix:
In the following cell, I create the Lévy measure vector.
The three points in the middle are zero! This is because the Lévy measure is truncated near the origin, and the region is excluded.
The following code is the same we used for the Merton PIDE.
All good!!
Alternatively we could have used the Jump matrix. Let us do it for completeness, but remember that the signal.convolve
method is more efficient.
PIDE price: (it takes about 5 minutes to run)
Closed formula:
The semi-closed formula is a complicated expression presented in [1]. I will not describe it here. However, it doesn't work properly. It has a negative bias. Read comments below.
Fourier inversion:
Monte Carlo:
(the output includes the price, the standard error and the execution time)
The function MC
uses the following code.
Put option
Remark:
There are some discrepancies between the outputs of the four numerical methods.
The Monte Carlo and Fourier prices are the most reliable
The convergence of the PIDE, when considering the Brownian approximation, is quite slow.
For the put option we didn't need a huge grid in order to obtain the right price.
But for the call option I had to use a huge grid (30000x30000). I expect to achieve a better convergence level for higher grid resolution, in particular when increasing the number of time steps.
Increasing the computational domain may also help.
The semi-closed formula used in VG_pricer is taken from [1]. In my opinion, this formula is not very accurate. Unfortunately, I was not able to implement the closed formula proposed in the same paper [1], which relies on the Bessel function of second kind (well...I tried, but it doesn't work. In VG_pricer it is called
closed_formula_wrong
). Therefore I decided to use the semi-closed formula, which is based on numerical integration. However, this formula still does not produce very accurate values.
If you have any comment on these features, please let me know.
Comparison with the Black Scholes PDE
Now let us compare the VG curve with the Black Scholes curve, for a European call option. The volatility of the BS model is chosen equal to the standard deviation of the VG process.
In this case I'm going to select some parameters with the purpose to have high values of skewness and kurtosis for the VG distribution. In the VG process, the parameter is associated to the skewness, and the parameter is associated to the kurtosis.
Looking at the plot we can notice the different shape of the two curves.
References
[1] Madan, D., Carr, P., and Chang, E. (1998). "The Variance Gamma process and option pricing". European Finance Review, 2, 79--105.