AI Trading Examples¶
Start with a complete strategy, run a historical backtest, and inspect what the agents decided. Model calls require a provider key. Each example states its data requirements and whether the displayed result is a recorded run.
First AI backtest
SPY trend research, risk review, and a trading agent. A small starting point.
Agents that debate
Researcher, bull, bear, and trader working with familiar large-cap stocks.
Options strategies
Explore an iron condor with its contracts, data setup, and recorded evidence.
Compare the workflows below. A fresh model run may produce different decisions and returns; saved traces show what happened in a particular run.
Stocks¶
Example |
What it does |
Data and cadence |
Evidence |
|---|---|---|---|
Researcher, bull, bear, and interpreter set weights; one trading agent rebalances names such as Apple, Microsoft, and Nvidia. |
Yahoo daily prices, one decision per session. |
GPT-6 Luna, January 5 to 15, 2026: split the account across four names, rebalanced daily without churn, kept cash positive, and ended down 2.16% while SPY rose about 1%. |
|
Inspect completed opening bars and trade a confirmed breakout. |
Alpaca minute bars, evaluated every two hours. |
GPT-6 Luna, January 5 to 6, 2026: traded DE, DIS, and SPGI at about 10% of the account and finished down 0.08%. One SPGI buy and sell landed in the same bar. |
|
Explore VWAP reclaim and mean reversion. |
Alpaca minute bars. |
GPT-6 Luna, January 5 to 6, 2026: no dip-and-reclaim setup appeared, so it stayed in cash. That is the intended no-trade result. |
|
Research business quality and challenge valuation. |
Yahoo daily prices, then a real EDGAR read through get_filings and get_filing_section. |
GPT-6 Luna, January 5 to 15, 2026: bought 708 PG with nearly the whole account and finished up 2.64%. Cash never went negative. |
|
Debate one high-conviction large-cap position. |
Yahoo daily prices, then a real SEC company atom fetch for Pershing Square. |
GPT-6 Luna, January 5 to 15, 2026: opened GOOGL and MSFT, later added UBER, and finished up 3.95%. Cash never went negative. |
ETF and macro teams¶
Example |
What it does |
Data and cadence |
Evidence |
|---|---|---|---|
Sector specialists present ideas to a portfolio manager. |
Daily ETF prices; inspect the published revision for additional data requirements. |
Source example. Its public listing was withdrawn because the backing backtest overspent cash. |
|
Growth, inflation, and liquidity agents debate allocation. |
Daily ETF prices; FRED/ALFRED is available for macro extensions. |
Source example. Its public listing was withdrawn because the backing backtest overspent cash. |
|
Debate leveraged long and inverse ETFs such as TQQQ against SQQQ and UPRO against SPXU. |
Yahoo daily prices. The trader holds one direction per index. |
GPT-6 Luna, January 5 to 15, 2026: held UPRO and later TQQQ, never an ETF and its inverse together, kept cash positive, and ended up 1.47%. |
Options strategies¶
Example |
What it does |
Prerequisites |
Evidence |
|---|---|---|---|
Open one four-leg package sized to the risk budget and close it after prices can move. |
Alpaca option history. |
GPT-6 Luna, January 5 to 15, 2026: opened 38 SPY February 645/650 put and 715/720 call spreads at real Alpaca prices and ended at $99,734. |
|
Open one vertical credit spread sized to the risk budget and close it after prices can move. |
Alpaca option history. |
GPT-6 Luna, January 5 to 15, 2026: sold 33 SPY February 655/650 put spreads at real Alpaca prices and ended at $100,627. |
|
Open and close one SPXW bear call on the same expiration day. |
Alpaca SPXW minute history. January 5, 2026 used the 6900 and 6910 calls. |
Real QuantStats tear sheet. Open and close both filled. Ending value about $99,925. |
Public disclosures and browser automation¶
Example |
What it does |
Availability boundary |
Evidence |
|---|---|---|---|
Read the House Clerk yearly index and PTR PDF, then trade the stock or the listed option after the filing is public. |
|
Does not ship sample trades. Official House and Senate filings are public. Point-in-time tests use invented clock rows, not a member portfolio. |
|
Read point-in-time Form 4 filings for a watchlist, then tilt an equal-weight book toward insider buying. |
SEC EDGAR submissions and filing documents, capped at the backtest clock. |
Only filings accepted before the backtest clock are visible. |
|
Log in to an authorized JavaScript application, research, trade, and optionally publish a truthful receipt. |
The observed page state and screenshot receipt at strategy time. |
Local real-browser acceptance test plus a 100-cycle session restart soak. |
Before running a strategy¶
The original team files default to a broker runner. The stock tutorial supplies a separate complete backtest runner so learning does not require editing that mode flag or supplying broker keys. Other examples may use an explicit backtest runner; read each page before executing its module.
A successful historical run verifies software behavior for that source, data, and window. It does not establish investment performance. An LLM may know future facts despite historical market-tool timestamps. These examples are inspired by public ideas, without affiliation or endorsement from named people or firms.
Build your own AI trading bot¶
Want help turning your idea into a strategy? Learn with Rob in the free challenge.