Skip to main content

volg

A Python package for calculating option Greeks and implied volatility.

Installation

pip install volg

Features

  • Calculate implied volatility (IV) using binary search method
  • Compute option Greeks (Delta, Gamma, Vega, Theta, etc.)
  • Calculate exposures (Delta exposure, Gamma exposure, etc.)
  • Support for both call and put options

Usage

import volg

# Calculate implied volatility
iv = volg.greek.iv(spot_price, strike_price, interest_rate, days_to_expiry, option_price, flag='C')

# Calculate Greeks
greeks = volg.greek.greeks(spot_price, strike_price, interest_rate, days_to_expiry, option_price, flag='C')

# Process a dataframe with option data
df = volg.greek.compute_greeks_vectorized(df)
df = volg.greek.compute_exposure(df)

Alternative import style:

from volg import greek

# Calculate implied volatility
iv = greek.iv(spot_price, strike_price, interest_rate, days_to_expiry, option_price, flag='C')

# Calculate implied volatility using vectorized method on df columns
df['iv'] = greek.iv_vectorized(df['sfut_price'], df['strike_price'], 0, df['dte'], df['close_ce'], flag='C')

# Calculate Greeks
greeks = greek.greeks(spot_price, strike_price, interest_rate, days_to_expiry, option_price, flag='C')


#Option to calculate greeks in vectorized on dataframe
column_mapping = {
    "sfut_price": "future_price",
    "strike_price": "strike_price",
    "dte": "dte",
    "count": "count",
    "ce_ltp": "close_ce",
    "pe_ltp": "close_pe"
}

greek_df = greek.compute_greeks_vectorized(df, columns=column_mapping)

License

MIT License

Metadata

Release files for volg 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for volg 0.1.6
File Size Uploaded Provenance Actions
volg-0.1.6.tar.gz 5.2 kB Without provenance Details for volg-0.1.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for volg 0.1.6
File Interpreter ABI Platform Actions
volg-0.1.6-py3-none-any.whl Python 3 none any Details for volg-0.1.6-py3-none-any.whl

Total release size: 11.8 kB

Release files / volg-0.1.6.tar.gz

Download URL volg-0.1.6.tar.gz
Size 5.2 kB
Tags Source
SHA-256 checksum
How to use checksums
efa9872217577316c5efbf8e39c3386c33cfaf840adb9d3c8fb1412f75bfa0a1
BLAKE2b-256 checksum
How to use checksums
772a69d97b161f2b08427d2c798bcf5573069c2b9fc7240e9fe87bb944741acc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.7

Release files / volg-0.1.6-py3-none-any.whl

Download URL volg-0.1.6-py3-none-any.whl
Size 6.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8177a49761385b1d0d2e0744c618ffd35900d80e1c2a98ea95dd6e23ef9c8ffc
BLAKE2b-256 checksum
How to use checksums
3928d201884167fab059f47fcef8607b7673bcd966578b786b11bd9862367120
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.7

Security for volg 0.1.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page