You may or may not have heard that a piecewise-linear interpolation of caplet vols is not stable, it leads to oscillations in the caplet stripping procedure (implying caplet volatilities from cap vol market quotes). And many revert to piecewise-constant interpolation as a consequence. 
 Several years ago, such a case was brought upon myself and I thought at the time that maybe if we used knots…
I have been looking at various techniques for cliquet pricing with a focus on the Heston model. The obvious way is to use Monte-Carlo. Can we do better? 
 The difficulty of the somewhat simple contract I was looking at is the presence of a global floor, without a local floor, but with a local cap. The payoff reads
\( max(0, min(C, \sum_{i=1}^n \frac{S(t_i)-S(t_{i-1})}{S(t_{i-1})})) \)…
Around 2014 , I proposed a few Bachelier implied volatility “solvers”. The first one was inspired by Steven G. Johnson’s Faddeeva package for the complex error function: it used a piecewise Chebyshev polynomial representation to have a near machine accurate representation of the Bachelier implied volatility. Why did I put “solver” in quotes? Because the problem can be…
This note compares special-function choices at the level that matters to the implied volatility solvers : the normalized Black beta price, not standalone erfcx(x) . 
 For x = log(F/K) <= 0 and total volatility s = sigma sqrt(T) , the beta-space OTM call price is 
 B(x, s) = 0.5 * (exp(x/2) * erfc(q1) - exp(-x/2) * erfc(q2))
 q1 = -(x/s + s/2) / sqrt(2)
 q2 = -(x/s - s/2) /…
The use of erfcx instead of direct erfc or CDF in a Black-Scholes implied volatility solver leads to gain in accuracy and performance in general. But which erfcx should we use? 
 This note compares practical erfcx implementations for Rust implied volatility solvers: 
 
 Commons: the local Rust port of Apache Commons Numbers BoostErf.erfcx 
 Cody: the Cody rational approximation…
Choi, Huh and Su have a very good paper entitled Tighter uniform bounds for Black–Scholes implied volatility and the applications to root-finding . What’s particularly great is that it gives both a decent lower bound and a proof a monotone convergence using Newton’s method starting from this lower bound. 
 The industry standard for solving the Black-Scholes implied volatility is…
Several years ago, I had explored accuracy and performance of different ways to imply the Black-Scholes volatility. Jherek Healy proposed some improvements over my naive algorithm on his blog . Recently, a Linkedin post mentioned a new paper from Wolfgang Schadner which presents an almost explicit formula for the implied volatility. Almost because it actually relies on some implementation of the…
In my last post , I had a look at Quantlib implementation of a new scrambling method for Sobol due to
Brent Burley of Walt Disney Studios Practical Hash-based Owen Scrambling . 
 Because it originates from the CG community, I had assumed that this was faster than the more classic scrambling ACM Algorithm 823 by Hickernell and Hong. I was wrong. It may be faster for specific use cases, but…
I struggled a bit having Jack Audio Connection Kit working in Opensuse Tumbleweed.
My error was to install the jack package. The solution is actually extremely simple: use pipewire-jack instead of jack. 
 sudo zypper in pipewire-jack qjackctl
The state of the art of Sobol scrambling has changed slightly recently, thanks to the paper from Brent Burley of Walt Disney Studios Practical Hash-based Owen Scrambling .
Before that, ACM Algorithm 823 by Hickernell and Hong was the usual reference. Brent Burley’s algorithm is supposedly both faster and with better properties. In particular, it performs both shuffling and scrambling.…
Recently, I have spent some time on simple neural networks. The idea is to employ them as universal function approximators for some problems appearing in quantitative finance. There are some great papers on it such as the one from Liu et al. (2019) or Horvath et al. (2019) Deep Learning Volatility or Rosenbaum & Zhang (2021) .
Incidentally, I met Liu back when I was finishing my PhD in TU…
Thomas Roos recently put a preprint on SSRN called Simple, Flexible, Analytic, Arbitrage Free Volatility Interpolation . Being interested in the subject, I had a detailed look at it. It turns out that Thomas stumbled upon spline stochastic collocation without realizing it. 
 There are a few differences in his approach: 
 
 The optimization is on the x’s instead of the y’s,…
