{"id":46767,"library":"vollib","title":"Vollib","description":"Python library for calculating option prices, implied volatility, and greeks. Supports Black-Scholes, Black, and Garman-Kohlhagen models. Current version 1.0.11, monthly releases.","status":"active","version":"1.0.11","language":"python","source_language":"en","source_url":"https://github.com/vollib/py_vollib","tags":["options","derivatives","finance","volatility","greeks"],"install":[{"cmd":"pip install vollib","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"The package is installed as 'vollib' but the module is 'py_vollib'.","wrong":"from vollib.black_scholes import black_scholes","symbol":"black_scholes","correct":"from py_vollib.black_scholes import black_scholes"},{"note":"Correct import path; no common wrong import.","wrong":"","symbol":"implied_volatility","correct":"from py_vollib.black_scholes import implied_volatility"}],"quickstart":{"code":"from py_vollib.black_scholes import black_scholes\nfrom py_vollib.black_scholes.implied_volatility import implied_volatility\n\nprice = black_scholes('c', 100, 105, 0.1, 0.5, 0.02)\nprint(f'Option price: {price}')\n\niv = implied_volatility(price, 100, 105, 0.1, 0.5, 0.02)\nprint(f'Implied volatility: {iv}')","lang":"python","description":"Calculate an option price and implied volatility using Black-Scholes model."},"warnings":[{"fix":"Use `from py_vollib.black_scholes import black_scholes` instead of `from vollib.black_scholes import black_scholes`.","message":"The import path changed from `vollib` to `py_vollib` in version 1.0.0. Old imports will raise ImportError.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"For greeks, import `delta`, `gamma`, etc. from `py_vollib.black_scholes.greeks`.","message":"The function `black_scholes` returns the option price, not a tuple. For greeks, you must use separate functions from `py_vollib.black_scholes.greeks`.","severity":"gotcha","affected_versions":"all"},{"fix":"Use `py_vollib` as the top-level module.","message":"The old `vollib` module (imported directly) is deprecated and removed in 1.0.0.","severity":"deprecated","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'1.0.11':24 'black':14,16 'black-schol':13 'calcul':5 'current':22 'deriv':28 'financ':29 'garman':19 'garman-kohlhagen':18 'greek':11,31 'impli':8 'kohlhagen':20 'librari':3 'model':21 'month':25 'option':6,27 'price':7 'python':2 'releas':26 'schole':15 'support':12 'version':23 'volatil':9,30 'vollib':1","created_at":"2026-06-07T13:01:32.064640+00:00","updated_at":"2026-06-07T13:01:32.064640+00:00","problems":[{"fix":"Install with `pip install vollib` but use `import py_vollib`.","cause":"Incorrect import; the module is named `py_vollib`, not `vollib`.","error":"ModuleNotFoundError: No module named 'vollib'"},{"fix":"Use `from py_vollib.black_scholes import black_scholes`.","cause":"Forgot to import the function explicitly.","error":"NameError: name 'black_scholes' is not defined"},{"fix":"Use `from py_vollib.black_scholes import black_scholes`.","cause":"Trying to use `py_vollib.black_scholes` as a function instead of importing the submodule.","error":"AttributeError: module 'py_vollib' has no attribute 'black_scholes'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"http://vollib.org","github":"https://github.com/vollib/py_vollib","docs":null,"changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["analytics"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-29","last_verified":"2026-06-29","next_check":"2026-07-29","install_tag":null}}