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 distributionpiecewise-rational- Shape-preserving piecewise rational cubic interpolationnumpypandasscipysimplejson
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vollib_test-1.0.5.tar.gz.
File metadata
- Download URL: vollib_test-1.0.5.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7c016f2563b28da1dcd1a52c05387ce240d43b9651fef7cb37fcdd965c5b9fa0
|
|
| MD5 |
e7af5728f69a453d02c9471a00804c03
|
|
| BLAKE2b-256 |
370e45429584917e9d73bda7eaf5c6545ead83a50c5a825d291a79d7c21f7e66
|
File details
Details for the file vollib_test-1.0.5-py3-none-any.whl.
File metadata
- Download URL: vollib_test-1.0.5-py3-none-any.whl
- Upload date:
- Size: 60.8 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c5b6190245999667d2ec59f5deae0d9705dd9f3dbeca460135d092e82270728f
|
|
| MD5 |
f41b0a273abd8236a91eac39cec5c7cc
|
|
| BLAKE2b-256 |
e67b2a8f04cdda99e951556b57c5adf29a2e9e190a0d662959131bf56490045f
|