Install
$ agentstack add skill-brainbytes-dev-everything-claude-trading-black-scholes ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
Black-Scholes-Merton Model and Extensions
> BSM derivation intuition, formula, put-call parity, Greeks, limitations, and extensions for dividends, American options, and implied volatility.
When to Activate
- User pricing European options or computing implied volatility
- Deriving or interpreting BSM Greeks for hedging
- Understanding BSM assumptions and when they break down
- Extending BSM for dividends, discrete hedging, or jumps
- Computing put-call parity relationships or identifying arbitrage
- Teaching or explaining option pricing fundamentals
Core Concepts
BSM Derivation Intuition
The Black-Scholes-Merton model rests on three pillars:
- Geometric Brownian Motion (GBM): stock price follows dS = muSdt + sigmaSdW
- Log returns are normally distributed: ln(ST/S0) ~ N((mu - sigma^2/2)T, sigma^2T)
- Continuous paths, no jumps — a key limitation
- No-arbitrage / risk-neutral pricing: construct a riskless portfolio of option + delta shares
- The portfolio earns the risk-free rate by no-arbitrage
- Under the risk-neutral measure, the drift of S becomes r (risk-free rate), not mu
- Option price = discounted expected payoff under risk-neutral measure
- Continuous hedging: delta hedge is rebalanced continuously (no transaction costs)
- In practice, discrete hedging introduces hedging error proportional to gamma * (dS)^2
BSM Formula
European Call: C = S N(d1) - K exp(-rT) * N(d2)
European Put: P = K exp(-rT) N(-d2) - S * N(-d1)
Where:
- d1 = [ln(S/K) + (r + sigma^2/2)T] / (sigma sqrt(T))
- d2 = d1 - sigma * sqrt(T)
- N(x) = cumulative standard normal distribution
- S = spot price, K = strike, r = risk-free rate, T = time to expiry, sigma = volatility
Interpretation:
- N(d2) = risk-neutral probability that the option expires in-the-money
- S * N(d1) = present value of receiving the stock conditional on exercise
- K exp(-rT) N(d2) = present value of paying the strike conditional on exercise
- Delta of call = N(d1); Delta of put = N(d1) - 1
Put-Call Parity
For European options with same strike and expiry:
- C - P = S - K * exp(-rT)
- Holds by no-arbitrage regardless of model
- If violated, construct an arbitrage: buy the cheap side, sell the expensive side
- With dividends: C - P = S - PV(dividends) - K * exp(-rT)
- Put-call parity does NOT hold for American options (early exercise creates inequality)
BSM Greeks (Analytical)
Delta: dC/dS = N(d1) for calls; N(d1) - 1 for puts Gamma: d^2C/dS^2 = phi(d1) / (S sigma sqrt(T)) — same for calls and puts Theta: dC/dt = -(S phi(d1) sigma) / (2sqrt(T)) - r K exp(-rT) N(d2) for calls Vega: dC/d(sigma) = S phi(d1) sqrt(T) — same for calls and puts Rho: dC/dr = K T exp(-rT) * N(d2) for calls
Where phi(x) = standard normal density function.
BSM Assumptions and Limitations
- Constant volatility: real markets show volatility smile/skew — OTM puts have higher implied vol
- Log-normal returns: real returns have fat tails and negative skewness
- No jumps: real prices jump (earnings, macro events) — jump-diffusion models address this
- Continuous trading: discrete hedging introduces P&L noise
- No transaction costs: in practice, hedging costs make BSM prices underestimates
- Constant interest rates: relevant for long-dated options on bonds/rates
- No dividends: base BSM assumes no dividends (correctable)
- European exercise: BSM does not price American options directly
Methodology
Implied Volatility Computation
Implied volatility is the sigma that makes BSM price equal to the observed market price.
Newton-Raphson Method:
- Start with initial guess sigma_0 (e.g., 20%)
- Compute BSM price C(sigman) and vega V(sigman)
- Update: sigma{n+1} = sigman - (C(sigman) - Cmarket) / V(sigma_n)
- Converge when |C(sigman) - Cmarket| implied vol.
## Quality Gate
- BSM should only be used as a benchmark; always acknowledge smile/skew effects for real pricing
- Implied volatility must converge within 0.01% accuracy; verify with independent pricer
- Put-call parity must hold to within bid-ask spread; violations indicate data errors or arbitrage
- Greeks must be computed analytically from BSM for European options (not finite differences unless validating)
- For American options, do not use BSM — use binomial trees or finite difference methods
- Dividend treatment must match the actual dividend schedule (discrete dividends for single stocks, continuous yield for indices)
- When BSM implied vol varies significantly across strikes (>5 vol points), note that BSM is failing and a stochastic vol or local vol model is needed
- Validate BSM implementation against known test cases (e.g., ATM call approximately = S * sigma * sqrt(T) * 0.4)
- Document all input assumptions (rate curve, dividend yield, borrow cost) used in BSM calculation
## Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- **Author:** [brainbytes-dev](https://github.com/brainbytes-dev)
- **Source:** [brainbytes-dev/everything-claude-trading](https://github.com/brainbytes-dev/everything-claude-trading)
- **License:** MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.