关于 options-strategy-advisor
面向交易者的期权分析与教育技能,使用理论定价模型模拟策略,无需实时行情订阅。它可计算 Black-Scholes 价格和 Greeks,评估风险与损益,并可使用 FMP 数据或手动输入。
主要功能
- 01Black-Scholes 定价与 Greeks 计算
- 02期权策略损益模拟
- 03最大收益、亏损及盈亏平衡分析
- 04仓位规模与风险分析
- 05财报相关策略分析
适用场景
- 01比较不同期权策略的损益特征
- 02检查持仓的 Greeks 风险敞口
- 03估算财报相关的期权策略
安装
复制下面的命令,在终端中运行。
npx skills add https:/ / github.com/ tradermonty/ claude-trading-skills --skill options-strategy-advisor安装后在 Claude Code 中输入/options-strategy-advisor确认已加载。
包含的文件
除 SKILL.md 外,安装时一起下载的参考资料和脚本。
README.mdrequirements.txtreferences/black_scholes_methodology.mdscripts/black_scholes.pyscripts/tests/conftest.pytest_black_scholes.pytest_fmp_endpoints.py详细介绍
期权策略顾问
概览
此技能使用理论定价模型,提供全面的期权策略分析与教育,帮助交易者了解、分析和模拟期权策略,而无需订阅实时市场数据服务。
核心能力:
- Black-Scholes 定价:计算期权理论价格和希腊值
- 策略模拟:分析主要期权策略的盈亏
- 财报策略:结合财报日历,进行财报前波动率交易
- 风险管理:分析仓位规模、希腊值敞口、最大亏损和最大盈利
- 教育导向:详细说明策略和风险指标
数据来源:
- FMP API:股票价格、历史波动率、股息、财报日期
- 用户输入:隐含波动率(IV)、无风险利率
- 理论模型:使用 Black-Scholes 计算定价和希腊值
前置条件
必需:
- Python 3.9+,以及
numpy、scipy、requests
可选:
- FMP API 密钥(用于获取实时股价和历史波动率)
- 通过
FMP_API_KEY环境变量或--api-key参数设置 - 无 API 密钥时:手动输入股价和波动率
- 通过
安装:
pip install numpy scipy requests
快速入门示例:
# Basic call option pricing (no API key needed)
python3 scripts/black_scholes.py
# With FMP API key for real-time data
python3 scripts/black_scholes.py --ticker AAPL --api-key $FMP_API_KEY
# Custom option parameters
python3 scripts/black_scholes.py --stock-price 180 --strike 185 --days 30 --volatility 0.25
# Put option analysis
python3 scripts/black_scholes.py --stock-price 180 --strike 175 --days 30 --option-type put
何时使用此技能
在以下情况下使用此技能:
- 用户询问期权策略(“什么是备兑看涨期权?”、“铁鹰策略如何运作?”)
- 用户想要模拟策略盈亏(“看涨看涨价差的最大盈利是多少?”)
- 用户需要希腊值分析(“我的 Delta 敞口是多少?”)
- 用户询问财报策略(“财报发布前应该买入跨式组合吗?”)
- 用户想要比较策略(“备兑看涨期权和保护性看跌期权,哪个更好?”)
- 用户需要仓位规模建议(“我应该交易多少份合约?”)
- 用户询问波动率(“当前 IV 高吗?”)
请求示例:
- “分析 AAPL 的备兑看涨期权”
- “MSFT 的 $100/$105 看涨看涨价差盈亏是多少?”
- “NVDA 发布财报前,我应该交易跨式组合吗?”
- “计算我的铁鹰仓位的希腊值”
- “比较保护性看跌期权和备兑看涨期权的下行保护效果”
支持的策略
收益策略
- 备兑看涨期权 - 持有股票并卖出看涨期权(获取收益,限制上涨空间)
- 现金担保看跌期权 - 以现金作担保卖出看跌期权(收取权利金,并愿意买入股票)
- 穷人版备兑看涨期权 - LEAPS 看涨期权 + 卖出近期看涨期权(资本效率更高)
保护策略
- 保护性看跌期权 - 持有股票并买入看跌期权(保险,限制下行风险)
- 领口策略 - 持有股票,卖出看涨期权 + 买入看跌期权(限制上涨和下跌空间)
方向性策略
- 看涨看涨价差 - 买入较低行权价的看涨期权,卖出较高行权价的看涨期权(风险和收益有限的看涨策略)
- 看涨看跌价差 - 卖出较高行权价的看跌期权,买入较低行权价的看跌期权(信用价差,看涨)
- 看跌看涨价差 - 卖出较低行权价的看涨期权,买入较高行权价的看涨期权(信用价差,看跌)
- 看跌看跌价差 - 买入较高行权价的看跌期权,卖出较低行权价的看跌期权(风险和收益有限的看跌策略)
波动率策略
- 买入跨式组合 - 买入平值看涨期权 + 平值看跌期权(从任一方向的大幅波动中获利)
- 买入宽跨式组合 - 买入虚值看涨期权 + 虚值看跌期权(成本低于跨式组合,但需要更大幅度的波动)
- 卖出跨式组合 - 卖出平值看涨期权 + 平值看跌期权(从价格不变中获利,风险无限)
- 卖出宽跨式组合 - 卖出虚值看涨期权 + 虚值看跌期权(从价格不变中获利,获利区间更宽)
区间策略
- 铁鹰策略 - 看涨看跌价差 + 看跌看涨价差(从价格在区间内波动中获利)
- 铁蝶策略 - 卖出平值跨式组合,买入虚值宽跨式组合(从价格在较窄区间内波动中获利)
高级策略
- 日历价差 - 卖出近期到期期权,买入较远期到期期权(从时间衰减中获利)
- 对角价差 - 行权价不同的日历价差(方向性 + 时间衰减)
- 比例价差 - 不平衡价差(一条腿上的合约数量更多)
分析工作流
第 1 步:收集输入数据
用户必填:
- 股票代码
- 策略类型
- 行权价
- 到期日
- 仓位规模(合约数量)
用户选填:
- 隐含波动率(IV)——若未提供,则使用历史波动率(HV)
- 无风险利率——默认使用当前 3 个月期国库券利率(截至 2025 年约为 5.3%)
从 FMP API 获取:
- 当前股价
- 历史价格(用于计算 HV)
- 股息率
- 即将公布的财报日期(用于财报策略)
用户输入示例:
Ticker: AAPL
Strategy: Bull Call Spread
Long Strike: $180
Short Strike: $185
Expiration: 30 days
Contracts: 10
IV: 25% (or use HV if not provided)
第 2 步:计算历史波动率(未提供 IV 时)
目标: 根据历史价格走势估算波动率。
方法:
# Fetch 90 days of price data
prices = get_historical_prices("AAPL", days=90)
# Calculate daily returns
returns = np.log(prices / prices.shift(1))
# Annualized volatility
HV = returns.std() * np.sqrt(252) # 252 trading days
输出:
- 历史波动率(年化百分比)
- 给用户的提示:“HV = 24.5%,建议使用当前市场 IV,以提高准确性”
用户可以覆盖该值:
- 提供来自券商平台(ThinkorSwim、TastyTrade 等)的 IV
- 脚本接受
--iv 28.0参数
第 3 步:使用 Black-Scholes 为期权定价
Black-Scholes 模型:
对于欧式期权:
Call Price = S * N(d1) - K * e^(-r*T) * N(d2)
Put Price = K * e^(-r*T) * N(-d2) - S * N(-d1)
Where:
d1 = [ln(S/K) + (r + σ²/2) * T] / (σ * √T)
d2 = d1 - σ * √T
S = Current stock price
K = Strike price
r = Risk-free rate
T = Time to expiration (years)
σ = Volatility (IV or HV)
N() = Cumulative standard normal distribution
调整:
- 对看涨期权,从 S 中减去股息现值
- 美式期权:使用近似值,或注明“欧式定价可能会低估美式期权价格”
Python 实现:
from scipy.stats import norm
import numpy as np
def black_scholes_call(S, K, T, r, sigma, q=0):
"""
S: Stock price
K: Strike price
T: Time to expiration (years)
r: Risk-free rate
sigma: Volatility
q: Dividend yield
"""
d1 = (np.log(S/K) + (r - q + 0.5*sigma**2)*T) / (sigma*np.sqrt(T))
d2 = d1 - sigma*np.sqrt(T)
call_price = S*np.exp(-q*T)*norm.cdf(d1) - K*np.exp(-r*T)*norm.cdf(d2)
return call_price
def black_scholes_put(S, K, T, r, sigma, q=0):
d1 = (np.log(S/K) + (r - q + 0.5*sigma**2)*T) / (sigma*np.sqrt(T))
d2 = d1 - sigma*np.sqrt(T)
put_price = K*np.exp(-r*T)*norm.cdf(-d2) - S*np.exp(-q*T)*norm.cdf(-d1)
return put_price
每条期权腿的输出:
- 理论价格
- 提示:“市场价格可能因买卖价差以及美式与欧式定价的差异而有所不同”
第 4 步:计算希腊值
希腊值用于衡量期权价格对各种因素的敏感度:
Delta(Δ): 股价每变动 $1,期权价格的变化量
def delta_call(S, K, T, r, sigma, q=0):
d1 = (np.log(S/K) + (r - q + 0.5*sigma**2)*T) / (sigma*np.sqrt(T))
return np.exp(-q*T) * norm.cdf(d1)
def delta_put(S, K, T, r, sigma, q=0):
d1 = (np.log(S/K) + (r - q + 0.5*sigma**2)*T) / (sigma*np.sqrt(T))
return np.exp(-q*T) * (norm.cdf(d1) - 1)
Gamma(Γ): 股价每变动 $1,Delta 的变化量
def gamma(S, K, T, r, sigma, q=0):
d1 = (np.log(S/K) + (r - q + 0.5*sigma**2)*T) / (sigma*np.sqrt(T))
return np.exp(-q*T) * norm.pdf(d1) / (S * sigma * np.sqrt(T))
Theta(Θ): 期权价格每天的变化量(时间损耗)
def theta_call(S, K, T, r, sigma, q=0):
d1 = (np.log(S/K) + (r - q + 0.5*sigma**2)*T) / (sigma*np.sqrt(T))
d2 = d1 - sigma*np.sqrt(T)
theta = (-S*norm.pdf(d1)*sigma*np.exp(-q*T)/(2*np.sqrt(T))
- r*K*np.exp(-r*T)*norm.cdf(d2)
+ q*S*norm.cdf(d1)*np.exp(-q*T))
return theta / 365 # Per day
Vega(ν): 波动率每变动 1%,期权价格的变化量
def vega(S, K, T, r, sigma, q=0):
d1 = (np.log(S/K) + (r - q + 0.5*sigma**2)*T) / (sigma*np.sqrt(T))
return S * np.exp(-q*T) * norm.pdf(d1) * np.sqrt(T) / 100 # Per 1%
Rho(ρ): 利率每变动 1%,期权价格的变化量
def rho_call(S, K, T, r, sigma, q=0):
d2 = (np.log(S/K) + (r - q + 0.5*sigma**2)*T) / (sigma*np.sqrt(T)) - sigma*np.sqrt(T)
return K * T * np.exp(-r*T) * norm.cdf(d2) / 100 # Per 1%
仓位希腊值:
对于包含多条腿的策略,将所有腿的希腊值相加:
# Example: Bull Call Spread
# Long 1x $180 call
# Short 1x $185 call
delta_position = (1 * delta_long) + (-1 * delta_short)
gamma_position = (1 * gamma_long) + (-1 * gamma_short)
theta_position = (1 * theta_long) + (-1 * theta_short)
vega_position = (1 * vega_long) + (-1 * vega_short)
希腊值解读:
| 希腊值 | 含义 | 示例 |
|---|---|---|
| Delta | 方向性敞口 | Δ = 0.50 → 股价上涨 $1 时盈利 $50 |
| Gamma | Delta 加速变化 | Γ = 0.05 → 股价上涨 $1 时,Delta 增加 0.05 |
| Theta | 每日时间损耗 | Θ = -$5 → 时间流逝每天亏损 $5 |
| Vega | 波动率敏感度 | ν = $10 → IV 上升 1% 时盈利 $10 |
| Rho | 利率敏感度 | ρ = $2 → 利率上升 1% 时盈利 $2 |
第 5 步:模拟策略盈亏
目标: 计算到期时不同股价下的盈亏。
方法:
生成股价范围(例如,当前股价上下浮动 ±30%):
current_price = 180
price_range = np.linspace(current_price * 0.7, current_price * 1.3, 100)
针对每个价格点计算盈亏:
def calculate_pnl(strategy, stock_price_at_expiration):
pnl = 0
for leg in strategy.legs:
if leg.type == 'call':
intrinsic_value = max(0, stock_price_at_expiration - leg.strike)
else: # put
intrinsic_value = max(0, leg.strike - stock_price_at_expiration)
if leg.position == 'long':
pnl += (intrinsic_value - leg.premium_paid) * 100 # Per contract
else: # short
pnl += (leg.premium_received - intrinsic_value) * 100
return pnl * num_contracts
关键指标:
- 最大盈利:可能达到的最高盈亏
- 最大亏损:最差情况下的盈亏
- 盈亏平衡点:盈亏为 0 时对应的股价
- 盈利概率:盈利的价格区间占比(简化估算)
输出示例:
Bull Call Spread: $180/$185 on AAPL (30 DTE, 10 contracts)
Current Price: $180.00
Net Debit: $2.50 per spread ($2,500 total)
Max Profit: $2,500 (at $185+)
Max Loss: -$2,500 (at $180-)
Breakeven: $182.50
Risk/Reward: 1:1
Probability Profit: ~55% (if stock stays above $182.50)
第 6 步:生成盈亏图(ASCII 艺术图)
以可视化方式呈现不同股价下的盈亏:
def generate_pnl_diagram(price_range, pnl_values, current_price, width=60, height=15):
"""Generate ASCII P/L diagram"""
# Normalize to chart dimensions
max_pnl = max(pnl_values)
min_pnl = min(pnl_values)
lines = []
lines.append(f"\nP/L Diagram: {strategy_name}")
lines.append("-" * width)
# Y-axis levels
levels = np.linspace(max_pnl, min_pnl, height)
for level in levels:
if abs(level) < (max_pnl - min_pnl) * 0.05:
label = f" 0 |" # Zero line
else:
label = f"{level:6.0f} |"
row = label
for i in range(width - len(label)):
idx = int(i / (width - len(label)) * len(price_range))
pnl = pnl_values[idx]
price = price_range[idx]
# Determine character
if abs(pnl - level) < (max_pnl - min_pnl) / height:
if pnl > 0:
char = '█' # Profit
elif pnl < 0:
char = '░' # Loss
else:
char = '─' # Breakeven
elif abs(level) < (max_pnl - min_pnl) * 0.05:
char = '─' # Zero line
elif abs(price - current_price) < (price_range[-1] - price_range[0]) * 0.02:
char = '│' # Current price line
else:
char = ' '
row += char
lines.append(row)
lines.append(" " * 6 + "|" + "-" * (width - 6))
lines.append(" " * 6 + f"${price_range[0]:.0f}" + " " * (width - 20) + f"${price_range[-1]:.0f}")
lines.append(" " * (width // 2 - 5) + "Stock Price")
return "\n".join(lines)
输出示例:
P/L Diagram: Bull Call Spread $180/$185
------------------------------------------------------------
+2500 | ████████████████████
| ██████
| ██████
| ██████
0 | ──────
| ░░░░░░
|░░░░░░
-2500 |░░░░░
|____________________________________________________________
$126 $180 $234
Stock Price
Legend: █ Profit ░ Loss ── Breakeven │ Current Price
第 7 步:针对策略类型进行分析
根据策略类型提供定制建议:
备兑看涨期权:
Income Strategy: Generate premium while capping upside
Setup:
- Own 100 shares of AAPL @ $180
- Sell 1x $185 call (30 DTE) for $3.50
Max Profit: $850 (Stock at $185+ = $5 stock gain + $3.50 premium)
Max Loss: Unlimited downside (stock ownership)
Breakeven: $176.50 (Cost basis - premium received)
Greeks:
- Delta: -0.30 (reduces stock delta from 1.00 to 0.70)
- Theta: +$8/day (time decay benefit)
Assignment Risk: If AAPL > $185 at expiration, shares called away
When to Use:
- Neutral to slightly bullish
- Want income in sideways market
- Willing to sell stock at $185
Exit Plan:
- Buy back call if stock rallies strongly (preserve upside)
- Let expire if stock stays below $185
- Roll to next month if want to keep shares
保护性看跌期权:
Insurance Strategy: Limit downside while keeping upside
Setup:
- Own 100 shares of AAPL @ $180
- Buy 1x $175 put (30 DTE) for $2.00
Max Profit: Unlimited (stock can rise infinitely)
Max Loss: -$7 per share = ($5 stock loss + $2 premium)
Breakeven: $182 (Cost basis + premium paid)
Greeks:
- Delta: +0.80 (stock delta 1.00 - put delta 0.20)
- Theta: -$6/day (time decay cost)
Protection: Guaranteed to sell at $175, no matter how far stock falls
When to Use:
- Own stock, worried about short-term drop
- Earnings coming up, want protection
- Alternative to stop-loss (can't be stopped out)
Cost: "Insurance premium" - typically 1-3% of stock value
Exit Plan:
- Let expire worthless if stock rises (cost of insurance)
- Exercise put if stock falls below $175
- Sell put if stock drops but want to keep shares
铁鹰式期权:
Range-Bound Strategy: Profit from low volatility
Setup (example on AAPL @ $180):
- Sell $175 put for $1.50
- Buy $170 put for $0.50
- Sell $185 call for $1.50
- Buy $190 call for $0.50
Net Credit: $2.00 ($200 per iron condor)
Max Profit: $200 (if stock stays between $175-$185)
Max Loss: $300 (if stock moves outside $170-$190)
Breakevens: $173 and $187
Profit Range: $175 to $185 (58% probability)
Greeks:
- Delta: ~0 (market neutral)
- Theta: +$15/day (time decay benefit)
- Vega: -$25 (short volatility)
When to Use:
- Expect low volatility, range-bound movement
- After big move, think consolidation
- High IV environment (sell expensive options)
Risk: Unlimited if one side tested
- Use stop loss at 2x credit received (exit at -$400)
Adjustments:
- If tested on one side, roll that side out in time
- Close early at 50% max profit to reduce tail risk
第 8 步:财报策略分析
与财报日历集成:
用户询问财报策略时,获取财报日期:
from earnings_calendar import get_next_earnings_date
earnings_date = get_next_earnings_date("AAPL")
days_to_earnings = (earnings_date - today).days
财报发布前策略:
买入跨式/宽跨式:
Setup (AAPL @ $180, earnings in 7 days):
- Buy $180 call for $5.00
- Buy $180 put for $4.50
- Total Cost: $9.50
Thesis: Expect big move (>5%) but unsure of direction
Breakevens: $170.50 and $189.50
Profit if: Stock moves >$9.50 in either direction
Greeks:
- Delta: ~0 (neutral)
- Vega: +$50 (long volatility)
- Theta: -$25/day (time decay hurts)
IV Crush Risk: ⚠️ CRITICAL
- Pre-earnings IV: 40% (elevated)
- Post-earnings IV: 25% (typical)
- IV drop: -15 points = -$750 loss even if stock doesn't move!
Analysis:
- Implied Move: √(DTE/365) × IV × Stock Price
= √(7/365) × 0.40 × 180 = ±$10.50
- Breakeven Move Needed: ±$9.50
- Probability Profit: ~30-40% (implied move > breakeven move)
Recommendation:
✅ Consider if you expect >10% move (larger than implied)
❌ Avoid if expect normal ~5% earnings move (IV crush will hurt)
Alternative: Buy further OTM strikes to reduce cost
- $175/$185 strangle cost $4.00 (need >$8 move, but cheaper)
卖出铁鹰式期权:
Setup (AAPL @ $180, earnings in 7 days):
- Sell $170/$175 put spread for $2.00
- Sell $185/$190 call spread for $2.00
- Net Credit: $4.00
Thesis: Expect stock to stay range-bound ($175-$185)
Profit Zone: $175 to $185
Max Profit: $400
Max Loss: $100
IV Crush Benefit: ✅
- Short high IV before earnings
- IV drops after earnings → profit on vega
- Even if stock moves slightly, IV drop helps
Greeks:
- Delta: ~0 (market neutral)
- Vega: -$40 (short volatility - good here!)
- Theta: +$20/day
Recommendation:
✅ Good if expect normal earnings reaction (<8% move)
✅ Benefit from IV crush regardless of direction
⚠️ Risk if stock gaps outside range (>10% move)
Exit Plan:
- Close next day if IV crushed (capture profit early)
- Use stop loss if one side tested (-2x credit)
第 9 步:风险管理指导
仓位规模:
Account Size: $50,000
Risk Tolerance: 2% per trade = $1,000 max risk
Iron Condor Example:
- Max loss per spread: $300
- Max contracts: $1,000 / $300 = 3 contracts
- Actual position: 3 iron condors
Bull Call Spread Example:
- Debit paid: $2.50 per spread
- Max contracts: $1,000 / $250 = 4 contracts
- Actual position: 4 spreads
投资组合希腊值管理:
Portfolio Guidelines:
- Delta: -10 to +10 (mostly neutral)
- Theta: Positive preferred (seller advantage)
- Vega: Monitor if >$500 (IV risk)
Current Portfolio:
- Delta: +5 (slightly bullish)
- Theta: +$150/day (collecting $150 daily)
- Vega: -$300 (short volatility)
Interpretation:
✅ Neutral delta (safe)
✅ Positive theta (time working for you)
⚠️ Short vega: If IV spikes, lose $300 per 1% IV increase
→ Reduce short premium positions if VIX rising
调整与退出:
Exit Rules by Strategy:
Covered Call:
- Profit: 50-75% of max profit
- Loss: Stock drops >5%, buy back call to preserve upside
- Time: 7-10 DTE, roll to avoid assignment
Spreads:
- Profit: 50% of max profit (close early, reduce tail risk)
- Loss: 2x debit paid (cut losses early)
- Time: 21 DTE, close or roll (avoid gamma risk)
Iron Condor:
- Profit: 50% of credit (close early common)
- Loss: One side tested, 2x credit lost
- Adjustment: Roll tested side out in time
Straddle/Strangle:
- Profit: Stock moved >breakeven, close immediately
- Loss: Theta eating position, stock not moving
- Time: Day after earnings (if earnings play)
输出格式
策略分析报告模板:
# Options Strategy Analysis: [Strategy Name]
**Symbol:** [TICKER]
**Strategy:** [Strategy Type]
**Expiration:** [Date] ([DTE] days)
**Contracts:** [Number]
---
## Strategy Setup
### Leg Details
| Leg | Type | Strike | Price | Position | Quantity |
|-----|------|--------|-------|----------|----------|
| 1 | Call | $180 | $5.00 | Long | 1 |
| 2 | Call | $185 | $2.50 | Short | 1 |
**Net Debit/Credit:** $2.50 debit ($250 total for 1 spread)
---
## Profit/Loss Analysis
**Max Profit:** $250 (at $185+)
**Max Loss:** -$250 (at $180-)
**Breakeven:** $182.50
**Risk/Reward Ratio:** 1:1
**Probability Analysis:**
- Probability of Profit: ~55% (stock above $182.50)
- Expected Value: $25 (simplified)
---
## P/L Diagram
[ASCII art diagram here]
---
## Greeks Analysis
### Position Greeks (1 spread)
- **Delta:** +0.20 (gains $20 if stock +$1)
- **Gamma:** +0.03 (delta increases by 0.03 if stock +$1)
- **Theta:** -$5/day (loses $5 per day from time decay)
- **Vega:** +$8 (gains $8 if IV increases 1%)
### Interpretation
- **Directional Bias:** Slightly bullish (positive delta)
- **Time Decay:** Working against you (negative theta)
- **Volatility:** Benefits from IV increase (positive vega)
---
## Risk Assessment
### Maximum Risk
**Scenario:** Stock falls below $180
**Max Loss:** -$250 (100% of premium paid)
**% of Account:** 0.5% (if $50k account)
### Assignment Risk
**Early Assignment:** Low (calls have time value)
**At Expiration:** Manage positions if in-the-money
---
## Trade Management
### Entry
✅ Enter if: [Conditions]
- Stock price $178-$182
- IV below 30%
- >21 DTE
### Profit Taking
- **Target 1:** 50% profit ($125) - Close half
- **Target 2:** 75% profit ($187.50) - Close all
### Stop Loss
- **Trigger:** Stock falls below $177 (-$150 loss)
- **Action:** Close position immediately
### Adjustments
- If stock rallies to $184, consider rolling short call higher
- If stock drops to $179, add second spread at $175/$180
---
## Suitability
### When to Use This Strategy
✅ Moderately bullish on AAPL
✅ Expect upside to $185-$190
✅ Want defined risk
✅ 21-45 DTE timeframe
### When to Avoid
❌ Very bullish (buy stock or long call instead)
❌ High IV environment (wait for IV to drop)
❌ Earnings in <7 days (IV crush risk)
---
## Alternatives Comparison
| Strategy | Max Profit | Max Loss | Complexity | When Better |
|----------|-----------|----------|------------|-------------|
| Bull Call Spread | $250 | -$250 | Medium | Moderately bullish |
| Long Call | Unlimited | -$500 | Low | Very bullish |
| Covered Call | $850 | Unlimited | Medium | Own stock already |
| Bull Put Spread | $300 | -$200 | Medium | Want credit spread |
**Recommendation:** Bull call spread is good balance of risk/reward for moderate bullish thesis.
---
*Disclaimer: This is theoretical analysis using Black-Scholes pricing. Actual market prices may differ. Trade at your own risk. Options are complex instruments with significant loss potential.*
文件命名约定:
options_analysis_[TICKER]_[STRATEGY]_[DATE].md
示例:options_analysis_AAPL_BullCallSpread_2025-11-08.md
关键原则
理论定价的局限性
用户应了解的内容:
-
Black-Scholes 假设:
- 欧式期权(不能提前行权)
- 波动率恒定(实际中的 IV 会变化)
- 无交易成本
- 连续交易
-
实际价格与理论价格:
- 买卖价差:实际成本高于理论价格
- 美式期权:可以提前行权(尤其是价内看跌期权)
- 流动性:流动性差的期权市场价差较大
- 股息:除息日会影响定价
-
最佳实践:
- 将其用作教育工具和比较分析工具
- 交易前从经纪商处获取实时报价
- 理解理论价格 ≈ 市场中间价
- 将佣金和滑点纳入考虑
波动率指南
历史波动率与隐含波动率:
Historical Volatility (HV): What happened
- Calculated from past price movements
- Objective, based on data
- Available for free (FMP API)
Implied Volatility (IV): What market expects
- Derived from option prices
- Subjective, based on supply/demand
- Requires live options data (user provides)
Comparison:
- IV > HV: Options expensive (consider selling)
- IV < HV: Options cheap (consider buying)
- IV = HV: Fairly priced
IV 百分位:
用户提供当前 IV,我们计算百分位:
# Fetch 1-year HV data
historical_hvs = calculate_hv_series(prices_1yr, window=30)
# Calculate IV percentile
iv_percentile = percentileofscore(historical_hvs, current_iv)
if iv_percentile > 75:
guidance = "High IV - consider selling premium (credit spreads, iron condors)"
elif iv_percentile < 25:
guidance = "Low IV - consider buying options (long calls/puts, debit spreads)"
else:
guidance = "Normal IV - any strategy appropriate"
与其他技能集成
财报日历:
- 自动获取财报日期
- 推荐针对财报的策略
- 计算距离财报的天数(DTE 对 IV 至关重要)
- 提醒 IV 崩跌风险
技术分析师:
- 使用支撑位/阻力位选择行权价
- 通过趋势分析制定方向性策略
- 根据突破潜力确定跨式/宽跨式策略的时机
美国股票分析:
- 通过基本面分析制定较长期策略(LEAPS)
- 使用股息收益率分析备兑看涨/看跌策略
- 通过财报质量分析财报交易策略
泡沫检测器:
- 泡沫风险高 → 重点考虑保护性看跌期权
- 风险低 → 看涨策略
- 风险极高 → 避免买入期权费(时间价值损耗会造成影响)
投资组合管理器:
- 将期权持仓与股票持仓一并跟踪
- 汇总整个投资组合的 Greeks
- 将期权用作股票持仓的对冲工具
重要说明
- 所有分析均使用英语
- 注重教育:清晰解释各类策略
- 理论定价:Black-Scholes 近似值
- 用户输入 IV:可选,默认为 HV
- 无需实时数据:FMP 免费版足够
- 依赖项:Python 3.9+、numpy、scipy、requests
常见用例
用例 1:学习策略
User: "Explain a covered call"
Workflow:
1. Read the strategy descriptions in this document and the pricing methodology
in references/black_scholes_methodology.md
2. Explain concept, risk/reward, when to use
3. Simulate example on AAPL
4. Show P/L diagram
5. Compare to alternatives
用例 2:分析特定交易
User: "Analyze $180/$185 bull call spread on AAPL, 30 days"
Workflow:
1. Fetch AAPL price from FMP
2. Calculate HV or ask user for IV
3. Price both options (Black-Scholes)
4. Calculate Greeks
5. Simulate P/L
6. Generate analysis report
用例 3:财报策略
User: "Should I trade options before NVDA earnings?"
Workflow:
1. Fetch NVDA earnings date (Earnings Calendar)
2. Calculate days to earnings
3. Estimate IV percentile (if user provides IV)
4. Suggest straddle/strangle vs iron condor
5. Warn about IV crush
6. Simulate both strategies
用例 4:检查投资组合 Greeks
User: "What are my total portfolio Greeks?"
Workflow:
1. User provides current positions
2. Calculate Greeks for each position
3. Sum Greeks across portfolio
4. Assess overall exposure
5. Suggest adjustments if needed
故障排除
问题:无法获取 IV
- 解决方案:使用 HV 作为替代值,并告知用户
- 请用户提供经纪商平台上的 IV
问题:期权价格为负
- 解决方案:检查输入(行权价与股票价格)
- 深度价内期权可能存在数值问题
问题:Greeks 似乎不正确
- 解决方案:核实输入值(T、sigma、r)
- 检查使用的是年化值还是日值
问题:策略过于复杂
- 解决方案:拆分为各个期权腿,分别分析
- 参考文档了解策略详情
资源
参考资料:
references/black_scholes_methodology.md- Black-Scholes 公式、Greeks 及其解读
脚本:
scripts/black_scholes.py- 定价引擎和 Greeks
外部资源:
- Options Playbook:https://www.optionsplaybook.com/
- CBOE 教育资源:https://www.cboe.com/education/
- Black-Scholes 计算器:可用于核验的各种在线工具
版本:1.0 最后更新:2025-11-08 依赖项:Python 3.9+、numpy、scipy、requests API:FMP API(免费版足够)