/tradecraft:options-tradingfrom tradecraft
Provides options pricing via Black-Scholes, Greeks (delta/gamma/theta/vega/rho plus second-order), implied volatility extraction, multi-leg strategy analysis, IV surface construction, and option chain screening.
Ships in tradecraft. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Skill: Options Trading | Domain: trading | Category: asset-class | Level: advanced Tags:
trading,asset-class,options,greeks,iv,multi-leg,volatility
Complete options pricing and strategy analysis toolkit. Implements Black-Scholes (1973) pricing, all five first-order Greeks plus second-order (charm, vanna, volga), implied volatility extraction, multi-leg strategy payoff analysis, IV surface construction, and option chain screening.
xtrading/skills/options.py
from xtrading.skills.options import OptionsPricing
# European call price
price = OptionsPricing.black_scholes(S=100, K=100, T=0.25, r=0.05, sigma=0.20, option_type="call")
# → ~5.07
# Put-call parity holds:
# call - put = S - K * exp(-rT)
# Implied volatility (Brent solver)
iv = OptionsPricing.implied_volatility(
market_price=5.0, S=100, K=100, T=0.25, r=0.05, option_type="call"
)
# → 0.1963 (≈20% IV)
# Binomial tree (American options)
am_put = OptionsPricing.binomial_price(
S=100, K=100, T=0.25, r=0.05, sigma=0.20, option_type="put", american=True
)
# Monte Carlo with confidence interval
mc = OptionsPricing.monte_carlo_price(S=100, K=100, T=0.25, r=0.05, sigma=0.20, n_paths=100_000)
# → {"price": 5.07, "std_error": 0.02, "ci_95_lower": 5.03, "ci_95_upper": 5.11}
from xtrading.skills.options import GreeksCalculator
# All Greeks in one call
greeks = GreeksCalculator.all_greeks(S=100, K=100, T=0.25, r=0.05, sigma=0.20, option_type="call")
# {
# "price": 5.07, "delta": 0.5377, "gamma": 0.0394,
# "theta": -0.0451, "vega": 0.1974, "rho": 0.1220,
# "charm": -0.00015, "vanna": 0.0789, "volga": 0.3948,
# "moneyness": "ATM", "intrinsic": 0.0, "time_value": 5.07
# }
# Individual Greeks
delta = GreeksCalculator.delta(S=105, K=100, T=0.25, r=0.05, sigma=0.20, option_type="call")
# → 0.726 (ITM call, delta > 0.5)
gamma = GreeksCalculator.gamma(S=100, K=100, T=0.25, r=0.05, sigma=0.20)
# → 0.0394 (always positive)
theta = GreeksCalculator.theta(S=100, K=100, T=0.25, r=0.05, sigma=0.20, option_type="call")
# → -0.0451 per day (time decay)
from xtrading.skills.options import StrategyBuilder
# Bull Call Spread
builder = StrategyBuilder.bull_call_spread(
symbol="SPY", S=100, K_long=100, K_short=110,
T=0.25, r=0.05, sigma=0.20
)
result = builder.analyse()
# result.strategy_name = "Bull Call Spread"
# result.net_premium = -1.23 (debit: negative)
# result.max_profit = 8.77
# result.max_loss = -1.23
# result.breakeven_prices = [101.23]
# result.risk_reward = 7.13
# result.probability_of_profit = 0.41
# Iron Condor
ic = StrategyBuilder.iron_condor(
symbol="SPX", S=4000,
K_put_long=3800, K_put_short=3900,
K_call_short=4100, K_call_long=4200,
T=0.25, r=0.05, sigma=0.18
)
result = ic.analyse()
# result.net_premium = +3.45 (credit)
# result.max_profit = 3.45
# result.max_loss = -96.55
# Long Straddle
straddle = StrategyBuilder.long_straddle(
symbol="AAPL", S=150, K=150, T=0.25, r=0.05, sigma=0.35
)
result = straddle.analyse()
# Two breakeven prices: [139.xx, 160.xx]
import pandas as pd
from xtrading.skills.options import VolatilitySurface
# Build from option chain data
surface_data = pd.DataFrame({
"strike": [90, 95, 100, 105, 110, 90, 95, 100, 105, 110],
"expiry_days": [30]*5 + [60]*5,
"iv": [0.25, 0.22, 0.20, 0.21, 0.23, 0.27, 0.24, 0.22, 0.23, 0.25],
})
vs = VolatilitySurface(surface_data)
# Smile at 30-day expiry
smile = vs.smile_at_expiry(expiry_days=30, atm_strike=100)
# {"atm_iv": 0.20, "skew_25d": -0.02, "butterfly_25d": 0.015, "bias": "put_skew"}
# Term structure
ts = vs.term_structure(atm_strike=100)
# DataFrame: expiry_days → atm_iv, vix_equiv, annualised_cost_pct
# IV Rank
import numpy as np
hist = pd.Series(np.linspace(0.10, 0.40, 252))
rank = vs.iv_rank(current_iv=0.30, historical_ivs=hist)
# {"iv_rank": 66.7, "regime": "NORMAL_IV", "strategy_bias": "NEUTRAL"}
# Arbitrage check
arb = vs.validate_no_arbitrage()
# {"arbitrage_free": True, "violations": [], "n_violations": 0}
from xtrading.skills.options import OptionScreener
screener = OptionScreener(chain_df, underlying_price=100.0, r=0.05)
# Screen for short-premium setups (30-60 DTE, 0.20-0.45 delta)
candidates = screener.screen(
min_pop=0.60, min_dte=30, max_dte=60,
min_delta=0.20, max_delta=0.45,
option_type="put",
)
# Expected move calculation
em = screener.expected_move(expiry_days=30)
# {"expected_move_pts": 5.07, "expected_move_pct": 5.07,
# "upper_bound": 105.07, "lower_bound": 94.93}
Black-Scholes Call: S*N(d1) - K*exp(-rT)*N(d2)
Black-Scholes Put: K*exp(-rT)*N(-d2) - S*N(-d1)
d1 = [ln(S/K) + (r + σ²/2)*T] / (σ*√T)
d2 = d1 - σ*√T
Delta (call) = N(d1)
Delta (put) = N(d1) - 1
Gamma = N'(d1) / (S*σ*√T)
Theta (call) = [-S*N'(d1)*σ/(2√T) - r*K*exp(-rT)*N(d2)] / 365
Vega = S*√T*N'(d1) / 100
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub mahmoud20138/tradecraft --plugin tradecraft169 skills in this plugin
/agent-developmentThis skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins./agentic-storageAgentic storage architecture — persistent memory for AI agents using MCP, immutable versioning, sandboxing, and intent validation. Covers the stateless problem in LLM agents, RAG limitations (read-only), MCP protocol (JSON-RPC, resources, tools), storage safety layers, and agent file system design. Source: IBM Technology (Martin Keen), March 2026. Use this skill for "agentic storage", "agent memory", "persistent agent state", "MCP storage", "agent file system", "agent hard drive", "stateless agent problem", "agent work product", "immutable versioning", "agent sandboxing", "intent validation", "agent safety layers", "agent context window limits", "storage for AI agents", "agent persistence", "autonomous agent storage", "agent audit trail". Works with mcp-integration, trading-brain, agents, trade-psychology-coach.
Other plugins' skills for the same job