cd /news/ai-agents/how-to-draw-an-options-strategy-payo… · home › topics › ai-agents › article
[ARTICLE · art-154160] src=dev.to ↗ pub= topic=ai-agents verified=true sentiment=↑ positive

How to draw an options strategy payoff with an AI agent, from a real option chain

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.

by read5 min views2 publishedOct 21, 2026

All outputs are real tool calls to the Equibles MCP server from 21 October 2026, trimmed.

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

Here'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.

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

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

"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:

Strike Type Bid Ask Open interest
310 Put 2.18 2.30 16,943
320 Put 3.80 4.00 11,502
340 Call 10.70 11.00 14,769
340 Put 10.00 10.50 12,251
360 Call 3.05 3.25 21,813
370 Call 1.35 1.45 17,894

Two habits before any math:

Buy the 340 call at $11.00, sell the 360 call at $3.05.

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

"Tabulate both at expiration for prices from 300 to 380, including the breakevens."

AAPL at expiry vs close Bull call spread Iron condor
$300.00 -11.6% -$795 -$690
$310.00 -8.7% -$795 -$690
$316.90 -6.7% -$795 $0
$320.00 -5.7% -$795 +$310
$330.00 -2.8% -$795 +$310
$340.00 +0.1% -$795 +$310
$347.95 +2.5% $0 +$310
$350.00 +3.1% +$205 +$310
$355.00 +4.6% +$705 +$310
$360.00 +6.0% +$1,205 +$310
$363.10 +7.0% +$1,205 $0
$370.00 +9.0% +$1,205 -$690
$380.00 +11.9% +$1,205 -$690

"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:

import numpy as np
import matplotlib.pyplot as plt

strategies = {
    "Bull call spread 340/360": [("call", 340, +1, 11.00), ("call", 360, -1, 3.05)],
    "Iron condor 310/320/360/370": [("put", 310, +1, 2.30), ("put", 320, -1, 3.80),
                                    ("call", 360, -1, 3.05), ("call", 370, +1, 1.45)],
}

def payoff(price, legs):
    total = np.zeros_like(price)
    for kind, strike, qty, premium in legs:
        if kind == "call":
            intrinsic = np.maximum(price - strike, 0)
        else:
            intrinsic = np.maximum(strike - price, 0)
        total += qty * (intrinsic - premium) * 100  # one contract = 100 shares
    return total

price = np.linspace(295, 385, 500)
fig, ax = plt.subplots(figsize=(8, 4.5))
for (name, legs), color in zip(strategies.items(), ["#2a78d6", "#eb6834"]):
    ax.plot(price, payoff(price, legs), color=color, linewidth=2, label=name)

ax.axhline(0, color="#8c8b84", linewidth=1)
ax.axvline(339.50, color="#8c8b84", linewidth=1, linestyle=":")
ax.annotate("AAPL close $339.50", (339.50, 1250), xytext=(4, 0),
            textcoords="offset points", fontsize=9, color="#3d3d3a")
ax.grid(axis="y", color="#e1e0d9", linewidth=0.8)
ax.spines[["top", "right"]].set_visible(False)
ax.set_xlabel("AAPL price at expiration on 20 Nov 2026 ($)")
ax.set_ylabel("Profit or loss per position ($)")
ax.legend(frameon=False, loc="upper left")
fig.tight_layout()
fig.savefig("aapl-payoff.png", dpi=150)

The output:

To draw any other strategy, change the legs. A straddle is two lines: ("call", 340, +1, 11.00), ("put", 340, +1, 10.50).

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

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

Using Equibles, for <TICKER> options expiring <DATE>:
1. Pull the chain for strikes within 15% of the last close; keep only
   rows whose session is the latest trading day.
2. Price <STRATEGY> buying at the ask and selling at the bid.
3. Give max gain, max loss, breakevens, and a payoff table at expiration.
4. Write matplotlib code that plots it, and give the at-the-money
   straddle cost as a percent of the price.

The whole chain, with open interest and every expiration, is on the AAPL options chain page.

Nothing here is investment advice.

── more in #ai-agents 4 stories · sorted by recency
── more on @equibles 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/how-to-draw-an-optio…] indexed:0 read:5min 2026-10-21 · —