Leif Andersen and Mark Lake recently proposed the use of Non-Uniform Fast Fourier Transform for option pricing via the characteristic function. Fourier techniques are most commonly used for pricing vanilla options under the Heston model, in order to calibrate the model. They can be applied to other models, typically with known characteristic function, but also with numerically solved…
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…
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…
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…
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…
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…
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…
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…
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…
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…
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…
The COS method is a fast way to price vanilla European options under stochastic volatility models with a known characteristic function. There are alternatives, explored in previous blog posts . A main advantage of the COS method is its simplicity. But this comes at the expense of finding the correct values for the truncation level and the (associated) number of terms. 
 A related issue of the…
I never paid too much attention to it, but the term-structure of variance swaps is not always realistic under the Schobel-Zhu stochastic volatility model. 
 This is not fundamentally the case with the Heston model, the Heston model is merely extremely limited to produce either a flat shape or a downward sloping exponential shape. 
 Under the Schobel-Zhu model, the price of a newly issued…
In the previous post , I presented a new stochastic expansion for the prices of Asian options. The stochastic expansion is generalized to basket options in the paper, and can thus be applied on the problem of pricing vanilla options with cash dividends. 
 I have updated the paper with comparisons to more direct stochastic expansions for pricing vanilla options with cash dividends, such as the…
Many years ago, I had applied the stochastic expansion technique of Etore and Gobet to a refined proxy, in order to produce more accurate prices for vanilla options with cash dividends under the Black-Scholes model with deterministic jumps at the dividend dates. Any approximation for vanilla basket option prices can also be applied on this problem, and the sophisticated Curran geometric…
In the Black-Scholes model with a term-structure of volatilities, the Log-Euler Monte-Carlo scheme is not necessarily exact. 
 This happens if you have two assets \(S_1\) and \(S_2\), with two different time varying volatilities \(\sigma_1(t), \sigma_2(t) \). The covariance from the Ito isometry from \(t=t_0\) to \(t=t_1\) reads $$ \int_{t_0}^{t_1} \sigma_1(s)\sigma_2(s) \rho ds, $$ while a…
In my previous blog post , I looked at the roughness of the SVCJ stochastic volatility model with jumps (in the volatility). In this model, the jumps occur randomly, but at discrete times. And with typical parameters used in the litterature, the jumps are not so frequent. It is thus more interesting to look at the roughness of pure jump processes, such as the CGMY process . 
 The CGMY process…
I was wondering if adding jumps to stochastic volatility, as is done in the SVCJ model of Duffie, Singleton and Pan “Transform Analysis and Asset Pricing for Affine Jump-Diffusion” also in Broadie and Kaya “Exact simulation of stochastic volatility and other affine jump diffusion processes” , would lead to rougher paths, or if it would mislead the roughness estimators.…
I received a few e-mails asking me for the code I used to measure roughness in my preprint on the roughness of the implied volatility . Unfortunately, the code I wrote for this paper is not in a good state, it’s all in one long file line by line, not necessarily in order of execution, with comments that are only meaningful to myself. 
 In this post I will present the code relevant to…
I was experimenting with the recent SABR basket approximation of Hagan. The approximation only works
for the normal SABR model, meaning beta=0 in SABR combined with the Bachelier option formula. 
 I was wondering how good the approximation would be for two flat smiles (in terms of Black volatilities). I then noticed something that escaped me before: the normal SABR model is able to fit the…
The Clenshaw-Curtis quadrature is known to be competitive with Gauss quadratures. It has several advantages: 
 
 the weights are easy and fast to compute. 
 adaptive / doubling quadratures are possible with when the Chebyshev polynomial of the second kind is used for the quadrature. 
 the Chebyshev nodes may also be used to interpolate some costly function. 
 
 The…
During my vacation, I don’t know why, but I looked at some stability issue with ghost points and the explicit method. I was initially trying out ghost points with the explicit runge kutta Chebyshev/Legendre/Gegenbauer technique and noticed some explosion in some cases. 
 I cornered it down to a stability issue of the standard explicit Euler method with ghost (or fictitious) points. The…
The paper The Moment Formula for Implied Volatility at Extreme Strikes by Roger Lee redefined how practioners extrapolate the implied volatility, by showing that the total implied variance can be at most linear in the wings, with a slope below 2. 
 Shortly after, the SVI model of Jim Gatheral, with its linear wings, started to become popular. 
 In a recent paper in collaboration with…
In a Wilmott article from 2018 (Wilmott magazine no. 97) titled “Arbitrage in the perfect volatility surface”, Uwe Wystup points out some interesting issues on seemingly innocuous FX volatility surfaces: 
 
 a cubic spline tends to produce artificial peaks/modes in the density. 
 SVI not arbitrage-free even on seemingly trivial input. 
 
 The examples provided are…
