Explore more topics
AI trading walkthrough

I connected Claude.ai to a trading API and tested a SPY call spread

An experiment in using Claude.ai beyond chat. Research a SPY bull call spread, build three explicit rules, and inspect the completed 2024 test at 26.49% against SPY.

As of 2026-10-14

Worked strategy
SPY bull call spread
Evidence status
Completed 2024 development test; strategy and SPY curves included
Jump to a section

Follow this worked strategy

I connected Claude.ai to the NexusTrade trading API and had it research a SPY bull call spread, build three explicit rules, and inspect the completed 2024 test. The agent operated this workflow through NexusTrade's MCP server; it did not build the integration. The spread returned 26.49% against full-capital SPY at 25.30%. This is a development test on examined dates. Judge frozen rules on dates you have not used yet.

Follow the full journey

Step 1 of 6

Connect Claude.ai

Add the NexusTrade connector

https://nexustrade.io/api/mcp

Open the button below. If the form is not prefilled, use Customize → Connectors → + Add → Add custom connector. Name it NexusTrade, paste the server URL, then Continue. These steps are for an individual account; organization setup is below.

What you should see: The connector form shows NexusTrade and https://nexustrade.io/api/mcp. Opening this page alone does not connect your account.

Open Claude's connector form
Documented setup flow for this client
Documented setup flow for this client

Sign in, then enable it in this chat

Review detected authentication, Continue, choose Sign in now and finish with Add. Complete NexusTrade sign-in. In a new Claude conversation, open + → Connectors and enable NexusTrade. Under Search and tools, leave only tools needed for this task enabled.

What you should see: NexusTrade appears in your connectors and is enabled for this conversation. Review the account selected during sign-in; do not paste a password or API key into the chat.

Setup map: sign in to NexusTrade, return to Claude and enable NexusTrade for one conversation
Authored connection flow. The page cannot inspect your Claude account or confirm a connection.
What you should see

The result identifies Apple's company filing, filing date and source URL. The connection check makes no account changes.

Inspect the request

Step 2 of 6

Research SPY and the call spread

Read the SPY underlying, option expiry and strike selectors together. The long and short call legs use the same expiry; inspect the actual selected contracts before reviewing the debit and collateral.

What you should see

A dated brief names the instrument, original sources and assumptions that matter to this strategy.

Inspect the request

Animation: the bull call spread strategy as built in the AI chat (Price(SPY) > SMA(SPY,50,Day); $1,000 dollars allocation; at or below SMA50; maxDte 14) is saved as 3 rules. Its legs (buy 1 call at ATM resolving to $472, sell 1 call at +5% resolving to $495; nearest expiry 30 to 45 days out, Feb 2, 2024) appear on a strike line. Then the expiration payoff of the recorded bull call spread (Buy the SPY $472 call, sell the $495 call; both expire Feb 2, 2024) draws as the SPY price sweeps from $455 to $512: max profit $1,500.99; max loss $799.01; breakeven $479.99; per contract before commissions. Then the same position's profit or loss is drawn at each session close from Jan 2, 2024 to Jan 19, 2024, ending at +$40.89 after commissions.
The algorithmic strategy held this position from Jan 2 to Jan 19, 2024 in its backtest and made $40.89 after commissions.
Step 3 of 6

Build the SPY call spread

Enter when SPY is above its 50-day average and no matching option position is open. Review both legs and the signal and 14-DTE exits before saving.

Entry
SPY > SMA50; matching position count = 0
Legs
Buy ATM call; sell call at +5% strike
Expiry
Nearest available expiry 30 to 45 days away; ratios 1:1
Sizing
$1,000 allocation; whole spread units
Exit
SPY <= SMA50 or at most 14 DTE
What you should see

The preview shows three rules, both contract selectors and the exact sizing method.

Inspect the request

Completed 2024 backtest13.6K9.7K2024-01-022024-12-31
Options strategy 2024-12-31, 21:00:00 UTC
12,648.7
Full-capital SPY buy and hold 2024-12-31, 21:00:00 UTC
12,530.29
Options strategyFull-capital SPY buy and holdHistorical simulation
Recorded 2024 SPY bull call spread simulation; $10,000 initial capital. Full-capital SPY is a comparison with different exposure.
Step 4 of 6

