Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
himself65 avatar

Options Payoff

  • 1.9k installs
  • 3.1k repo stars
  • Updated July 21, 2026
  • himself65/finance-skills

options-payoff is an agent skill for plot options payoff diagrams and breakeven analysis for calls and puts.

About

The options-payoff skill is designed for plot options payoff diagrams and breakeven analysis for calls and puts. Current SPX reference price: --- Step 2: Identify Strategy Type Match to one of the supported strategies below, then read the corresponding section in references/strategies.md. Iron Condor Payoff (expiry) --- Step 4: Render the Widget Use visualize:read_me with modules ["chart", "interactive"] before building. Invoke when the user plots options payoff, breakeven, or call/put strategy diagrams.

  • 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.
  • Real-time stats: max profit, max loss, breakevens, current P&L at spot.
  • All strike prices (K1, K2, K3... as needed by strategy).

Options Payoff by the numbers

  • 1,889 all-time installs (skills.sh)
  • +135 installs in the week ending Aug 5, 2026 (Skillselion tracking)
  • Ranked #76 of 1,106 Finance & Trading skills by installs in the Skillselion catalog
  • Security screen: LOW risk (skills.sh audit)
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
At a glance

options-payoff capabilities & compatibility

Capabilities
expiry payoff curve (dashed gray line) — intrins · theoretical value curve (solid colored line) — b · dynamic sliders for all key parameters · real time stats: max profit, max loss, breakeven
From the docs

What options-payoff says it does

Generate an interactive options payoff curve chart with dynamic parameter controls. Use this skill whenever the user shares an options position screenshot, describes an options str
SKILL.md
Generate an interactive options payoff curve chart with dynamic parameter controls. Use this skill whenever the user shares an options position screenshot, desc
SKILL.md
npx skills add https://github.com/himself65/finance-skills --skill options-payoff

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs1.9k
repo stars3.1k
Security audit3 / 3 scanners passed
Last updatedJuly 21, 2026
Repositoryhimself65/finance-skills

How do I plot options payoff diagrams and breakeven analysis for calls and puts?

Plot options payoff diagrams and breakeven analysis for calls and puts.

Who is it for?

Options traders visualizing payoff curves and strategy P/L at expiration.

Skip if: Skip for equity fundamental analysis without options payoff scope.

When should I use this skill?

User plots options payoff, breakeven, or call/put strategy diagrams.

What you get

Completed options-payoff workflow with documented commands, files, and expected deliverables.

  • interactive HTML payoff widget
  • expiry and theoretical payoff curves
  • breakeven and P&L statistics

By the numbers

  • Supports 3 options strategies: Butterfly, Vertical spread, and Calendar spread
  • Exposes 5 adjustable parameters: strikes, premium, IV, DTE, and spot price

Files

SKILL.mdMarkdownGitHub ↗

Options Payoff Curve Skill

