greeks

GitHub

基于Black-Scholes模型计算期权希腊字母(Delta、Gamma等)及隐含波动率。支持指定标的价格、行权价、到期日及市场报价,通过Newton-Raphson算法反推IV,并输出JSON格式结果及术语解释。

.claude/skills/greeks/SKILL.md staskh/trading_skills

触发场景

用户询问期权希腊字母(如delta, gamma, theta, vega) 需要计算隐含波动率(IV) 进行期权敏感性分析

安装

npx skills add staskh/trading_skills --skill greeks -g -y
更多选项

非标准路径

npx skills add https://github.com/staskh/trading_skills/tree/main/.claude/skills/greeks -g -y

不安装直接使用

npx skills use staskh/trading_skills@greeks

指定 Agent (Claude Code)

npx skills add staskh/trading_skills --skill greeks -a claude-code -g -y

安装 repo 全部 skill

npx skills add staskh/trading_skills --all -g -y

预览 repo 内 skill

npx skills add staskh/trading_skills --list

SKILL.md

Frontmatter
{
    "name": "greeks",
    "description": "Calculate option Greeks (delta, gamma, theta, vega) and implied volatility for specific options. Use when user asks about Greeks, delta, gamma, theta, vega, IV, or option sensitivity analysis.",
    "dependencies": [
        "trading-skills"
    ]
}

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

Returns JSON with:

  • spot - Underlying spot price
  • strike - Strike price
  • days_to_expiry - Days until expiration
  • iv - Implied volatility (calculated from market price)
  • greeks - delta, gamma, theta, vega, rho

Examples

# With expiry date and market price (calculates IV)
uv run python scripts/greeks.py --spot 630 --strike 600 --expiry 2026-05-15 --type call --price 72.64

# With DTE directly
uv run python scripts/greeks.py --spot 630 --strike 600 --dte 30 --type call --price 40

# As of a future date
uv run python scripts/greeks.py --spot 630 --strike 600 --expiry 2026-05-15 --date 2026-03-01 --type call --price 50

Explain what each Greek means for the position.

Dependencies

  • scipy

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.

版本历史

  • cc30858 当前 2026-07-05 11:04

依赖关系

  • required trading-skills

同 Skill 集合

.claude/skills/earnings-calendar/SKILL.md
.claude/skills/fundamentals/SKILL.md
.claude/skills/ib-account/SKILL.md
.claude/skills/ib-collar/SKILL.md
.claude/skills/ib-create-consolidated-report/SKILL.md
.claude/skills/ib-find-short-roll/SKILL.md
.claude/skills/ib-option-chain/SKILL.md
.claude/skills/ib-pmcc-advisor/SKILL.md
.claude/skills/ib-portfolio-action-report/SKILL.md
.claude/skills/ib-portfolio/SKILL.md
.claude/skills/ib-report-delta-adjusted-notional-exposure/SKILL.md
.claude/skills/ib-stop-loss/SKILL.md
.claude/skills/ib-trades-history/SKILL.md
.claude/skills/ib-trailing-stop/SKILL.md
.claude/skills/insider-trading/SKILL.md
.claude/skills/markdown-to-pdf/SKILL.md
.claude/skills/news-sentiment/SKILL.md
.claude/skills/option-chain/SKILL.md
.claude/skills/price-history/SKILL.md
.claude/skills/report-stock/SKILL.md
.claude/skills/risk-assessment/SKILL.md
.claude/skills/scanner-bullish/SKILL.md
.claude/skills/scanner-pmcc/SKILL.md
.claude/skills/spread-analysis/SKILL.md
.claude/skills/stock-quote/SKILL.md
.claude/skills/technical-analysis/SKILL.md
.claude/skills/whale-hunting/SKILL.md

元信息

文件数
0
版本
cc30858
Hash
8beba046
收录时间
2026-07-05 11:04

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-07-13 22:48
浙ICP备14020137号-1 $访客地图$