Forward Variance Models and Calibration

The modern rough volatility models adopt a forward variance curve terminology (see for example this paper on a rational approximation for the rough Heston, or this presentation on affine forward variance models or this paper on affine forward variance models). In this form, the rough Heston model reads:

According to the litterature, the initial forward variance curve is typically built from the implied volatilities through the variance swap replication: for each maturity, the price of a newly issued variance swap is computed to this maturity, using the implied volatilities for this maturity. Then we may compute the forward variance by interpolating linearly the variance swap prices and differentiating. This leads to the plot below.

Forward variance curves for SPX500 as of October 2024.

One immediate question is how much does the truncation range play a role in this forward variance curve? Above, we plot the replications prices based on filtering the input data up to 10 Delta / 90 Delta for each maturity. Beyond this range, liquidity is usually much lower and the reliability of the input quotes may not be as good. The short end, and not so short forward variance up to 4 years is quite different. The long end is more aligned with something that looks like a basis spread between the two curves.

We may also calibrate the forward variance curve model directly to the implied volatilities during the model calibration, at the same time as the other stochastic volatility parameters (using a time-dependent correlation and vol-of-vol). This time-dependent Heston parameterization has effectively 3 parameters per expiry. In this case, we may want to also filter the input data to focus on the 10 Delta / 90 Delta range as we expect the stochastic volatility model to fit well where it matters the most - where the vanillas are liquid.

In the figure above, we also plot the forward variance curve implied by the model, through a calibration against vanilla options. We can see it is again quite different. If we were to use the true replication based forward variance curve, we would effectively attempt to fit far away vols in the wings, which somehow seems wrong. Now if the model was able to fit everything well there would be no issue, but with 3 parameters per maturity, a choice has to be made. And the choice of the full replication does not look particularly great, as we fit exactly something that is not liquid.

A Not So Great New Simulation Scheme for the Heston Model

I recently saw a news about a great new simulation scheme for the Heston model by Abi Jaber. The paper suggests it is better than the popular alternatives such as the QE scheme of Leif Andersen. Reading it quickly, perhaps too quickly, I had the impression it would be more accurate especially when the number of time-steps is small.

The scheme is simple to implement so I decided to spend a few minutes to try it out. I had some test example for the DVSS2X scheme pricing a vanilla at-the-money option with Heston parameters v0=0.04, kappa=0.5, theta=0.04, rho=-0.9, sigma=1.0, and a time to maturity of 10 years. I don’t remember exactly where those parameters come from, possibly from Andersen paper. My example was using 8 time-steps per year, which is not that much. And here are the results with 1M paths (using scrambled Sobol):

N Scheme Price Error
1M DVSS2X 13.0679 -0.0167
IVI 13.0302 -0.0545
4M DVSS2X 13.0645 -0.0202
IVI 13.0416 -0.0431

With Sobol scrambling and 1 million paths, the standard error of the Monte-Carlo simulation is lower than 0.01 and the error with this new IVI scheme is (much) larger than 3 standard deviations, indicating that the dominating error in the simulation is due to the discretization.

It is not only less accurate, but also slower, because it requires 3 random numbers per time-step, compared to 2 random numbers for QE or DVSS2X. The paper is very well written, and this small example may not be representative but it does cast some doubts about how great is this new scheme in practice.

While writing this, I noticed that the paper actually uses this same example, it corresponds to their Case 3 and it is indeed not obvious from the plots in the paper that this new IVI scheme is significanly better. There is one case, deep in the money (strike=60%), and very few time-steps (2 per year for example):

N Steps/Year Scheme Price Error
4M 2 DVSS2X 44.1579 -0.1721
IVI 44.2852 -0.0449
4 DVSS2X 44.2946 -0.0353
IVI 44.3113 -0.0187
8 DVSS2X 44.3275 -0.0025
IVI 44.3239 -0.0061

