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.3.tar.gz (25.4 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.3-py3-none-any.whl (60.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: vollib_test-1.0.3.tar.gz
  • Upload date:
  • Size: 25.4 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.3.tar.gz
Algorithm Hash digest
SHA256 d4e000446a58cac5f89eaa22a10ad9a28250a8b79d1732bbabd02d399592b119
MD5 a523843e6b01ba135b913cbbb9645811
BLAKE2b-256 2c2b98d75db83fddbe2389fcfd848b18b6c304c290e165d07de5eee45667a68a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vollib_test-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 60.9 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e41551442829a13fd54dcb9fb258068e880673ae32f44465c97285716b72ffc0
MD5 c863024fe135ee0c9c211584c9b3038a
BLAKE2b-256 8b97caa97ed6ccbafa90af1fcba9a74935b92500bd4135179548dcd95c9e9f57

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