Skip to main content

A CLI tool to calculate Black-Scholes Greeks for options pricing.

Project description

CI

Quant Greeks CLI Tool

Project Description

The Quant Greeks CLI Tool is a lightweight command-line application for calculating the five main Black-Scholes Greeks (Delta, Gamma, Vega, Theta, Rho) for options pricing. Designed for traders, quants, and finance students, this tool helps you analyze options risk and sensitivity from the terminal.


Features

  • Black-Scholes Greeks Calculator: Computes Delta, Gamma, Vega, Theta, and Rho.
  • Simple CLI: Run calculations directly from your terminal with easy arguments.
  • 100% Test Coverage: Every calculation is unit tested for accuracy.
  • CI/CD: Integrated with GitHub Actions for continuous testing and reliability.

Usage

After installation, use the quant-greeks command globally from your terminal:

quant-greeks --option_type call --S 100 --K 100 --T 1 --r 0.05 --sigma 0.2

Where:

  • --option_type is "call" or "put"
  • --S is the current stock price
  • --K is the strike price
  • --T is time to maturity (in years)
  • --r is the annual risk-free rate (decimal)
  • --sigma is volatility (decimal)

For help, run:

quant-greeks --help

Installation

  1. Clone the repository:

    git clone https://github.com/Patience-Fuglo/quant-greeks-cli.git
    cd quant-greeks-cli
    
  2. Set up a Python environment (optional but recommended):

    python3 -m venv .venv
    source .venv/bin/activate
    
  3. Install dependencies:

    pip install -r requirements.txt
    
  4. Install quant-greeks-cli:

pip install quant-greeks-cli


You can install the Quant Greeks CLI tool directly from [PyPI](https://pypi.org/project/quant-greeks-cli/):


## Usage

Calculate option Greeks from the CLI:

```bash
python cli.py --option_type call --S 100 --K 100 --T 1 --r 0.05 --sigma 0.2

Where:

  • --option_type is "call" or "put"
  • --S is the current stock price
  • --K is the strike price
  • --T is time to maturity (in years)
  • --r is the annual risk-free rate (decimal)
  • --sigma is volatility (standard deviation, decimal)

Example

python cli.py --option_type put --S 95 --K 100 --T 0.5 --r 0.01 --sigma 0.15

Testing

Run all tests with:

pytest

(Requires pytest, included in requirements.txt.)


Contributing

  1. Fork the repo and create your feature branch:
    git checkout -b feature/YourFeature
    
  2. Commit your changes and push:
    git commit -m "Describe your feature"
    git push origin feature/YourFeature
    
  3. Open a Pull Request.

License

MIT License


Author

Patience Fuglo

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

quant_greeks_cli-1.0.1.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

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

quant_greeks_cli-1.0.1-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for quant_greeks_cli-1.0.1.tar.gz
Algorithm Hash digest
SHA256 10945c9349db45a0709b89a887aa4bf77c249b642229dbf9549da418c7e5f706
MD5 65d942ee648af5dff4cb05446af59d57
BLAKE2b-256 4f7364c3c8029ec76c872c2d6214bce70984b326f7526d1e5982cb249da4681f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for quant_greeks_cli-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 06372ed3e9cc2e2342a6a1bee469aee40b39db97a1e2798aeb95163988250ff0
MD5 d547ffed66d7d9a9dcace6d0ec8e1858
BLAKE2b-256 26b61c0cfb147b9d0a4a003e77433cefe0e0731807ff3e1711dbb7a71a040d0f

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