Yes. ChatGPT can turn a plain-English rule into backtest code and run it in its Python sandbox on a price file you upload, then report the profit, the drawdown and a chart. The result is only as good as the code it writes, so check four things before trusting the numbers: when orders fill, what each trade costs, which data it used, and whether you can see every trade.
How to backtest with ChatGPT
- Get the data. Download daily or intraday bars as a CSV from your broker or a data vendor and upload the file.
- State the rule exactly. Entry, exit, stop, target, position size and the costs per trade. Every detail you leave out, the model fills in with a guess.
- Ask for the trade list, too. A table of every trade with its entry and exit time and price, alongside the summary.
- Check the code it ran. Open the code and read the order logic, or ask the model to explain each line.
What to check in the result
- Fill timing. A signal computed from a bar's close cannot fill at that same close. Look for the shift that moves each fill to the next bar. Without it, the backtest trades on information it could not have had.
- Costs. Ask where spread, slippage and commission enter the code. Short-term strategies often turn from profit to loss once costs are in.
- Stops and targets inside one bar. When a bar's range reaches both, the code has to pick one. Ask which it picks, and why. See How should a backtest fill a stop and a target that both fall inside one bar?
- The same answer twice. Ask for the same test in a fresh chat. If the numbers change, the code changed.
See Why do AI-written backtests give misleading results?
When to move it onto an engine
A chat sandbox is a fine place to check an idea. Once the idea is worth money, you want the same test to give the same answer every time, on years of data, with fills you do not have to re-check in every new piece of code. That is what a backtesting engine gives you: the rule changes, and the fills, costs and timing stay fixed.
Backtesting with your ChatGPT plan in Reamer Research
Reamer Research works with the AI coding agent you already use. Codex CLI signs in with your ChatGPT account, so your ChatGPT plan drives it, with no AI charge from the app. Claude Code, Gemini CLI, Cursor and OpenCode work the same way.
- The engine does the fills. Every order fills tick by tick on a seeded path inside each bar, with spread, slippage, commission and swap, under a public execution specification. An order returned on one bar is eligible from the next, so the agent cannot trade on the bar it is still reading.
- The same answer every run. The same data, settings and seed give byte-identical results, so a change in the numbers comes from a change in the strategy.
- Every trade on its own chart. Trade diagnostics shows each closed trade with its entry, exit, stop and target.
- Fetch your own data in one ask. Your agent downloads bars from your Alpaca or Databento account, a MetaTrader 5 terminal on Windows or any vendor with a REST API, crypto from Alpaca with no key, or you drop in CSV files.
It runs on your own computer, and the strategy is a plain Python file in your own folder. The app is free to install; Evaluation Mode backtests one ticker over up to 30 days or 50,000 bars, and $20 a month removes the limits. See Can I use my own AI agent with Reamer Research? and pricing.
Try it in Reamer Research
Install the app with uv tool install reamer-research, start it with reamer-research, pick Codex under Agent, and paste this into the chat:
Write an RSI(2) mean-reversion strategy on the sample bars: buy below 10, sell above 70, with a 1% stop. Backtest it with realistic costs and show me the five worst trades.