A CLI tool to calculate Black-Scholes Greeks for options pricing.
Project description
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_typeis "call" or "put"--Sis the current stock price--Kis the strike price--Tis time to maturity (in years)--ris the annual risk-free rate (decimal)--sigmais volatility (decimal)
For help, run:
quant-greeks --help
Installation
-
Clone the repository:
git clone https://github.com/Patience-Fuglo/quant-greeks-cli.git cd quant-greeks-cli
-
Set up a Python environment (optional but recommended):
python3 -m venv .venv source .venv/bin/activate
-
Install dependencies:
pip install -r requirements.txt
-
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_typeis "call" or "put"--Sis the current stock price--Kis the strike price--Tis time to maturity (in years)--ris the annual risk-free rate (decimal)--sigmais 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
- Fork the repo and create your feature branch:
git checkout -b feature/YourFeature
- Commit your changes and push:
git commit -m "Describe your feature" git push origin feature/YourFeature
- 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
10945c9349db45a0709b89a887aa4bf77c249b642229dbf9549da418c7e5f706
|
|
| MD5 |
65d942ee648af5dff4cb05446af59d57
|
|
| BLAKE2b-256 |
4f7364c3c8029ec76c872c2d6214bce70984b326f7526d1e5982cb249da4681f
|
File details
Details for the file quant_greeks_cli-1.0.1-py3-none-any.whl.
File metadata
- Download URL: quant_greeks_cli-1.0.1-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
06372ed3e9cc2e2342a6a1bee469aee40b39db97a1e2798aeb95163988250ff0
|
|
| MD5 |
d547ffed66d7d9a9dcace6d0ec8e1858
|
|
| BLAKE2b-256 |
26b61c0cfb147b9d0a4a003e77433cefe0e0731807ff3e1711dbb7a71a040d0f
|