So the new scheme works reasonably well for (very) large time-steps, better than DVSS2 and likely better than QE (although, again, it is around 1.5x more costly). For smaller steps (but not that small), it may not be as accurate as QE and DVSS2. This is why QE was such a big deal at the time, it was significantly more accurate than a Euler discretization and allowed to use much less time-steps: from 100 or more to 10 (a factor larger than 10). IVI may be an improvement for very large step sizes, but it will matter much less for typical exotics pricing where observation dates are at worst yearly.

Update June 19, 2025 Out of curiosity I wondered how it behaved on my forward start option test. In the Table below I use 4M paths.

Scheme Steps/Year Price
DVSS2X 4+1 0.0184
80 0.0196
QE 4+1 0.0190
160 0.0196
IVI 4+1 0.0116
80 0.0185
160 0.0191

Clearly, the IVI scheme is not adequate here, it seems to converge very slowly. The price with 4+1 steps is very off, especially compared to the other schemes. The implementation is fairly straighforward, so the IVI scheme may well have a flaw.

Expansions for the time-dependent Heston model: Useless?

Fabrice Rouah wrote two books on the Heston model: one with C# and Matlab code, and one with VBA code. The two books are very similar. They are good in that they tackle most of the important points with the Heston model, from calibration to simulation. The calibration part (chapter 6) is a bit too short, it would have been great if it presented the actual difficulties with calibration in practice and went more in-depth with the techniques.

There is a full chapter on the time-dependent Heston model and it presents there the expansion of Benhamou, Gobet and Miri. The code is relatively annoying to write, so it’s great to have code available for it in the book. It is not so common for books to give source code with it, if you read the free access pages on Wiley’s website, you can download the source code.

Also the methodology used is the correct one to follow: first, reproduce the numbers of the original paper, second, use the approximation in a concrete calibration. There are however two major problems:

  • The code has errors.
  • The expansion is not really good in practice.

There are two errors in the code: one in the cross derivative of PHIgxy2 (first order on x and second order on y), and one in the second order cross derivative of the Black-Scholes price dPdx2dy2.

PHIgxy2 =  (1/2)*y^(-2)*(phigx*(f+g/2-f^2*g/2) + phig*(fx+gx/2-f*fx*g/2-f^2*gx/2));
should be
PHIgxy2 =  -(3/2)*y^(-2.5)*phig*(1-f*g)/2 + y^(-1.5)*phigy*(1-f*g)/2 - y^(-1.5)*phig*fy*g/2 - y^(-1.5)*phig*f*gy/2;

and

dPdx2dy2 = K*exp(-rf*T(NT))*PHIfx2y2 - exp(-q*T(NT))*S*(PHIgy + 2*PHIgxy + PHIgx2y + PHIgy2 + 2*PHIgxy2 + PHIgx2y2);

should be

dPdx2dy2 = K*exp(-rf*T(NT))*PHIfx2y2*PHIfx2y2 - exp(-q*T(NT))*S*(PHIgy2 + 2*PHIgxy2 + PHIgx2y2);

The formula for the piecewise-constant coefficients also contains errors: for example, the total variance variable wT is wrong. It should be a double sum instead of the standard constant Heston like formula. Finally, the many sums are rederived in the book, differently from the paper and are not simplified (unlike in the paper where they are all single sums).

Indeed, with the original code from Rouah, the prices in the table of the paper from Benhamou Gobet and Miri are not reproduced to the last digit. With the above changes, they are.

On the second point, it is surprising that the book does not mention that the approximation is not great. In particular, it does not mention that the calibrated parameters between Table 9.6 and Table 9.3 are vastly different (except for v0). The calibrated smile is plotted, which is great, but it is only plotted with the approximation formula. Plotting the same using the nearly exact semi-analytical representation of vanlla option prices would have been enlightening. We do it below, as Fabrice Rouah gives all the inputs (a very good thing):

DJIA 37 days maturity.

DJIA 226 days maturity.

