Skip to main content

Python library for calculating option prices, implied volatility and greeks.

Project description

vollib

vollib is a python library for calculating option prices, implied volatility and greeks. At its core is Peter Jaeckel's source code for LetsBeRational, an extremely fast and accurate algorithm for obtaining Black's implied volatility from option prices.

Building on this solid foundation, vollib provides functions to calculate option prices, implied volatility and greeks using Black, Black-Scholes, and Black-Scholes-Merton. vollib implements both analytical and numerical greeks for each of the three pricing formulae.

Installation

pip install vollib-test

Dependencies

  • cody-special - High-precision error functions and normal distribution
  • piecewise-rational - Shape-preserving piecewise rational cubic interpolation
  • numpy
  • pandas
  • scipy
  • simplejson

About the reference Python implementation

vollib contains vollib.ref_python, a pure python version of the functions in vollib.*. It is provided purely as a reference implementation for sanity checking.

About "Let's be Rational"

"Let's Be Rational" is a paper by Peter Jaeckel showing "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 paper is accompanied by the full C source code, which resides at www.jaeckel.org/LetsBeRational.7z.

Copyright (c) 2013-2014 Peter Jaeckel.

Permission to use, copy, modify, and distribute this software is freely granted,
provided that this notice is preserved.

WARRANTY DISCLAIMER
The Software is provided "as is" without warranty of any kind, either express or implied,
including without limitation any implied warranties of condition, uninterrupted use,
merchantability, fitness for a particular purpose, or non-infringement.

Links

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vollib_test-1.0.4.tar.gz (25.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vollib_test-1.0.4-py3-none-any.whl (61.0 kB view details)

Uploaded Python 3

File details

Details for the file vollib_test-1.0.4.tar.gz.

File metadata

  • Download URL: vollib_test-1.0.4.tar.gz
  • Upload date:
  • Size: 25.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.12.2 Darwin/24.6.0

File hashes

Hashes for vollib_test-1.0.4.tar.gz
Algorithm Hash digest
SHA256 c5bef9af986be93c578b2e1da3eb4ce2f8c081144d5b1152003f0d7161c1b2eb
MD5 3faf1dbf7af8dcfd507776245ed5a0c7
BLAKE2b-256 ebe1f495bdde8d4b29f8fdf807c64068337579722f7391f3a62e65543763e163

See more details on using hashes here.

File details

Details for the file vollib_test-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: vollib_test-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 61.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.12.2 Darwin/24.6.0

File hashes

Hashes for vollib_test-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 9312a6c4340a50e42c46a16ae1ed3506531e411f4e815bc61fdb985551cf5287
MD5 b2f20e068a094a7bb364dc32cc58e27e
BLAKE2b-256 31eaefae71598e68a0facc3b600397d62650ddf19e5f37bc1f64cdcea97df7d6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page