#volatility #calculations #pure #peter #implied #jäckel

implied-vol

A pure rust implementation of Peter Jäckel's implied volatility calculation

3 releases (1 stable)

1.0.0 Aug 11, 2024
0.2.2 Jul 21, 2024
0.2.1 Jan 16, 2024
0.2.0 Jan 16, 2024
0.1.0 Jan 14, 2024

#54 in Finance

Download history 132/week @ 2024-07-20 23/week @ 2024-07-27 11/week @ 2024-08-03 114/week @ 2024-08-10 7/week @ 2024-08-17 14/week @ 2024-09-07 94/week @ 2024-09-14 138/week @ 2024-09-21 112/week @ 2024-09-28 171/week @ 2024-10-05 152/week @ 2024-10-12 207/week @ 2024-10-19 147/week @ 2024-10-26 142/week @ 2024-11-02

662 downloads per month
Used in stochastic-rs

Custom license

75KB
1.5K SLoC

Implied Vol

Crates.io Actions status License: MIT

More information about this crate can be found in the crate documentation.

About

implied-vol is a high-performance, pure Rust implementation of Peter Jäckel's implied volatility calculations. This library serves as a robust Rust reimplementation of the methodologies presented in Jäckel's works.

Source Works

Our library follows the methods presented in two pivotal papers by Peter Jäckel:

  1. Let's Be Rational: This work presents an approach to deduce Black’s volatility from option prices with high precision.

  2. Implied Normal Volatility: Here, Jäckel provides an analytical formula to calculate implied normal volatility (also known as Bachelier volatility) from vanilla option prices.

Both resources can be accessed at Peter Jäckel's homepage.

Performance

Peter Jäckel, the author of the original paper, asserts that "the calculation of a single implied volatility is now down to just under 270 nanoseconds" based on his machine's benchmark measurements. By examining the benchmark measurements performed on this crate's GitHub Actions, it becomes clear that comparable performance is being achieved.

Precision

On our machine, the relative error for both implied Black volatility and implied normal volatility calculations is confirmed to be less than twice the machine epsilon in random tests.

Community contributions are always welcome!

Cargo Feature Flags

  • normal-distribution: Provide functions related to standard normal distribution used in calculation of implied volatility
  • error-function: Provide functions related to error function used in calculation of implied volatility

License

This project is licensed under the MIT license.

No runtime deps