AI trading workflows

Use Claude Code for trading research

Connect Claude Code to NexusTrade, turn a research question into explicit strategies, and review historical and paper results.

Connection
Remote MCP with OAuth
Starting point
Research and historical tests

Choose the task you came to do

Start with one output you can inspect. The guides below cover different jobs, so you can stop after the research brief or historical test without activating a portfolio.

Research a companyA dated brief with filing citationsStock research
Test a ruleA fixed configuration and completed historical resultBacktesting
Observe future behaviorA separate paper deployment and observation logPaper trading

Give Claude Code a trading workspace

Claude Code works from your terminal and repository. Use it to keep the research brief, strategy configuration and review notes together while NexusTrade provides account-scoped data and trading operations.

Start with a narrow question and a paper candidate. The agent can author code, but the strategy’s universe, entry rule, sizing, exit rule and validation period still need to be explicit.

Connect the remote MCP server

Run the command below in a terminal, start Claude Code and open /mcp. Select NexusTrade and complete browser OAuth. The connection uses OAuth rather than an SDK key. Ask Claude to list NexusTrade tools, then read an existing portfolio without changing it to confirm the account.

shell
claude mcp add --transport http nexustrade https://nexustrade.io/api/mcp

Write the first research brief

A useful request names the instrument, test period, capital, benchmark and stopping point. Ask Claude to show its configuration before it submits a test, then inspect results without approving a deployment implicitly.

text
Draft a daily SPY strategy with explicit entry, position sizing and exit rules. Show the complete configuration first. After I approve it, run one historical backtest over a fixed period, compare it with buy-and-hold SPY, and report warnings and drawdown. Do not deploy it.

Separate three kinds of evidence

Use filing and news sources to assess a thesis. Use historical backtests to assess rule behavior over past data. Use a separately identified paper deployment to observe simulated execution going forward. A strong historical result is not a measured live outcome.

Check a missing tool or failed account read

If NexusTrade is missing from /mcp, check the server registration and URL. If it appears but the account read fails, complete browser authentication and inspect the returned error before retrying. Confirm the returned portfolio name and ID against NexusTrade. A new account can return an empty portfolio list; it should not produce an invented portfolio.

Continue exploring