Generates a fully interactive HTML widget (via visualize:show_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
  • Real-time stats: max profit, max loss, breakevens, current P&L at spot

---

Step 1: Extract Strategy From User Input

When the user provides a screenshot or text, extract:

FieldWhere to find itDefault if missing
Strategy typeTitle bar / leg description"custom"
UnderlyingTicker symbolSPX
Strike(s)K1, K2, K3... in title or leg tablenearest round number
Premium paid/receivedFilled price or avg price5.00
QuantityPosition size1
Multiplier100 for equity options, 100 for SPX100
ExpiryDate in title30 DTE
Spot priceCurrent underlying price (NOT strike)middle strike
IVShown in greeks panel, or estimate from vega20%
Risk-free rate4.3%

Critical for screenshots: The spot price is the CURRENT price of the underlying index/stock, NOT the strikes. Never default spot to a strike price value.

Current SPX reference price:

!`python3 -c "import yfinance as yf; print(f'SPX ≈ {yf.Ticker(\"^GSPC\").fast_info[\"lastPrice\"]:.0f}')" 2>/dev/null || echo "SPX price unavailable — check market data"`

---

Step 2: Identify Strategy Type

Match to one of the supported strategies below, then read the corresponding section in references/strategies.md.

StrategyLegsKey Identifiers
butterflyBuy K1, Sell 2×K2, Buy K33 strikes, "Butterfly" in title
vertical_spreadBuy K1, Sell K2 (same expiry)2 strikes, debit or credit
calendar_spreadBuy far-expiry K, Sell near-expiry KSame strike, 2 expiries
iron_condorSell K2/K3, Buy K1/K4 wings4 strikes, 2 spreads
straddleBuy Call K + Buy Put KSame strike, both types
strangleBuy OTM Call + Buy OTM Put2 strikes, both OTM
covered_callLong 100 shares + Sell Call KStock + short call
naked_putSell Put KSingle leg
ratio_spreadBuy 1×K1, Sell N×K2Unequal quantities

For strategies not listed, use custom mode: decompose into individual legs and sum their P&Ls.

---

Step 3: Compute Payoffs

Black-Scholes Put Price

d1 = (ln(S/K) + (r + σ²/2)·T) / (σ·√T)
d2 = d1 - σ·√T
put = K·e^(-rT)·N(-d2) - S·N(-d1)

Black-Scholes Call Price (via put-call parity)

call = put + S - K·e^(-rT)

Butterfly Put Payoff (expiry)

if S >= K3: 0
if S >= K2: K3 - S
if S >= K1: S - K1
else: 0

Net P&L per share = payoff − premium_paid

Vertical Spread (call debit) Payoff (expiry)

long_call = max(S - K1, 0)
short_call = max(S - K2, 0)
payoff = long_call - short_call - net_debit

Calendar Spread Theoretical Value

Calendar cannot be expressed as a simple expiry function — always use BS pricing for both legs:

value = BS(S, K, T_far, r, IV_far) - BS(S, K, T_near, r, IV_near)

For expiry curve of calendar: near leg expires worthless, far leg = BS with remaining T.

Iron Condor Payoff (expiry)

put_spread = max(K2-S, 0) - max(K1-S, 0)   // short put spread
call_spread = max(S-K3, 0) - max(S-K4, 0)  // short call spread
payoff = credit_received - put_spread - call_spread

---

Step 4: Render the Widget

Use visualize:read_me with modules ["chart", "interactive"] before building.

Required Controls (sliders)

Structure section:

  • All strike prices (K1, K2, K3... as needed by strategy)
  • Premium paid/received
  • Quantity
  • Multiplier (100 default, show for clarity)

Pricing variables section:

  • IV % (5–80%, step 0.5)
  • DTE — days to expiry (0–90)
  • Risk-free rate % (0–8%)

Spot price:

  • Full-width slider, range = [min_strike - 20%, max_strike + 20%], defaulting to ACTUAL current spot

Required Stats Cards (live-updating)

  • Max profit (expiry)
  • Max loss (expiry)
  • Breakeven(s) — show both for two-sided strategies
  • Current theoretical P&L at spot

Chart Specs

  • X-axis: SPX/underlying price
  • Y-axis: Total USD P&L (not per-share)
  • Blue solid line = theoretical value at current DTE/IV
  • Gray dashed line = expiry payoff
  • Green dashed vertical = strike prices (K2 center strike brighter)
  • Amber dashed vertical = current spot price
  • Fill above zero = green 10% opacity; below zero = red 10% opacity
  • Tooltip: show both curves on hover

Code template

Use this JS structure inside the widget, adapting pnlExpiry() and bfTheory() per strategy:

// Black-Scholes helpers (always include)
function normCDF(x) { /* Horner approximation */ }
function bsCall(S,K,T,r,sig) { /* standard BS call */ }
function bsPut(S,K,T,r,sig) { /* standard BS put */ }

// Strategy-specific expiry payoff (returns per-share value BEFORE premium)
function expiryValue(S, ...strikes) { ... }

// Strategy-specific theoretical value using BS
function theoreticalValue(S, ...strikes, T, r, iv) { ... }

// Main update() reads all sliders, computes arrays, destroys+recreates Chart.js instance
function update() { ... }

// Attach listeners
['k1','k2',...,'iv','dte','rate','spot'].forEach(id => {
  document.getElementById(id).addEventListener('input', update);
});
update();

---

Step 5: Respond to User

After rendering the widget, briefly explain: 1. What strategy was detected and how legs were mapped 2. Max profit / max loss at current settings 3. One key insight (e.g., "spot is currently 950 pts below the profit zone, expiring tomorrow")

Keep it concise — the chart speaks for itself.

---

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

Read the relevant reference file if you're unsure about payoff formula edge cases for a given strategy.

Related skills

How it compares

Pick options-payoff over static chart libraries when you need self-contained HTML widgets with live Black-Scholes curves and strategy-specific leg modeling.

FAQ

What does options-payoff do?

Plot options payoff diagrams and breakeven analysis for calls and puts.

When should I use options-payoff?

User plots options payoff, breakeven, or call/put strategy diagrams.

Is options-payoff safe to install?

Review the Security Audits panel on this page before installing in production.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.