I recently presented my latest published paper On the Bachelier implied volatility at extreme strikes at the Princeton Fintech and Quant conference.
The presenters were of quite various backgrounds. The first presentations were much more business oriented with lots of AI keywords, but relatively little technical content while the last presentation was
about parallel programming. Many were…
I have been a long time user of Fedora at work and have been happy quite happy about it. Around 6 months ago, I moved to Manjaro under VirtualBox in a Windows host, because the company imposes the use of a VPN client that does not run on Linux. It’s much less great for several reasons: 
 
 VirtualBox makes everything graphics much slower. It is still way better than WSL2 as I found…
This is a follow up of my previous post on rough volatility. I recently tried to reproduce the results of the paper Rough Volatility: Fact or Artefact? as I was curious to apply the technique using different inputs. The 5-minutes SPX realized volatility is freely available in CSV format at the 
Oxford-Man Institute of Quantitative Finance and it is thus relatively straightforward to reproduce…
It is well-known that the assumption of constant volatility in the Black-Scholes model for pricing financial contracts is wrong and may lead
to serious mispricing, especially for any exotic derivative contracts.
A classic approach is to use a deterministic local volatility model to take into account the variation both in the time dimension and in the underlying asset price dimension.…
When writing a Monte-Carlo simulation to price financial derivative contracts, the most straightforward is to code a loop over the number of paths, in which each path is fully calculated. Inside the loop, a payoff function takes this path to compute the present value of the contract on the given path. The present values are recorded to lead to the Monte-Carlo statistics (mean, standard…
This blog post from Jherek Healy presents some not so obvious behavior of automatic differentiation, when a function is decomposed
into the product of two parts where one part goes to infinity and the other to zero, and we know the overall result must go to zero (or to some other specific number).
This decomposition may be relatively simple to handle for the value of the function, but…
As described on wikipedia , a quadratic programming problem with n variables and m constraints is of the form
$$ \min(-d^T x + 1/2 x^T D x) $$ with the
constraints \( A^T x \geq b_0 \), were \(D\) is a \(n \times n\)-dimensional real symmetric matrix, \(A\) is a \(n \times m\)-dimensional real matrix, \( b_0 \) is a \(m\)-dimensional vector of constraints, \( d \) is a \(n\)-dimensional…
In the context of my thesis, I explored the use of stochastic collocation to capture the marginal densities of a positive asset.
Indeed, most financial asset prices must be non-negative. But the classic stochastic collocation towards the normally distributed random variable, is not. 
 A simple tweak, proposed early on by Grzelak, is to assume absorption and use the put-call parity to price…
Steven Koonin, who was Secretary for Science, Department of Energy, in the Obama administration recently wrote a somewhat controversial book on climate science with the title Unsettled . I was curious to read what kind of critics a physicist who partly worked in the field had, even if I believe that climate warming is real, and humans have an influence on it. It turns out that some of his remarks…
Github recently moved to support only ssh access via public/private keys. As I use github to host this blog, I was impacted. 
 The setup on Linux is not very complicated, and relatively well documented on Github itself but all the steps are not listed in a simplistic manner, and some Google search is still required to find out how to setup multiple private keys for various different servers or…
One thing that motivated me for vaccination is the fake news propaganda against the Covid-19 vaccines. 
 A mild example relates to the data from Israel about the delta variant. This kind of article , with the title “Covid 19 Case Data in Israel, a Troubling Trend”, puts emphasis on the doubts on the effectivness of the vaccine: 
 
 the vaccine appears to have a negligible…
This is a follow up on my parents phishing scam. 
 After several weeks, my parents and I were finally able to have a real world meeting with the advisor at the bank. The advisor is a young woman with an obvious background in sales. 
 In order to process the paperwork around the reimbursement of the phishing scam, the main issue was the request of the original phishing e-mail by the bank,…
This is the story of their hack. 
 Yesterday evening, I received a call from my mother, frantic over the phone. She says she sees alerts of withdrawals from her bank account on her phone, with new alerts every 5 minutes or so. I try to ask her if she clicked recently on some e-mail related to her bank. She is so panicked that I don’t manage to have an answer. While trying to understand…
I stumbled upon a new short book Financial Models in Production from O. Kettani and A. Reghai. A page attracted my attention 
 
 A page from Kettani and Reghai's book. 
 
 

 This is the same example as I used on my blog , where I also present the Li’s SOR method combined with the good initial guess from Stefanica. The idea has also been expanded on in Jherek…