How can I improve the numerical integration accuracy in Heston model?

I am trying to perform the numerical integration in the Heston using Gaussian quadrature but I obtain an error of 4e-3 while some of the deep out-of-the-money near expiry Call prices are smaller than 1e-5. Is there any way I can improve the accuracy without being extremely slow or should I exclude those prices from my calibration ?

• Pretty hard to say without further info. Which Fourier pricing method are you using for instance: 2 integrals as in Heston 93 original paper or 1 integral à la Attari or Joshi-Yang or Lewis-Lipton? Real-life option prices below the cent... I'm a bit surprised, what is the market data you are using ? Aug 9, 2017 at 13:28
• I've tried the original method with Gatheral's CF as wells as Lewis 2000 method. I also tried Attari's. I used the data set I found in a journal paper "Approximation Behooves Calibration" by Andre Ribeiro and Rolf Poulsen which makes the dataset available at math.ku.dk/~rolf/Svend in the files data_1 and data_2. Aug 9, 2017 at 15:20
• Thanks. I see that the input data are IVs not option prices. Thing is, real option prices are quantised (min tick size) such that you'll never observe listed prices that are of the -5 order. That being said, it is important for your pricing method to be accurate (i.e. if you are to price a deep OTM option, you won't just quote 0!). Now in my experience, the best you can do in terms of accuracy for Heston, is using Lord-Kahl optimal alpha inversion + Carr-Madan formulation. However, this may not be the best choice computational wise. Indeed with methods like Attari and the likes (...) Aug 9, 2017 at 15:41
• (...) you can benefit from 'caching' the CF evaluations. Anyway, what kind of gaussian quadrature are you using exactly? Can't you simply decrease the tolerance? Also working in a normalised spot space can decrease numerical problems (e.g. work with spot=1, strike=$K/S_0$ etc. and multiply the end result by $S_0$ to get the price). Sometimes using a BS control variate can also help. Have a look at this: papers.ssrn.com/sol3/papers.cfm?abstract_id=2362968 Aug 9, 2017 at 15:45
• Thank you for the prompt answer and suggestions. Yes, that's exactly what I was trying to do, use the CF caching method. I tried Guass Laguerre and Gauss Legendre quadratures implementd by Fabrice D. Rouah in Matlab. I also tried Matlab's adaptive Lobatto and adaptive Gauss-Kronrod, they work a bit better. Another thing is I am using a equal weight MSE loss function(with prices) for calibration which also significantly affects the model accuracy. ATM and ITM contracts are estimated by the model with an error of less that 1% but the very deep OTM price is sometimes 400% larger. (..) Aug 9, 2017 at 16:22

Use fourier-cosine expansions, first paper by Fang-Oosterlee in 2008.

Very simple to code and exponential convergence affords working accuracy within sub-seconds vs order of magnitude slower under Carr-Madan. For reference precision you can add another order of magnitude.

My VBA implementation is faster and more stable than Carr-Madan in C++ for OTM options

The long list of comments suggests two different issues:

1. Are you measuring your error against market prices? or in other words, are you trying to calibrate Heston parameters to market prices. If yes, it is well known that Heston is not going to match well, which is not too surprising since it has only 5 free parameters.
2. If you measure against some reference Heston model prices (given in the literature), what kind of Gauss quadrature are you referring to? There are many different. Is it adaptive? How many points are used?

Regarding (2), @James suggestion is good. The Cos method is very simple to implement and produces satisfactory results most of the time. What is not always so trivial is to find a good estimate of the truncation interval (the suggestions from the Cos paper are reasonable good starting point). This impacts mostly very out-of-the-money options.

A recent fast quadrature has been proposed in An adaptive Filon quadrature for stochastic volatility models, along with comparison against various other quadratures methods.