It looks like in the range the calibration stays in the range of applicability of the formula, which is good, but not necessarily always true. The main issue is however that the calibrated parameters with the approximation are not necessarily a good guess for the parameters of the true time-dependent Heston model, precisely because the actual optimal parameters are way outside the range where the approximation is accurate. This is clear in the 226D plot, the best fit from the approx (which is great) ends up a not so good fit for the real time-dependent Heston model. Somewhat interestingly, the approx is actually not so bad on the actual optimal parameters, gotten from a calibration of the model with the Cos method - it is however a less good fit with the approx than the optimal parameters gotten from a calibration of the model with the approximation.

More recently, Pat Hagan proposed a new approximation for the model, based on a SABR mapping. It seems a bit more precise than the approximation of Benhamou Gobet and Miri, but is not great either. And it is disappointing that the paper does not present any number, nor any plot to assess the quality of the approximation given. Van der Zwaard gives some relatively realistic yet simple set of parameters for the Heston model (using Hagan’s reparameterization with constant expected variance = 1) and on those, the approximated prices of at-the-money options are just not usable:

If we consider his Table 5.9 (maturity = 1.75 year), we have the following

Method Price Error
BGM 4.2206 0.21
Hagan 3.3441 0.66
Reference 4.0039 0

With Table 5.10 (maturity = 1.3 year), it is even worse:

Method Price Error
BGM 0.6659 1.17
Hagan 0.2263 1.61
Reference 1.8407 0

A New Asian Basket Spread Option Approximation

Around 10 years ago, while reading the excellent paper of Etore and Gobet on stochastic Taylor expansions for the pricing of vanilla options with discrete (cash) dividends, I had the idea of a small improvement, by using a more precise proxy for the Taylor expansion.

More recently, I applied the idea to approximate arithmetic Asian options prices by using the geometric Asian option price as a proxy (with some adjustments). This worked surprisingly well, and is competitive with the best implementations of Curran approach to Asian options pricing. I quickly noticed that I could apply the same idea to approximate Basket option prices, and from it obtain another approximation for vanilla options with cash dividends through the mapping described by J. Healy. Interestingly the resulting approximation is the most accurate amongst all other approximations for cash dividends.

During my Easter holidays, I took the time to further extend the idea to cover general spread options such as Asian Basket spread options. I was slightly surprised at the resulting accuracy: the approximation is by far more accurate than any other published approximation on this problem. Somewhat interestingly, I noticed that the first order expansion (which is not much more accurate than the proxy itself) seemed to correspond to a previously published approximation from Tommaso Pellegrino, an extension of Bjerksund-Stensland approximation for spread options, although my derivation is very different and allows for higher-order formulae.

Below is an excerpt of some of the results

Original example from Deelstra et al. for an Basket spread option.

Original example from Deelstra et al. for an Asian Basket spread option. The Taylor approximation perform even better due to the Asianing.

Original example from Martin Krekel for an Asian spread option. It was actually challenging to compute accurate Quasi Monte-Carlo prices.

The MM of Martin Krekel consists in a one-dimensional integration of two lognormal moment-mached distributions. It seems that the one-dimensional integration (which is exact for simple spread options) does not really improve the accuracy for the more general asian spread option case: the loss of accuracy due to moment matching dominates the error.

The preprint is available on Arxiv.

LLMs Are Not Good For Basic Homework

My 12 years old child recently had a presentation to do with 3 other children for school, the subject was food and health. It was particularly difficult to organize the children and one of the children came with a full presentation with text, generated by an LLM (possibly corrected by the parents). At first, I thought this was just cheating and completly useless. Furthermore, he failed to read properly the details of the subject, and much of it wasn’t relevant.

Then they did a second round together, at another parents home. And the outcome was even worse, in that it was even further away from the subject and had equally strong use of LLM.

I decided to try out some LLM queries on this subject (in French) after I installed a few local LLMs via Ollama. Ollama makes it really easy to run an LLM locally. The drawback is that the models have not necessarily been trained very recently, for example Llama 3.2 was trained in 2021 according to itself. I tried Llama 3.2 and Mistral, with respectively 3B and 7B parameters. This is another drawback, it is challenging to run much larger models as they would require too much RAM. Ollama github page mentions 32 GB to run the 33B models.

