AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Black Scholes

skill-brainbytes-dev-everything-claude-trading-black-scholes · by brainbytes-dev

A Claude skill from brainbytes-dev/everything-claude-trading.

No reviews yet
0 installs
14 views
0.0% view→install

Install

$ agentstack add skill-brainbytes-dev-everything-claude-trading-black-scholes

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No 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.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-brainbytes-dev-everything-claude-trading-black-scholes)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
4mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

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 →
Are you the author of Black Scholes? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

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:

  1. 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
  1. 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
  1. 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

  1. Constant volatility: real markets show volatility smile/skew — OTM puts have higher implied vol
  2. Log-normal returns: real returns have fat tails and negative skewness
  3. No jumps: real prices jump (earnings, macro events) — jump-diffusion models address this
  4. Continuous trading: discrete hedging introduces P&L noise
  5. No transaction costs: in practice, hedging costs make BSM prices underestimates
  6. Constant interest rates: relevant for long-dated options on bonds/rates
  7. No dividends: base BSM assumes no dividends (correctable)
  8. 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:

  1. Start with initial guess sigma_0 (e.g., 20%)
  2. Compute BSM price C(sigman) and vega V(sigman)
  3. Update: sigma{n+1} = sigman - (C(sigman) - Cmarket) / V(sigma_n)
  4. 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.

Versions

  • v0.1.0 Imported from the upstream source.