ChatGPT Trading Strategy Backtest: How to Test an AI Idea Properly

A ChatGPT trading strategy backtest is only real if the rules run on actual price data. How to turn a ChatGPT idea into exact rules, prompt it and test it.

By Hristo Skulev · Updated · 8 min read

ChatGPT can give you a trading strategy idea in seconds, but it can't tell you whether that idea made money unless the exact rules are run on real price data. Turn the idea into rules a computer can follow, then backtest those rules with costs on a period the idea wasn't tuned on. A win rate or profit figure ChatGPT writes in a chat reply, without running code on data, is a guess.

This guide covers how to get exact rules out of ChatGPT, a prompt template that does it, what ChatGPT's own "backtests" really are, and how to test the strategy properly.

Why ChatGPT's own "backtests" usually aren't real

When you ask ChatGPT "how did this strategy perform over the last five years?", it often answers with confident numbers: a win rate, a profit factor, a drawdown. In a normal chat reply those numbers aren't calculated from prices. The model writes text that looks like a plausible answer, and it has no price history to run your rules against.

There's one exception, and it's worth being precise about it. ChatGPT can write and run Python code in a built-in data analysis environment. According to OpenAI's help page on data analysis (checked 24 November 2026), it can work on files you upload, such as CSV and Excel files, but that code environment can't make web requests or API calls. So:

What you didIs the backtest real?
Asked ChatGPT for the strategy's results in a chatNo. The numbers aren't computed from data
Uploaded a price CSV and ChatGPT ran Python on itThe calculation is real, but check the code, the data and the costs
Asked ChatGPT to write Pine Script or Python you run elsewhereOnly as real as the engine and data it runs on
Rebuilt the rules in a backtesting platformYes, on that platform's data, with its cost model

Even when ChatGPT runs code on your file, the usual problems apply: a small sample, no spread or commission, a bar that uses its own close to decide an entry at its open, and a stop and target that both fall inside one candle with no rule for which hit first. Check the code it ran before you trust the result.

Step 1: Turn the ChatGPT idea into exact rules

Most ChatGPT strategy ideas arrive as a paragraph: "buy pullbacks in an uptrend when RSI is oversold, with a tight stop". That can't be tested. Every vague word needs a number:

VagueExact
UptrendClose above the 200-period EMA on the 1-hour chart
PullbackPrice touches the 20-period EMA
RSI oversoldRSI(14) below 30 on the candle close
Tight stop1.5 × ATR(14) below entry
Take profit2 × the stop distance, or exit at the end of the session
Session07:00 to 16:00 London time only
MarketEURUSD, 15-minute candles

If you can't fill in a row, the rule isn't finished. A strategy with gaps gets filled in differently every time someone builds it, which is why a ChatGPT idea and its backtest often don't match.

Step 2: A ChatGPT trading strategy prompt that gets testable rules

Ask ChatGPT for rules, not results. This template stops it inventing performance numbers and makes it fill every gap:

You are helping me write a trading strategy as exact, testable rules.
Do not estimate or invent any backtest results, win rates or returns.

Market: [e.g. EURUSD]
Timeframe: [e.g. 15-minute candles]
Idea: [your idea in one or two sentences]

Write the strategy as numbered rules covering:
1. Indicators, each with its exact settings
2. Long entry condition, checked on the candle close
3. Short entry condition (or "long only")
4. Stop loss, as a price or ATR distance
5. Take profit and any trailing or break-even rule
6. Session or time filter, with the time zone
7. Maximum trades per day and what happens to an open trade at session end
8. Position size as a percentage of the account risked per trade

After the rules, list every assumption you made and every part of my idea
that was ambiguous, so I can decide it myself.

Read the assumptions list carefully. That's where ChatGPT quietly decides things like "enter on the next candle's open" or "ignore trades on Fridays", and those choices change the result.

Step 3: Backtest it properly

You need three things for a backtest you can trust: the exact rules, real price data and realistic costs. Then you need a way to check the result isn't luck.