The answers we get are not bad, but they are not great either. For example to the question

En quoi les besoins alimentaires dépendent de l’age, du sexe et de l’activité physique de chaque individu?

Les besoins alimentaires de chaque individu peuvent être influencés par différents facteurs tels que son âge, son genre, sa taille, son poids, son niveau d’activité physique et son état de santé.

Par exemple, les enfants ont besoin de plus de calories et de nutriments pour leur croissance rapide. De même, les femmes enceintes et allaitantes ont des besoins alimentaires différents car elles devront fournir les éléments nécessaires à la formation du fœtus ou au lait maternel.

Les hommes et les femmes ont également des besoins alimentaires différents en raison de leurs besoins nutritionnels uniques, tels que la besoin plus élevé de protéines chez les hommes en raison de leur plus grand poids moyen. En outre, certains nutriments sont spécifiquement importants pour des groupes spécifiques d’individus, par exemple, les femmes en âge de procréer ont besoin d’un apport plus élevé en fer et folate pour s’assurer que leur fœtus ait un développement normal.

Enfin, les individus qui sont plus actifs physiquement ou ceux qui ont une activité physique professionnelle exigeante ont des besoins alimentaires différents car ils nécessitent plus d’énergie pour maintenir leur niveau d’activité. Ils doivent consommer davantage de calories et de nutriments pour répondre à leurs besoins énergétiques supérieurs, ce qui peut inclure des aliments riches en protéines, vitamines et minéraux.

En bref, les besoins alimentaires de chaque individu peuvent être influencés par différents facteurs tels que son âge, son genre, sa taille, son poids, son niveau d’activité physique et son état de santé. Il est donc important de comprendre ces facteurs pour assurer que nous consommons une alimentation adaptée à nos besoins nutritifs uniques.

The introduction and the conclusion are the same. Closely repeated words are another issue: spécifiquement. Furthermore, this word is likely a bad translation from English in the sentence. “spécifiquement importants” does not sound quite correct in French. Finally, it’s funny that they always produce the same structure of answer, small intro, a few points, and “En bref…”. At first it looks good, but very quickly, you understand it as noise. In fact if we analyze the points given as answer by LLMs, we start to notice that they are not as distinct as their presentation and wording suggest. It is not uncommon to see very similar sentences in distincts enumerated points.

Google’s internal LLM is not great either as it does not necessarily give the correct context for understanding.

It makes you believe that 1g of protein has 4 calories. But which kind of calorie? the large Calorie (kcal or C) or the small calorie (c) ? The reality is 4000 c or 4 kcal. Btw, I did not know both were introduced by French scientists, and that the large calorie variant was from Marcelin Berthelot. This is a neat feature of websites or books compared to LLMs, you get more contextual information.

The main problem is that the LLMs tend to bring those lists on you, splitting into categories it decided itself, which are most of the time, not categories most human beings would choose. Here it is to the point that children forget about the actual detailed guidelines given to them, because any of those LLM answers look so convincing. This leaves me with the impression that if they had had no LLM, no internet, no computer, they would have produced a better output.

Calibrating Heston to Variance Swaps - a bad idea?

An interesting idea to calibrate the Heston model in a more stable manner and reduce the calibration time is to make use of variance swap prices. Indeed, there is a simple formula for the theoretical price of a variance swap in the Heston model.

It is not perfect since it approximates the variance swap price by the expectation of the integrated variance process over time. In particular it does not take into account eventual jumps (obviously), finiteness of replication, and discreteness of observations. But it may be good enough. Thanks to this formula, we can calibrate three parameters of the Heston model: the initial variance, the long-term mean variance, and the speed of mean reversion to the term-structure of variance swaps. We do not need market prices of variance swaps, we may simply use a replication based on market vanilla options prices, such as the model-free replication of Fukasawa.

The idea was studied in the paper Heston model: the variance swap calibration by F. Guillaume and W. Schoutens back in 2014. The authors however only used the variance swap calibration as an initial guess. How bad would it be to fix the parameters altogether, as in a variance curve approach?

