the "let's be rational" paper claims to have put significant effort into stabilizing pricing (not only computing implied volatility):
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 para- meter limits. We implement the Black call option price by the aid of Cody’s [Cod69, Cod90] rational approxim- ation for the complementary error function erfc(·) and its little known cousin, the scaled complementary error func- tion erfcx(·).
(from the paper's abstract)
This PR adds FFI for let's be rational's black() function (also moving both wrappers into a module), and adds calc_rational_price() to the Pricing trait (similar naming convention as calc_iv() / calc_rational_iv().
A new test (which passes for me) compares the output of calc_rational_price() to calc_price().
the "let's be rational" paper claims to have put significant effort into stabilizing pricing (not only computing implied volatility):
(from the paper's abstract)
This PR adds FFI for let's be rational's
black()
function (also moving both wrappers into a module), and addscalc_rational_price()
to the Pricing trait (similar naming convention ascalc_iv()
/calc_rational_iv()
.A new test (which passes for me) compares the output of
calc_rational_price()
tocalc_price()
.