{"slug": "how-to-draw-an-options-strategy-payoff-with-an-ai-agent-from-a-real-option-chain", "title": "How to draw an options strategy payoff with an AI agent, from a real option chain", "summary": "A developer demonstrated using the Equibles MCP server inside Claude, ChatGPT and Claude Code to pull a real Apple option chain and compute expiration payoffs for a 340/360 bull call spread and a 310/320/360/370 iron condor on the 20 November 2026 expiration. Using the 20 October close of $339.50, the agent tabulated profit and loss from $300 to $380 and generated matplotlib code plotting both strategies, with the bull call spread losing $795 below $347.95 and capping at $1,205, while the iron condor returns $310 between $320 and $360 and loses $690 outside $316.90 to $363.10.", "body_md": "*All outputs are real tool calls to the [Equibles](https://equibles.com) MCP server from 21 October 2026, trimmed.*\n\nA payoff diagram answers one question: if I hold this position to expiration, what do I make or lose at each price? Drawing one needs only strikes and premiums. The fiddly part is getting real premiums for the right expiration, and an agent with market data does that part in one call.\n\nHere's the workflow with Apple options expiring 20 November 2026, priced at the 20 October close, for two strategies: a bull call spread and an iron condor.\n\nIn Claude, open **Customize → Connectors → Discover**, search for Equibles, click **Connect to Claude** and **Authorize**, then switch it on in a chat from **+ → Connectors**. In ChatGPT: **Plugins**, search Equibles, **Install plugin**. In Claude Code, `claude mcp add --transport http equibles https://mcp.equibles.com/mcp` and then `/mcp` to sign in. The free plan covers 100 requests a day with end-of-day option data; Plus adds a 15-minute delayed bid and ask, and Pro real-time quotes. Other clients are in the [setup docs](https://equibles.com/docs/mcp).\n\n*\"Using Equibles, list AAPL option expirations.\"* `GetOptionExpirations` returns 23 dates, from 21 October 2026 to 19 January 2029, with the contract count at each. I take 20 November 2026, the monthly expiration about a month out, with 188 contracts.\n\n*\"Show the AAPL chain for 20 November, strikes 300 to 380.\"* `GetOptionChain` with `expiration`, `minStrike` and `maxStrike`. AAPL closed at $339.50 on 20 October. The rows I use, trimmed to what a payoff needs:\n\n| Strike | Type | Bid | Ask | Open interest | \n|---|---|---|---|---|\n| 310 | Put | 2.18 | 2.30 | 16,943 | \n| 320 | Put | 3.80 | 4.00 | 11,502 | \n| 340 | Call | 10.70 | 11.00 | 14,769 | \n| 340 | Put | 10.00 | 10.50 | 12,251 | \n| 360 | Call | 3.05 | 3.25 | 21,813 | \n| 370 | Call | 1.35 | 1.45 | 17,894 | \n\nTwo habits before any math:\n\nBuy the 340 call at $11.00, sell the 360 call at $3.05.\n\nSell the 320 put at $3.80 and buy the 310 put at $2.30; sell the 360 call at $3.05 and buy the 370 call at $1.45.\n\n*\"Tabulate both at expiration for prices from 300 to 380, including the breakevens.\"*\n\n| AAPL at expiry | vs close | Bull call spread | Iron condor | \n|---|---|---|---|\n| $300.00 | -11.6% | -$795 | -$690 | \n| $310.00 | -8.7% | -$795 | -$690 | \n| $316.90 | -6.7% | -$795 | $0 | \n| $320.00 | -5.7% | -$795 | +$310 | \n| $330.00 | -2.8% | -$795 | +$310 | \n| $340.00 | +0.1% | -$795 | +$310 | \n| $347.95 | +2.5% | $0 | +$310 | \n| $350.00 | +3.1% | +$205 | +$310 | \n| $355.00 | +4.6% | +$705 | +$310 | \n| $360.00 | +6.0% | +$1,205 | +$310 | \n| $363.10 | +7.0% | +$1,205 | $0 | \n| $370.00 | +9.0% | +$1,205 | -$690 | \n| $380.00 | +11.9% | +$1,205 | -$690 | \n\n*\"Write matplotlib code that plots both payoffs.\"* Claude can run this itself when code execution is on, or you can paste it into any Python with numpy and matplotlib:\n\n``` python\nimport numpy as np\nimport matplotlib.pyplot as plt\n\n# AAPL options expiring 2026-11-20, priced at the 20 Oct close:\n# buy at the ask, sell at the bid. (type, strike, +1 buy / -1 sell, premium)\nstrategies = {\n    \"Bull call spread 340/360\": [(\"call\", 340, +1, 11.00), (\"call\", 360, -1, 3.05)],\n    \"Iron condor 310/320/360/370\": [(\"put\", 310, +1, 2.30), (\"put\", 320, -1, 3.80),\n                                    (\"call\", 360, -1, 3.05), (\"call\", 370, +1, 1.45)],\n}\n\ndef payoff(price, legs):\n    total = np.zeros_like(price)\n    for kind, strike, qty, premium in legs:\n        if kind == \"call\":\n            intrinsic = np.maximum(price - strike, 0)\n        else:\n            intrinsic = np.maximum(strike - price, 0)\n        total += qty * (intrinsic - premium) * 100  # one contract = 100 shares\n    return total\n\nprice = np.linspace(295, 385, 500)\nfig, ax = plt.subplots(figsize=(8, 4.5))\nfor (name, legs), color in zip(strategies.items(), [\"#2a78d6\", \"#eb6834\"]):\n    ax.plot(price, payoff(price, legs), color=color, linewidth=2, label=name)\n\nax.axhline(0, color=\"#8c8b84\", linewidth=1)\nax.axvline(339.50, color=\"#8c8b84\", linewidth=1, linestyle=\":\")\nax.annotate(\"AAPL close $339.50\", (339.50, 1250), xytext=(4, 0),\n            textcoords=\"offset points\", fontsize=9, color=\"#3d3d3a\")\nax.grid(axis=\"y\", color=\"#e1e0d9\", linewidth=0.8)\nax.spines[[\"top\", \"right\"]].set_visible(False)\nax.set_xlabel(\"AAPL price at expiration on 20 Nov 2026 ($)\")\nax.set_ylabel(\"Profit or loss per position ($)\")\nax.legend(frameon=False, loc=\"upper left\")\nfig.tight_layout()\nfig.savefig(\"aapl-payoff.png\", dpi=150)\n```\n\nThe output:\n\nTo draw any other strategy, change the legs. A straddle is two lines: `(\"call\", 340, +1, 11.00), (\"put\", 340, +1, 10.50)`.\n\nThat straddle, buying the 340 call and the 340 put at the ask, costs $21.50, about 6.3% of the share price. A straddle's cost is the usual rule of thumb for the move the options market expects by expiration. The condor's breakevens sit just outside it, at -6.7% and +7.0%; the bull spread needs +2.5% to break even.\n\nOne more check. *\"When is Apple's next earnings call?\"* `GetUpcomingInvestorEvents` has no upcoming event on Apple's IR calendar yet; the last call on record was on 30 July. If the next one falls before 20 November, these premiums already price it in, so confirm the date before relying on the table.\n\n```\nUsing Equibles, for <TICKER> options expiring <DATE>:\n1. Pull the chain for strikes within 15% of the last close; keep only\n   rows whose session is the latest trading day.\n2. Price <STRATEGY> buying at the ask and selling at the bid.\n3. Give max gain, max loss, breakevens, and a payoff table at expiration.\n4. Write matplotlib code that plots it, and give the at-the-money\n   straddle cost as a percent of the price.\n```\n\nThe whole chain, with open interest and every expiration, is on the [AAPL options chain page](https://equibles.com/stocks/aapl/options-chain).\n\n*Nothing here is investment advice.*", "url": "https://wpnews.pro/news/how-to-draw-an-options-strategy-payoff-with-an-ai-agent-from-a-real-option-chain", "canonical_source": "https://dev.to/daniel_oliveira_4bd55d35d/how-to-draw-an-options-strategy-payoff-with-an-ai-agent-from-a-real-option-chain-587j", "published_at": "2026-10-21 01:47:10+00:00", "updated_at": "2026-10-21 01:49:39.950651+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "agent-protocols"], "entities": ["Equibles", "Apple", "Claude", "ChatGPT", "Claude Code", "Anthropic", "OpenAI"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/how-to-draw-an-options-strategy-payoff-with-an-ai-agent-from-a-real-option-chain", "markdown": "https://wpnews.pro/news/how-to-draw-an-options-strategy-payoff-with-an-ai-agent-from-a-real-option-chain.md", "text": "https://wpnews.pro/news/how-to-draw-an-options-strategy-payoff-with-an-ai-agent-from-a-real-option-chain.txt", "jsonld": "https://wpnews.pro/news/how-to-draw-an-options-strategy-payoff-with-an-ai-agent-from-a-real-option-chain.jsonld"}}