FAQ · Getting systematic research right

Can ChatGPT backtest a trading strategy?

Yes. ChatGPT can write backtest code from a plain-English rule and run it in its Python sandbox on a price file you upload. The result is only as good as the code it writes, so check the fill timing, the costs and the trade list before trusting the numbers. For repeatable tests on your own computer, Reamer Research has your agent, Codex on your ChatGPT plan included, write the strategy and run it on an engine that enforces fills, costs and timing. Reamer Research is a quant workstation built on a high-performance C++ core. Describe a strategy in plain English, and your AI agent writes it, backtests it and shows you every trade.

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

  1. Get the data. Download daily or intraday bars as a CSV from your broker or a data vendor and upload the file.
  2. 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.
  3. Ask for the trade list, too. A table of every trade with its entry and exit time and price, alongside the summary.
  4. 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:

Paste into Reamer Research
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.

Next questions

Why do AI-written backtests give misleading results?AI assistants write backtests that run but often trade on the signal bar, leave out costs, fit values on the whole history, or test today's survivors. The code looks right and the numbers look great. Check the fill timing, the costs and the data the same way you would check a person's code, or run the strategy on an engine that enforces the timing for you.How can I backtest a trading strategy without coding?There are three ways. Describe the strategy in plain English to an AI that writes and runs the code for you, build the rules from menus in a no-code platform, or replay the chart bar by bar and log each trade by hand. Reamer Research takes the first route on your own computer. It is a quant workstation built on a high-performance C++ core. Describe a strategy in plain English, and your AI agent writes it, backtests it and shows you every trade.Can I use my own AI agent with Reamer Research?Yes. Reamer Research is built around the AI agent you already use. The app starts with whichever of Claude Code, Codex, Gemini CLI, Cursor or OpenCode is already on your computer, on its own sign-in or an API key kept in your system keychain, and you can switch any time in the Agent dialog. The agent runs on your own plan, so the app adds no AI charge of its own, and your prompts go only to the provider you chose. If the agent needs installing or signing in, the app shows the command to run.What is look-ahead bias and how do I find it in my backtest?Look-ahead bias is a backtest using information that was not available when the decision was made, such as filling at the close of the bar that produced the signal or reading data published later. Find it by checking when each value was known, shifting signals by one bar, and seeing whether results collapse.

Every answer here restates the documents that ship in the kit, which are authoritative. All questions.

Reamer Research

Put your next idea to the test

The quant workstation built on a high-performance C++ core. Describe a strategy in plain English, and your AI agent writes it, backtests it and shows you every trade.

$uv tool install reamer-research; reamer-research

No uv yet? Install uv first, or use pipx install reamer-research.

Free to try · $20 a month for the full workstation

Trade diagnostics
Recorded in the app on sample data, 15 s, real time

Running a trading firm? Reamer Server is the institutional order-management core from Reamer Labs.