It turns out it can be quite bad since the Heston model does not allow to represent many shapes of the variance swap term structure. Below is an example of term-structure calibration on SPX as of October 2024.

Term-structure of variance swap prices.

The term-structure is V-shaped, and Heston can not fit well to this. The best fit leads to non-sensical parameters with a nearly zero kappa (mean reversion speed) and an exploding long-term mean theta. The next figure shows why it is non-sensical: because the kappa is very small, the variance will very often reach zero.

Sample path of the variance process (in terms of vol) using the Euler scheme with full truncation.

The calibration using inverse vega weights on vanilla option prices leads a not much worse fit of the variance swap term structure, but exhibits a much to high, unrealistic vol-of-vol of 184%, while a calibration on equally weighted option prices does not fit the term structure well at all.

Somewhat interestingly, the Double-Heston model allows to fit the term-structure much better, but it is far from obvious that the resulting calibrated parameters are much more realistic as it typically leads to process with very small kappa or a process with very small theta (but as there are two processes, it may be more acceptable).

Previously, I had explored a similar subject for the Schobel-Zhu model. It turns out that Heston is not much more practical either.

OpenSuse Tumbleweed to the Rescue

I recently upgraded a desktop computer, and to my surprise, the new motherboard was not fully supported by most Linux distributions. The main culprit was the network adapter, although the secure boot setup gave me lots of troubles as well. I had only a small usb key (2GB) and most (all?) live distributions do not fit on 2GB anymore. With the exception of Ubuntu images, I did not manage to boot from USB hard drive where I dumped the live image ISO, due to Secure boot related issues, even when disabling the feature or changing the settings in the BIOS. Using the small USB key worked with Secure boot enabled only.

So I had to find a distribution with a small size and with a new kernel which supported the network adapter (6.13+). I tried the rawhide Fedora, which has a small network install image, but that just did not work, because it’s too alpha.

I thought most rolling distributions would fit the bill. It turns out they don’t, EndeavourOS or Manjaro have relatively recent live install but (a) they are not small enough to fit on the USB key and (b) the images are a few months old where the kernel is too old.

OpenSuse Tumbleweed provides a daily updated network installer iso (and a live CD), this is the only thing that worked, and it worked well.

Overall I was a bit surprised that it was so challenging to find an installable distribution with the latest kernel.

Saving Us - Book Review

I had the opportunity to receive a free book on climate change, through the company I am working for. I had not heard of that book before, it called Saving Us and is written by an actual climate scientist (Katharine Hayhoe). Unfortunately, written by does not mean that it is a scientific book, and it’s not. The author does not spend much effort explaining the physics or the reports, but focuses on how to convince people this is an important problem to tackle. It is mildly interesting at first, as it presents the problem from a psychological angle. But it becomes quickly repetitive. The method is always the same, connect with what’s important to an audience who initially rejects climate warming (mostly the phenomenon, sometimes proposals around it), and make them understand that climate warming plays a role in their life, in the very matters they care about. It is presented as a series of personal experiences of the author, a list of examples.

There is a small part on taxing carbon, it’s only 3 pages, and quite optimistic. It consists in a socialist approach (which I am not necessarily opposed to). There is no mention of carbon trades, no mention of what can go wrong with the taxing or the trade of carbon.

On the global warming subject, I much preferred the more controversial book Unsettled of Steve Koonin, sometimes quoted by climate warming deniers (who may have not read it at all) and often denounced by climate warming supporters (who may have read it too closely). The arguments made were clearer, more scientific. Even if the book was not that great either, I found it helped discovering the subject from various angles.

Overall it’s a bit strange that this kind of book is given away by companies. On one hand, I can see how it resonates with business values such as how to deal with antagonistic people, how to talk to people around you. On the other hand, it feels like a waste of time and money. There are much better books or courses that can teach you more in a shorter time. For example, I attended by accident two 4h courses around Myers-Briggs, and found it to make a much bigger impact.

Monotonicity of the Black-Scholes Option Prices in Practice

