plugins/market-analysis/skills/options-payoff/SKILL.md
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 strategy, or asks to visualize how an options trade makes or loses money. Triggers include: any mention of butterfly, spread (vertical/calendar/diagonal/ratio), straddle, strangle, condor, covered call, protective put, iron condor, or any multi-leg options structure. Also triggers when a user pastes strike prices, premiums, expiry dates, or says things like "show me the payoff", "draw the P&L curve", "what does this trade look like", or uploads a screenshot from a broker (IBKR, TastyTrade, Robinhood, etc). Always use this skill even if the user only provides partial info — extract what you can and use defaults for the rest.
npx skillsauth add himself65/finance-skills options-payoffInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Generates a fully interactive HTML widget (via visualize:show_widget) showing:
When the user provides a screenshot or text, extract:
| Field | Where to find it | Default if missing | |---|---|---| | Strategy type | Title bar / leg description | "custom" | | Underlying | Ticker symbol | SPX | | Strike(s) | K1, K2, K3... in title or leg table | nearest round number | | Premium paid/received | Filled price or avg price | 5.00 | | Quantity | Position size | 1 | | Multiplier | 100 for equity options, 100 for SPX | 100 | | Expiry | Date in title | 30 DTE | | Spot price | Current underlying price (NOT strike) | middle strike | | IV | Shown in greeks panel, or estimate from vega | 20% | | Risk-free rate | — | 4.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"`
Match to one of the supported strategies below, then read the corresponding section in references/strategies.md.
| Strategy | Legs | Key Identifiers | |---|---|---| | butterfly | Buy K1, Sell 2×K2, Buy K3 | 3 strikes, "Butterfly" in title | | vertical_spread | Buy K1, Sell K2 (same expiry) | 2 strikes, debit or credit | | calendar_spread | Buy far-expiry K, Sell near-expiry K | Same strike, 2 expiries | | iron_condor | Sell K2/K3, Buy K1/K4 wings | 4 strikes, 2 spreads | | straddle | Buy Call K + Buy Put K | Same strike, both types | | strangle | Buy OTM Call + Buy OTM Put | 2 strikes, both OTM | | covered_call | Long 100 shares + Sell Call K | Stock + short call | | naked_put | Sell Put K | Single leg | | ratio_spread | Buy 1×K1, Sell N×K2 | Unequal quantities |
For strategies not listed, use custom mode: decompose into individual legs and sum their P&Ls.
d1 = (ln(S/K) + (r + σ²/2)·T) / (σ·√T)
d2 = d1 - σ·√T
put = K·e^(-rT)·N(-d2) - S·N(-d1)
call = put + S - K·e^(-rT)
if S >= K3: 0
if S >= K2: K3 - S
if S >= K1: S - K1
else: 0
Net P&L per share = payoff − premium_paid
long_call = max(S - K1, 0)
short_call = max(S - K2, 0)
payoff = long_call - short_call - net_debit
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.
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
Use visualize:read_me with modules ["chart", "interactive"] before building.
Structure section:
Pricing variables section:
Spot price:
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();
After rendering the widget, briefly explain:
Keep it concise — the chart speaks for itself.
references/strategies.md — Detailed payoff formulas and edge cases for each strategy typereferences/bs_code.md — Copy-paste ready Black-Scholes JS implementation with normCDFRead the relevant reference file if you're unsure about payoff formula edge cases for a given strategy.
tools
Generic read-only fallback for any source opencli covers but this repo has no dedicated reader for — Yahoo Finance, Bloomberg, Reuters, Barchart, Eastmoney, Xueqiu, Sinafinance, Reddit, HackerNews, Substack, Medium, Weibo, Bilibili, Xiaohongshu, Zhihu, arXiv, Google Scholar, Apple Podcasts, Xiaoyuzhou, Spotify, YouTube, Weixin, Amazon, and more. Triggers: "use opencli to read", "grab the frontpage from hackernews", "read reddit r/wallstreetbets", "fetch Eastmoney hot stocks", "pull Xueqiu feed", "get Bloomberg markets headlines", "search arXiv for", any request to read from a site where a specialized skill does not exist but opencli does. FALLBACK — prefer twitter-reader, linkedin-reader, discord-reader, telegram-reader, or yc-reader when the source matches. READ-ONLY — never invoke write operations.
development
Look up Y Combinator companies, batches, and startup ecosystem data using the yc-oss API (read-only). Use this skill whenever the user wants to research YC-backed startups, find companies in a specific batch or industry, check which YC companies are hiring, explore top YC companies, or analyze startup trends by sector or tag. Triggers include: "YC companies in fintech", "who's in the latest YC batch", "YC startups hiring", "top Y Combinator companies", "find YC companies tagged AI", "W25 batch", "S24 companies", "YC stats", "Y Combinator portfolio", "startup research", "which YC companies do X", "venture research on YC", any mention of Y Combinator, YC batch, or YC-backed companies in the context of startup research, venture analysis, or market intelligence. This is a read-only data source — the API is a static JSON dataset updated daily.
tools
Read Twitter/X for financial research using opencli (read-only). Use this skill whenever the user wants to read their Twitter feed, search for financial tweets, view bookmarks, look up user profiles, or gather market sentiment from Twitter/X. Triggers include: "check my feed", "search Twitter for", "show my bookmarks", "who follows", "look up @user", "what's trending about", "market sentiment on Twitter", "what are people saying about AAPL", "recent tweets from @elonmusk", "show me @user's posts", "fintwit", any mention of Twitter/X in context of reading financial news or market research. This skill is READ-ONLY — it does NOT support posting, liking, retweeting, or any write operations.
tools
Query Funda AI financial data via two surfaces: the MCP server at https://funda.ai/api/mcp for analyst-grade research synthesis (DCF, comps, earnings previews/recaps, sector deep-dives, SEC filings, transcripts, supply-chain mapping, ownership flow, macro framing) via the agent_chat tool — OR the REST API at https://api.funda.ai/v1 with FUNDA_API_KEY for raw data (real-time quotes, intraday candles, EOD prices, financial statements, options chains/greeks/GEX, supply-chain KG, social sentiment, news, calendars, FRED, ESG, congressional trades, AI hiring signals). Triggers: "funda", "funda.ai", real-time quote, stock price, intraday, balance sheet, income statement, options chain, DCF, comps, earnings preview/recap, analyst estimates, 10-K/10-Q/8-K, transcript, ownership flow, gamma exposure, supply chain, sector deep-dive, congressional trades, FRED. Prefer MCP for synthesis/analysis questions; use REST for raw structured data the MCP declines.