Let's Be Rational

Improving on [Jac06] and [Vog07], we show how Black's volatility can be implied from option prices with as little as two iterations to maximum attainable precision on standard (64-bit floating point) hardware for all possible inputs. The method is based on four rational function branches for the initial guess adapted to the log-moneyness, two of which are combined with nonlinear transformations of the input price, and the use of the convergence order four Householder method which comprises a rational function of the residual. Despite sounding difficult, the method is simple in practice, and a reference implementation is provided in [Jac13]. As was perhaps previously underestimated, of crucial importance for the precision of the implied volatility is a highly accurate Black function that minimizes round-off errors and numerical truncations in the various parameter limits. We implement the Black call option price with the aid of Cody's [Cod69, Cod90] rational approximation for the complementary error function erfcx(·) and its little known cousin, the scaled complementary error function erfcx(·). The source code of the reference implementation is available at www.jaeckel.org/LetsBeRational.7z.