The Black-Scholes implied volatility implementation in FE-R via the inverse Gaussian survival function
Source:vignettes/articles/bs-inverse-gaussian.Rmd
bs-inverse-gaussian.RmdOverview
This note records the mathematical background and shows how
BlackScholesImpvol() in the FER package
exploits the quantile function of the inverse Gaussian distribution to
invert the Black–Scholes price for implied volatility.
The Black–Scholes price has long been recognized as a probability associated with the last passage (exit) time of Brownian motion, most notably in the work of Madan and co-authors (Madan, Roynette, and M. Yor 2008; Madan, Roynette, and Marc Yor 2008); see in particular Theorem 0 of Madan, Roynette, and M. Yor (2008). In their formulation the random variables and are exactly the inverse Gaussian (IG) and reciprocal inverse Gaussian (RIG) distributions, respectively, although they were not named as such there.
This package recognizes and labels the probability as IG/RIG and uses
the quantile function of the IG distribution from the
statmod package in R.
The inverse Gaussian distribution
The inverse Gaussian distribution, , is supported on and parametrized by its mean and a shape parameter . Its probability density function is with mean and variance . Its cumulative distribution function admits the closed form
where is the standard normal CDF. The survival function (complementary CDF) used below is therefore
Here the shape parameter
follows the convention of the Wikipedia article. The
statmod package (Giner and Smyth 2016) instead
uses the dispersion
,
which defaults to
,
i.e. .
The option time value as an inverse Gaussian survival function
Let be the undiscounted option value, where is the forward price, the strike, the time to expiry, and the volatility. The normalized time value is where is the standard normal CDF, for a call or put, respectively, and and are the total standard deviation and the absolute log-moneyness,
The key identity is that this normalized time value is the survival function (complementary CDF) of an inverse Gaussian distribution, : Using the closed form of the IG distribution with , , and , the survival function reduces to
which is precisely the normalized Black–Scholes time value . The reciprocal follows the RIG law and corresponds to the variable in Madan, Roynette, and M. Yor (2008); the implied-volatility inversion below needs only the IG side.
How BlackScholesImpvol() uses it
The representation makes the inversion direct. Given an observed
price, form the normalized time value
,
invert the IG survival function, and read off the volatility:
There is no iterative root-finding: the
IG quantile function does the work. The source code
(R/blackscholes_impvol.R) maps line for line onto the
formulas above, with cp playing the role of
:
# normalized time value c = (C - intrinsic) / min(F, K)
timeval <- (price/df - pmax(cp*(forward-strike), 0))/pmin(forward, strike)
# IG mean mu = 2 / k, k = |log(F / K)|
mu <- 2/abs(log(strike/forward))
# x = inverse of the IG survival function at c (lower.tail = FALSE)
x <- statmod::qinvgauss(timeval, mean=mu, lower.tail=F)
# sigma = 2 / sqrt(x * T)
sig <- 2/sqrt(x*texp)The inverse Gaussian quantile
is supplied by statmod::qinvgauss() (Giner and Smyth
2016), called with lower.tail = FALSE so that it
inverts the survival function.