
Options Payoff
Generate interactive options payoff and Black-Scholes P&L charts with sliders when you are sizing or explaining a multi-leg trade.
Overview
options-payoff is an agent skill for the Validate phase that builds interactive options payoff and Black-Scholes P&L charts from strategy legs and parameters.
Install
npx skills add https://github.com/himself65/finance-skills --skill options-payoffWhat is this skill?
- Renders expiry (intrinsic) and Black-Scholes theoretical payoff curves in an interactive HTML widget
- Nine named strategies (butterfly, vertical, calendar, iron condor, straddle, strangle, covered call, naked put, ratio sp
- Live sliders for spot, strikes, premium, IV, and DTE with max profit/loss, breakevens, and P&L at spot
- Triggered by strategy descriptions, broker screenshots (IBKR, TastyTrade, Robinhood, etc.), or payoff/P&L curve requests
- Runs on Claude.ai via the built-in show_widget tool; also documented for generative-ui style hosting
- Nine named multi-leg strategy templates plus custom leg-sum mode
- Dual curves: expiry intrinsic (dashed) and Black-Scholes theoretical (solid)
- Dynamic sliders for strikes, premium, IV, DTE, and spot with live max profit/loss and breakevens
Adoption & trust: 975 installs on skills.sh; 2.7k GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
You know the legs of an options trade but cannot quickly see expiry payoff, theoretical value, breakevens, or how spot and IV moves change max risk and reward.
Who is it for?
Solo builders and traders sketching or reviewing multi-leg options structures who want payoff clarity from chat, leg details, or broker screenshots.
Skip if: Teams that only need live execution, portfolio accounting, or compliance workflows without payoff visualization for defined legs.
When should I use this skill?
You describe an options strategy, upload a broker screenshot, mention strikes/premiums/expiry, or ask to show the payoff, draw the P&L curve, or visualize what the trade looks like.
What do I get? / Deliverables
You get an interactive HTML payoff widget with updated breakevens and P&L stats you can share or embed while you finalize structure and sizing.
- Interactive HTML payoff widget with expiry and theoretical curves
- Strategy stats: max profit, max loss, breakevens, P&L at current spot
- Custom-mode decomposition when the strategy is not in the nine templates
Recommended Skills
Journey fit
Payoff curves answer whether a structure’s risk/reward and breakevens fit your thesis before you commit capital or build tooling around the trade. Pricing and structure validation is where strike, premium, IV, and DTE choices are compared—not after launch or generic research.
How it compares
Use this skill-package payoff generator instead of hand-drawn chat ASCII or a separate desktop options analyzer when you want agent-driven, slider-based HTML charts.
Common Questions / FAQ
Who is options-payoff for?
It is for solo builders, indie fintech makers, and active options traders who use Claude or similar agents to explore structures and need an interactive P&L curve, not a brokerage terminal.
When should I use options-payoff?
Use it in Validate (pricing) when comparing spreads or hedges; in Build (integrations) when prototyping options education UI; and in Operate (iterate) when re-checking an open structure after spot or IV moves—whenever you say show the payoff, name strikes, or upload a broker scre
Is options-payoff safe to install?
Treat it like any third-party agent skill: review the Security Audits panel on this Prism page and inspect the skill package before granting widget or filesystem access in your agent.
SKILL.md
READMESKILL.md - Options Payoff
# options-payoff Generate interactive options payoff curve charts with dynamic parameter controls. ## What it does This skill renders a fully interactive HTML widget showing: - **Expiry payoff curve** (dashed gray line) — intrinsic value at expiration - **Theoretical value curve** (solid colored line) — Black-Scholes price at current DTE/IV - Dynamic sliders for all key parameters (strikes, premium, IV, DTE, spot price) - Real-time stats: max profit, max loss, breakevens, current P&L at spot ## Supported strategies | Strategy | Legs | |---|---| | Butterfly | Buy K1, Sell 2×K2, Buy K3 | | Vertical spread | Buy K1, Sell K2 (same expiry) | | Calendar spread | Buy far-expiry K, Sell near-expiry K | | Iron condor | Sell K2/K3, Buy K1/K4 wings | | Straddle | Buy Call K + Buy Put K | | Strangle | Buy OTM Call + Buy OTM Put | | Covered call | Long 100 shares + Sell Call K | | Naked put | Sell Put K | | Ratio spread | Buy 1×K1, Sell N×K2 | For unlisted strategies, the skill uses `custom` mode — decomposing into individual legs and summing their P&Ls. ## Triggers - Describing an options strategy (e.g., "show me a bull call spread") - Uploading a screenshot from a broker (IBKR, TastyTrade, Robinhood, etc.) - Mentioning strike prices, premiums, or expiry dates - Asking to "show me the payoff", "draw the P&L curve", or "what does this trade look like" ## Platform Works on **Claude.ai** (via the built-in `show_widget` tool) or with the [generative-ui](../../../ui-tools/skills/generative-ui/) skill on Claude Code. ## Setup ```bash # As a plugin (recommended — installs all skills) npx plugins add himself65/finance-skills --plugin finance-market-analysis # Or install just this skill npx skills add himself65/finance-skills --skill options-payoff ``` See the [main README](../../../../README.md) for more installation options. ## Reference files - `references/strategies.md` — Detailed payoff formulas and edge cases for each strategy type - `references/bs_code.md` — Copy-paste ready Black-Scholes JS implementation with normCDF # Black-Scholes JavaScript Implementation Copy-paste ready. Include at the top of every widget's `<script>` block. ```js // Normal CDF via Horner's method (accurate to 7 decimal places) function normCDF(x) { const a1=0.254829592, a2=-0.284496736, a3=1.421413741, a4=-1.453152027, a5=1.061405429, p=0.3275911; const sign = x < 0 ? -1 : 1; x = Math.abs(x); const t = 1 / (1 + p * x); const y = 1 - (((((a5*t + a4)*t + a3)*t + a2)*t + a1)*t) * Math.exp(-x*x/2); return 0.5 * (1 + sign * y); } // Black-Scholes Put price // S=spot, K=strike, T=years to expiry, r=rate (decimal), sigma=IV (decimal) function bsPut(S, K, T, r, sigma) { if (T <= 0) return Math.max(K - S, 0); if (sigma <= 0) return Math.max(K - S, 0); const d1 = (Math.log(S/K) + (r + sigma*sigma/2)*T) / (sigma*Math.sqrt(T)); const d2 = d1 - sigma * Math.sqrt(T); return K * Math.exp(-r*T) * normCDF(-d2) - S * normCDF(-d1); } // Black-Scholes Call price function bsCall(S, K, T, r, sigma) { if (T <= 0) return Math.max(S - K, 0); if (sigma <= 0) return Math.max(S - K, 0); const d1 = (Math.log(S/K) + (r + sigma*sigma/2)*T) / (sigma*Math.sqrt(T)); const d2 = d1 - sigma * Math.sqrt(T); return S * normCDF(d1) - K * Math.exp(-r*T) * normCDF(d2); } ``` ## Typical Parameter Conversions ```js const T = dte / 365; // DTE slider value → years const r = rate / 100; // rate slider % → decimal const sigma = iv / 100; // IV slider % → decimal ``` ## Computing Greeks (for display) ```js function bsDelta(S, K, T, r, sigma, isCall) { if (T <= 0) return isCall ? (S>K?1:0) : (S<K?-1:0); const d1 = (Math.log(S/K) + (r + sigma*sigma/2)*T) / (sigma*Math.sqrt(T)); return isCall ? normCDF(d1) : normCDF(d1) - 1; } function bsTheta(S, K, T, r, sigma, isCall) { if (T <= 0) return 0; const d1 = (Math.log(S/K) + (r + sigma*sigma/2)*T) / (sigma*Math.sqrt(T)); const d2 = d1 - sigma * Math.sqrt(T); const term1 =