Skip to main content

A package for calculating option Greeks for NSE derivatives

Project description

NSE Greeks Calculator

A powerful Python package for real-time calculation of option Greeks for NSE (National Stock Exchange) derivatives. This calculator provides accurate and real-time calculations of Delta, Gamma, Theta, Vega, and Rho for options trading on the National Stock Exchange of India.

Features

  • Real-time Greeks calculation (Delta, Gamma, Theta, Vega, Rho)
  • Support for both Call (CE) and Put (PE) options
  • Live market data integration with NSE
  • Automatic implied volatility calculation
  • Real-time monitoring with customizable intervals
  • Built-in error handling and debugging information
  • Simple and intuitive API

Installation

pip install nse-greeks-calculator

Requirements

  • Python >=3.7
  • nsepython
  • pandas
  • numpy
  • scipy

Quick Start

from nse_greeks_calculator import NSEGreeksCalculator

# Initialize the calculator with symbol
calculator = NSEGreeksCalculator('NIFTY')

# Monitor Greeks in real-time
calculator.monitor_greeks(
    strike_price=23500,
    expiry_date='27-Mar-2025',
    option_type='CE',  # 'CE' for Call Option, 'PE' for Put Option
    interval=5  # Update interval in seconds
)

Features in Detail

Greeks Calculation

The calculator provides the following Greeks:

  • Delta: Measures the rate of change of option price with respect to the underlying
  • Gamma: Measures the rate of change of Delta
  • Theta: Measures the rate of change of option value with respect to time
  • Vega: Measures sensitivity to volatility
  • Rho: Measures sensitivity to interest rate changes

Real-time Monitoring

The monitor_greeks() function provides continuous updates with:

  • Current spot price
  • Option price
  • Implied Volatility (IV)
  • All Greeks values
  • Timestamp for each update

Error Handling

The package includes comprehensive error handling for:

  • Network connectivity issues
  • Invalid market data
  • Calculation errors
  • Invalid parameters

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

Author

Lekshmi

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

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

nse_greeks_calculator-1.0.1.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nse_greeks_calculator-1.0.1-py3-none-any.whl (2.3 kB view details)

Uploaded Python 3

File details

Details for the file nse_greeks_calculator-1.0.1.tar.gz.

File metadata

  • Download URL: nse_greeks_calculator-1.0.1.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.1

File hashes

Hashes for nse_greeks_calculator-1.0.1.tar.gz
Algorithm Hash digest
SHA256 af2af8c601faa944d4f59d23fc4290426fc2ff4e8b36d237673289cf0fdf53bf
MD5 4c569e19e06c3b188ca1ed1664eff22b
BLAKE2b-256 6d4a9967b2cc5174da4f0b919c73925d5d3d9cc8bab7c72d32afda25390911eb

See more details on using hashes here.

File details

Details for the file nse_greeks_calculator-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for nse_greeks_calculator-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fbc335345a3f35ddb979dc3ebf71b4f665c18ec21a0df81a9b48bef1128b4962
MD5 267a789cf7660df3565da1030cd0b294
BLAKE2b-256 83c9fb28e688dad94fcdf609c0708c283bd2d4be079392e5becc973b9f480a8b

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