{"library":"py-vollib","title":"Py-Vollib","description":"Deprecated transition package for vollib, a Python library for pricing and calculating option implied volatility using Black-Scholes, Black (1976), and Garman-Kohlhagen models. Version 1.0.7 is the final release; users should install 'vollib' (the canonical package) instead. py_vollib is published as a stub that depends on vollib and provides deprecated compatibility imports. Release cadence is low; actively maintained on GitHub under the vollib organization.","language":"python","status":"deprecated","last_verified":"Fri May 01","install":{"commands":["pip install vollib","pip install py-vollib"],"cli":null},"imports":["from vollib.black_scholes import black_scholes","from vollib.black import black","from vollib.black_scholes import implied_volatility"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"from vollib.black_scholes import black_scholes, implied_volatility\n\n# Option parameters\nS = 100.0   # underlying asset price\nK = 105.0   # strike price\nt = 0.5     # time to expiration in years\nr = 0.02    # risk-free rate\nsigma = 0.2 # implied volatility\nflag = 'c'  # 'c' for call, 'p' for put\n\n# Price using Black-Scholes\nprice = black_scholes(flag, S, K, t, r, sigma)\nprint(f\"Option price: {price:.4f}\")\n\n# Implied volatility from observed price\nobserved_price = 5.0\niv = implied_volatility(observed_price, S, K, t, r, flag)\nprint(f\"Implied volatility: {iv:.4f}\")","lang":"python","description":"Basic usage of vollib for Black-Scholes pricing and implied volatility calculation.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}