In Tessera's Strategy Lab, you can paste the numbered rules straight to TES, the AI strategy coach, as a plain-English description. TES builds the strategy, Strategy Lab reads it back to you in plain English so you can check each rule was understood, and the backtest runs on 1-minute to daily candles over years of data with costs included. Then:

  1. Check the unseen period. Every backtest includes a check on a period the strategy wasn't tuned on. If the result collapses there, the idea probably fitted the history rather than finding an edge. See how to tell if a backtest is overfit.
  2. Run Monte Carlo. Reshuffling the trade order shows the range of drawdowns the same trades could have produced. The free Monte Carlo simulator does this for any trade list.
  3. Stress the costs and prices. The robustness checks add price noise, higher costs and other markets. A strategy that only survives at zero spread isn't one you can trade.
  4. Count the trades. Fewer than about 100 trades can't separate an edge from luck. See how many trades a backtest needs.

The Free plan includes 15 backtests and 5 TES prompts a week on 5-minute candles and up, with 90 days of intraday history. Get started for free, no card needed.

If you prefer to keep the strategy in code, ask ChatGPT for Pine Script v6 or Python instead and follow how to test a strategy ChatGPT or Claude wrote. That guide covers the code errors that inflate AI backtests. Claude for Pine Script compares how the two assistants handle strategy code.

A ChatGPT forex strategy example

Forex is where most people try ChatGPT strategies first. A typical request, "give me a profitable EURUSD scalping strategy", returns something like an EMA crossover with an RSI filter on the 5-minute chart. Run through the steps above, it usually runs into the same problems:

  • Costs. On short timeframes the spread is a large share of each trade's target. Test with your broker's real spread, not zero.
  • Session. EURUSD moves very differently in the London and New York sessions than late in the US afternoon. Add a session filter as a rule and test each session separately.
  • News. A few high-impact releases can produce most of a short-term strategy's best and worst trades. Check whether the result depends on a handful of days.

Strategy Lab supports forex pairs, spot metals, US stocks, index ETFs such as QQQ and SPY, and USDT crypto pairs. It doesn't support index CFDs or futures, so test an "NAS100" idea on QQQ instead. If you want a starting point that has already been tested, the strategy library has 130 backtested strategies with full rules and every trade, including forex strategies such as the London breakout.

Common failure modes

FailureWhat it looks likeFix
Invented resultsChatGPT quotes a win rate it never calculatedAsk for rules only; test them yourself
Vague rulesTwo builds of the "same" strategy trade differentlyFill every row of the rules table
Prompting until it looks goodMany rounds of "improve the results"Fix the rules first, then test once on unseen data
No costsProfitable at zero spread, losing after costsInclude spread and commission from the start
Too few trades20 to 40 trades over the testTest more history or more similar markets
LookaheadEntry decided by the close of the same candle it enters onEnter on the next candle, or check the code
One market, one periodWorks on EURUSD in one year onlyTest other markets and the unseen period

Backtests are not future results, and leveraged trading carries a high risk of loss.

Frequently asked questions

Can ChatGPT backtest a trading strategy?
Not from a chat reply alone. Numbers it writes without running code aren't calculated from prices. ChatGPT can run Python on a price file you upload, and that calculation is real, but you still need to check the code, the data and the costs. A backtesting platform with its own data is the more reliable route.
Why are ChatGPT's backtest results wrong?
Without running code on data, ChatGPT produces plausible-sounding figures rather than calculated ones. Even with code, common problems include missing costs, too few trades and entries that use information from the candle they enter on.
What is a good ChatGPT trading strategy prompt?
One that asks for exact, numbered rules (indicators with settings, entry, stop, target, session, sizing), tells it not to invent results, and asks it to list every assumption it made. The template above does all three.
How do I backtest a ChatGPT strategy without coding?
Turn the idea into exact rules, then describe them in plain English to TES in Strategy Lab. It builds and backtests the strategy with costs, then checks it on an unseen period and with Monte Carlo.
Does a ChatGPT forex strategy work?
Some ideas hold up and most don't once spread, session and an unseen period are tested. Treat any ChatGPT forex strategy as an idea to test, not a strategy to trade.
Should I let ChatGPT optimise the strategy for me?
Be careful. Asking it to "improve the results" over and over tunes the rules to past data. Settle the rules first, test them, and judge them on a period they weren't tuned on.

Build it, backtest it, run it as a bot.

Describe your strategy in plain English and Strategy Lab backtests it. When it holds up, Launchpad runs it on Binance, Hyperliquid, cTrader or Liquid Brokers. Free plan, no card.