Inspect the completed 2024 spread test

Compare the spread curve with full-capital SPY over the same year. Option contract selection and execution assumptions belong to this result.

Return
26.49%
SPY buy and hold
25.30%
Max drawdown
14.19%
Closed option legs
36
Commissions
$46.80; $0.65 per option contract
What you should see

The bull call spread returned 26.49% in this completed historical simulation.

Inspect the request

Step 5 of 6

Observe SPY bull call spread in paper trading

Keep the selectors and sizing fixed in a separate paper portfolio. Inspect the long and short legs as one spread, with matching expiries and the exits defined above.

Inspect before accepting an order
The selected SPY strikes, matching expiry, contract quantities, debit, collateral, pending order legs and 14-DTE exit.
What you should see

Your paper portfolio has its own ID, start date, schedule and dated history. These forward observations begin with your own run.

Inspect the request

Step 6 of 6

Review SPY bull call spread for live deployment

Review the spread in the target account only after confirming that its broker connection supports the required multi-leg option actions and your account has the necessary options permissions.

Open the live deployment walkthrough
Account and instrument review
SPY multi-leg options support, account permission level, debit and collateral, quote availability, both leg quantities and exit support.
What you should see

The review identifies the target account, supported instruments, rule changes and approval settings before confirmation.

Inspect the request

Follow the Claude.ai session

This guide runs on NexusTrade's MCP server. Claude.ai operated the trading workflow below, from connection to the live review. The agent's role here is operating the workflow through that server.

The table names the tool call, the approval checkpoint, and the artifact to keep at each stage. Placeholders such as a returned draft ID stand for values your own run returns. This page records no IDs from anyone else's run.

The recorded anchor is the completed 2024 spread test below, with full-capital SPY alongside it and one adverse period inspected.

Show the table · 6 rows, 4 columns

Scroll sideways to compare all columns. Select a heading to sort.

Connect Claude.aisec_edgar list_filings for AAPL with limit 1Public read only. No portfolios, ingested filings, or changes.Filing company, form, date, and source URL
Research the spreadInstrument and option sources for the SPY bull call spreadRead-only step. Payoff stays separate from mark-to-market history.Dated spread brief
Draft the rulesbuild_portfolio preview, then one create_portfolioApprove the rules before saving. Stop before paid tests.Returned draft ID with a readback
Test history2024 backtest at $10,000 with an SPY baseline and modeled commissionsShow the request and estimated cost before submission.History, contracts, collateral, and quote timing
Trade on paperSeparate paper-only deployment at $10,000Show the plan. Verify the portfolio is paper.Running paper ID and dated history
Review liveLive deployment review against the actual accountLive trading stays unchanged until explicit confirmation.Reviewed plan, or a stop report when unsupported

Where Claude.ai stops for approval

Each consequential action in this guide waits at an approval gate. The agent previews first and acts only after explicit approval.

The rules preview returns valid and issues before anything is saved. The agent resolves problems and re-previews instead of saving a candidate with open problems.

  1. Approve the rules before the agent saves them

    The agent previews the configuration with build_portfolio and shows entry, sizing, exits, valid, and issues. It saves with create_portfolio only after approval and reads the returned draft back.

  2. Approve the test cost before the agent submits once

    Historical tests are paid runs. The agent shows the exact request and estimated cost for approval before submitting once, then polls the same returned test ID until complete.

  3. Approve the paper plan and verify it is paper

    The paper deployment is a separate portfolio with its own ID. The agent shows the plan for approval, verifies the deployment type, and leaves brokerage accounts unchanged.

  4. Confirm the live move explicitly, or nothing moves

    The agent reads the actual account and broker capabilities first and keeps live trading unchanged until explicit confirmation. It reports an unsupported instrument or action and stops.

Inspect the spread execution assumptions

Inspect the recorded pricing and trade details

How the example did on SPY, 2024-01-01 to 2024-12-31, starting with $10,000.