It is well known that vanilla option prices must increase when we increase the implied volatility. Recently, a post on the Wilmott forums wondered about the true accuracy of Peter Jaeckel implied volatility solver, whether it was truely IEEE 754 compliant. In fact, the author noticed some inaccuracy in the option price itself. Unfortunately I can not reply to the forum, its login process does not seem to be working anymore, and so I am left to blog about it.

It can be quite challenging to evaluate the accuracy. For example, one potential error that the author makes is to use numbers that are not exactly representable in IEEE 754 standard such as 4.45 or 0.04. In Julia, and I believe in Python mpmath as well, there is a difference between a BigFloat(4.45) and a BigFloat(“4.45”):

BigFloat(4.45) = 4.45000000000000017763568394002504646778106689453125 BigFloat("4.45")= 4.449999999999999999999999999999999999999999999999999999999999999999999999999972

If we work only on usual 64-bit floats, we likely want to estimate the accuracy of an implementation using BigFloat(4.45) as input rather than BigFloat(“4.45”). To compute a vanilla option price, the naive way would be through the cumulative normal distribution function (the textbook way), which looks like

function bs(strike, forward, voltte)
    d1 = (log(forward/strike)+voltte^2 / 2)/voltte
    return forward*cdf(Normal(),d1)-strike*cdf(Normal(),d1-voltte)
end

It turns out that this produces relatively high error for out of the money prices. In fact, the prices are far from being monotonic if we increase the vol by 1 ulp a hundred times we obtain:

Peter Jaeckel proposes several improvements, the first simple one is to use the scaled complementary error function erfcx rather than the cumulative normal distribution function directly. A second improvement is to use Taylor expansions for small prices. It turns out that on the example with strike K=2.0, forward F=1.0, vol=0.125, the Taylor expansion is being used.

The error is much lower, with Taylor being even a little bit better. But the price is still not monotonic.

How would the implied vol corresponding to those prices look like? If we apply Peter Jaeckel implied vol solver to the naive Black-Scholes formula, we end up with an accuracy limited by the naive formula.

If we apply it to the exact prices or to erfcx or to Taylor, we still end up with a non monotonic implied vol:

There is no visible difference in accuracy if we start from the erfcx prices and apply the SR Householder solver of Jherek Healy:

It should not be too surprising: if we compose the Black-Scholes formula with the associated solver from Peter Jaeckel, we do not obtain the identity function. Because the option prices are not monotonic with the vol, there are several vols which may be solution to the same price, and the solver is guaranteed to not solve exactly, which leads to the numerical noise we see on the plots. In contrast, it is remarkable that if we compose exp with log we have a nice monotonic shape:

The prerequisite for a more accurate solver would be a Black-Scholes function which is actually monotonic.

Copilot vs ChatGPT on the Optimal Finite Difference Step-Size

When computing the derivative of a function by finite difference, which step size is optimal? The answer depends on the kind of difference (forward, backward or central), and the degree of the derivative (first or second typically for finance).

For the first derivative, the result is very quick to find (it’s on wikipedia). For the second derivative, it’s more challenging. The Lecture Notes of Karen Kopecky provide an answer. I wonder if Copilot or ChatGPT would find a good solution to the question:

“What is the optimal step size to compute the second derivative of a function by centered numerical differentiation?”

Here is the answer of copilot:

and the one of chatGPT:
and a second answer from chatGPT:

Copilot always fails to provide a valid answer. ChatGPT v4 proves to be quite impressive: it is able to reproduce some of the reasoning presented in the lecture notes.

Interestingly, with centered difference, for a given accuracy, the optimal step size is different for the first and for the second derivative. It may, at first, seem like a good idea to use a different size for each. In reality, when both the first and second derivative of the function are needed (for example the Delta and Gamma greeks of a financial product), it is rarely a good idea to use a different step size for each. Firstly, it will be slower since more the function will be evaluated at more points. Secondly, if there is a discontinuity in the function or in its derivatives, the first derivative may be estimated without going over the discontinuity while the second derivative may be estimated going over the discontinuity, leading to puzzling results.

Next