mcpField
S
spread-analysis

spread-analysis

github.com/staskhData & databases39496 installsUpdated 1d ago
Repository

About spread-analysis

A command-line skill for analyzing multi-leg options strategies, intended for options traders assessing defined strategy risk and reward. It calculates costs, profit and loss limits, breakeven prices, and an IV-based profit probability.

Key features

  1. 01Analyzes vertical spreads, straddles, strangles, and iron condors
  2. 02Calculates net debit or credit
  3. 03Reports maximum profit and loss
  4. 04Estimates breakeven prices and profit probability
  5. 05Outputs JSON with New York timestamps

Use cases

  1. 01Compare risk and reward across options structures
  2. 02Review breakeven levels before placing a multi-leg trade

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/staskh/trading_skills --skill spread-analysis

After installing, type/spread-analysisin Claude Code to confirm it loaded.

Bundled filesscripts/spreads.py

Details

From the project README

Spread Analysis

Analyze multi-leg option strategies.

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/spreads.py SYMBOL --strategy STRATEGY --expiry YYYY-MM-DD [options]

Strategies and Options

Vertical Spread (bull/bear call/put spread):

uv run python scripts/spreads.py AAPL --strategy vertical --expiry 2026-01-16 --type call --long-strike 180 --short-strike 185

Straddle (long call + long put at same strike):

uv run python scripts/spreads.py AAPL --strategy straddle --expiry 2026-01-16 --strike 180

Strangle (long call + long put at different strikes):

uv run python scripts/spreads.py AAPL --strategy strangle --expiry 2026-01-16 --put-strike 175 --call-strike 185

Iron Condor (sell strangle + buy wider strangle):

uv run python scripts/spreads.py AAPL --strategy iron-condor --expiry 2026-01-16 --put-short 175 --put-long 170 --call-short 185 --call-long 190

Output

Returns JSON with:

  • strategy - Strategy name and legs
  • cost - Net debit or credit
  • max_profit - Maximum potential profit
  • max_loss - Maximum potential loss
  • breakeven - Breakeven price(s)
  • probability - Estimated probability of profit (based on IV)

Explain the risk/reward and when this strategy is appropriate.

Dependencies

  • pandas
  • yfinance

Timezone

All timestamps and time-based calculations must use the America/New_York timezone. All JSON output must include generated_at (NY time string) and data_delay fields.

Comments

Markdown supported