This calculates option Greeks using the Black-Scholes model and can back out implied volatility from market prices via Newton-Raphson. You give it spot, strike, expiration (either as a date or days to expiry), and optionally a market price to derive IV. It returns delta, gamma, theta, vega, and rho in JSON format. The implementation is straightforward Python with scipy doing the heavy lifting. It's handy when you need quick sensitivity numbers for a specific option position without spinning up a full options platform. Supports both calls and puts, lets you specify historical dates for backtesting, and handles custom volatility or rate assumptions if you want to override the calculations.

skills.sh installs
128
GitHub stars
406
last updated
Jun 11, 2026

Install

$ npx -y skills add staskh/trading_skills --skill greeks --agent claude-code

Installs into .claude/skills of the current project.

Files

Option Greeks

Calculate Greeks for options using Black-Scholes model. Computes IV from market price via Newton-Raphson.

Instructions

Note: If uv is not installed or pyproject.toml is not found, replace uv run python with python in all commands below.

uv run python scripts/greeks.py --spot SPOT --strike STRIKE --type call|put [--expiry YYYY-MM-DD | --dte DTE] [--price PRICE] [--date YYYY-MM-DD] [--vol VOL] [--rate RATE]

Arguments

  • --spot - Underlying spot price (required)
  • --strike - Option strike price (required)
  • --type - Option type: call or put (required)
  • --expiry - Expiration date YYYY-MM-DD (use this OR --dte)
  • --dte - Days to expiration (alternative to --expiry)
  • --date - Calculate as of this date instead of today (YYYY-MM-DD)
  • --price - Option market price (for IV calculation)
  • --vol - Override volatility as decimal (e.g., 0.30 for 30%)
  • --rate - Risk-free rate (default: 0.05)

Output

Sponsors

Details

Repository
github.com/staskh/trading_skills
Category
Finance & Trading
License
MIT
First seen
Jun 11, 2026

More from staskh/trading_skills

All 28
1gracefullight avatarbiome-validatorgracefullight/stock-checkerValidate Biome 2.3+ configuration and detect outdated patterns. Ensures proper schema version, domains, assists, and recommended rules. Use before any linting w124skills.sh installs
2gracefullight avatartypescript-expertgracefullight/stock-checkerTypeScript and JavaScript expert with deep knowledge of type-level programming, performance optimization, monorepo management, migration strategies, and modern 123skills.sh installs
3ethereum avatardata-layerethereum/ethereum-org-websiteThis skill provides patterns for working with the data-layer module. Use when creating/editing files in src/data-layer/, src/lib/data/, or adding new data sourc0skills.sh installs
4longbridge avatargenerate-component-storylongbridge/gpui-componentCreate story examples for components. Use when writing stories, creating examples, or demonstrating component usage.0skills.sh installs
5staskh avatarib-accountstaskh/trading_skillsGet account summary from Interactive Brokers including cash balance, buying power, and account value. Use when user asks about their account, balance, buying po0skills.sh installs
6staskh avatarib-collarstaskh/trading_skillsGenerate tactical collar strategy reports for protecting PMCC positions through earnings or high-risk events. Requires TWS or IB Gateway running locally.0skills.sh installs