From option-pricing
Price American options and capture the early-exercise premium via a Cox-Ross-Rubinstein binomial tree. Use this skill whenever the user asks about American-style options, dividend-paying stocks with optimal exercise, early exercise decisions, or compares American vs European pricing. Triggers: "American option", "early exercise", "dividend exercise", "exercise premium", "CRR tree", "binomial", "lattice", "should I exercise this option early", "American put on TSLA", "is it ever optimal to exercise". Activate even with partial input — defaults: r = 4.3%, q = 0, steps = 200.
How this skill is triggered — by the user, by Claude, or both
Slash command
/option-pricing:binomial-pricingThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Price American calls and puts via a Cox-Ross-Rubinstein binomial tree. Recover the European price as a sanity check and report the **early-exercise premium** = American − European.
Price American calls and puts via a Cox-Ross-Rubinstein binomial tree. Recover the European price as a sanity check and report the early-exercise premium = American − European.
Same as Black-Scholes (S, K, T years, r, q, σ, opt_type) plus:
| Field | Notes | Default |
|---|---|---|
| n_steps | Tree depth | 200 |
| style | "american" or "european" | american |
For discrete dividends, use the escrowed-dividend trick (subtract PV of dividends from S before building the tree).
dt = T / n
u = exp(σ · √dt)
d = 1 / u
p = (exp((r − q)·dt) − d) / (u − d)
disc = exp(−r·dt)
If p ∉ [0, 1], the tree is ill-conditioned (e.g., σ too small relative to drift over dt) — stop and report. Increase n_steps or reduce |r − q|·dt.
At node (i, j) with i = 0..n and j = number of up-moves:
S_ij = S · u^j · d^(i − j)
payoff_call_i = max(S_ni − K, 0)
payoff_put_i = max(K − S_ni, 0)
For each time step i from n−1 down to 0, for each node j ≤ i:
S_ij = S · u^j · d^(i − j)
continuation = disc · (p · V_(i+1, j+1) + (1 − p) · V_(i+1, j))
if style == "american":
V_ij = max(continuation, max(S_ij − K, 0)) # call
V_ij = max(continuation, max(K − S_ij, 0)) # put
else:
V_ij = continuation
V_00 is the option price.
style = "european" and compare to your Black-Scholes price → residual must be < 1% for n ≥ 200 (converges as O(1/n)).Report:
n_steps.For pure European pricing, recommend black-scholes (faster, exact).
Provides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
npx claudepluginhub dongzhuoyao/finance-option-skills --plugin option-pricing