The 2024 curve pairs the spread with full-capital SPY buy and hold over the same dates. Treat the result as development evidence from examined dates and freeze the selectors before using unused dates.

Scroll sideways to compare all columns. Select a heading to sort.

StatusCOMPLETE
Pricing contract version8
Requested period2024-01-01 through 2024-12-31
Modeled return26.49%
Candidate maximum drawdown14.19%
Full-capital SPY buy and hold25.30%
Recorded fees$46.80; $0.65 per option contract
Option slippage contract0.5 of half-spread
Observed / synthetic half-spread calls78 / 74
Unknown-timing quote accesses10146
Rejected fill groups / marks0 / 0
Closed trades36
First held-option snapshot2024-01-02T21:00:00.000Z
Missing-current-quote checks0
First recorded option holdingsSPY240202C00472000: quantity +1, call strike $472, expiry 2024-02-02; SPY240202C00495000: quantity -1, call strike $495, expiry 2024-02-02

Follow the recorded call trade

Inspect one recorded spread trade

One position from the worked example, opened Jan 2, 2024 and closed Jan 19, 2024.

Long $472 call
+$2.81
Short $495 call
+$40.68
Commissions
−$2.60
Net
+$40.89
Inspect the worked example's records

The example trade's fills

  1. 2024-01-02 14:31:00

    Contract

    SPY240202C00472000

    Action

    Buy to open

    Contracts

    1

    Premium per share

    $8.6544

    Fee

    $0.65

  2. 2024-01-02 14:31:00

    Contract

    SPY240202C00495000

    Action

    Sell to open

    Contracts

    1

    Premium per share

    $0.6643

    Fee

    $0.65

  3. 2024-01-19 14:31:00

    Contract

    SPY240202C00495000

    Action

    Buy to close

    Contracts

    1

    Premium per share

    $0.2575

    Fee

    $0.65

  4. 2024-01-19 14:31:00

    Contract

    SPY240202C00472000

    Action

    Sell to close

    Contracts

    1

    Premium per share

    $8.6825

    Fee

    $0.65

Recorded rows in source order; spacing does not represent elapsed time.

Show the table · 4 rows, 6 columns

Scroll sideways to compare all columns. Select a heading to sort.

2024-01-02 14:31:00SPY240202C00472000Buy to open1$8.6544$0.65
2024-01-02 14:31:00SPY240202C00495000Sell to open1$0.6643$0.65
2024-01-19 14:31:00SPY240202C00495000Buy to close1$0.2575$0.65
2024-01-19 14:31:00SPY240202C00472000Sell to close1$8.6825$0.65

Each premium is per share; one contract is 100 shares.

Inspect the selected contracts and sizing

The candidate snapshot shows the bid and ask used in the sizing decision. Every selected leg had the February 2 expiration, 31 DTE at entry and multiplier 100.

The liquidity model kept the target. Allocation allowed 1 unit; the volume limit allowed 2. The requested and sent quantities were both 1. The opening premium also includes modeled liquidity impact beyond the persisted half-spread fraction.

Show the table · 2 rows, 6 columns

Scroll sideways to compare all columns. Select a heading to sort.

SPY240202C00472000$472.00$8.15$8.71$8.4311; trailingMedian5
SPY240202C00495000$495.00$0.66$0.68$0.67207; trailingMedian5

Inspect an adverse period in the published history

The largest peak-to-trough decline in the exported 519-point history was 13.60%: $13199.31 on 2024-07-16 to $11404.51 on 2024-09-10. At the trough the exported position value was $983.00.

The engine reported maximum drawdown of 14.19%. That differs from the decline calculated over the exported history points. Explore the snapshots and events around this period to understand the change in portfolio value.

Show the table · 2 rows, 5 columns

Scroll sideways to compare all columns. Select a heading to sort.

2024-07-16 20:00:00$13199.31$11894.81$1304.50$12001.33
2024-09-10 20:00:00$11404.51$10421.51$983.00$11697.13

Continue exploring

Discussion

Sign in or create a free account to join the discussion.

No comments yet.

Aurora · AI research assistant

Try this in Aurora

Edit the request, then open it in Aurora. You choose when to send it.