Can ChatGPT Build a Trading Strategy? What It's Good At

9 min readQuantParadox research

Ask a language model for a profitable forex strategy and it will give you one, immediately and confidently. That response is the clearest illustration of what these tools are and are not for.

The short answer

A language model can turn a vague trading idea into precise, testable rules and write the code to run it, but it cannot tell you whether the strategy has an edge, because that requires running the rules over data it has never seen.

What is ChatGPT genuinely good at in trading?

Language models are excellent at specification: taking a fuzzy description of what you do and turning it into an unambiguous set of rules with every edge case named.

This matters more than it sounds. 'I buy pullbacks in an uptrend' is not a strategy, it is a sentiment. What counts as an uptrend, over what lookback, on which timeframe? How deep is a pullback and how is depth measured? What invalidates the idea? A model that asks those questions one at a time will get you to a testable rule set faster than staring at a chart will.

They are also good at translation — turning rules into code for a specific platform, converting a strategy between languages, or explaining what an unfamiliar indicator actually computes. These are language tasks and they play to the technology's strengths.

And they are good at critique when asked properly. Given a strategy description, a model will readily list the ways it might be fitted, the costs it ignores, and the market conditions it has not met — provided you ask for the objections rather than for encouragement.

Why can't a language model tell you if a strategy works?

A language model cannot tell you whether a strategy works because determining that requires running the rules over price history and counting the outcomes, which is arithmetic on data rather than a question about language.

The model has no access to your instrument's tick history, cannot compute how many trades the rule would have taken, and has no way to check what a comparable random strategy would have scored. What it can do is produce a fluent and plausible assessment, which is worse than useless because fluency reads as confidence.

This is the specific failure mode to guard against. Ask a model whether your strategy is good and it will answer. The answer will be reasonable-sounding, will cite real concepts, and will be untethered from your data. Nothing in the response distinguishes it from an answer about a strategy that does not work.

The fix is procedural rather than technical: use the model to produce the rules and the code, and use a backtester to produce the verdict. Keep those two jobs in different tools so you never mistake one output for the other.

How do you prompt a model for a strategy that can be tested?

Prompt for precision rather than for performance: ask it to make your idea unambiguous and to name every parameter, rather than asking it for a strategy that works.

A productive sequence starts with your own idea, however rough, and asks the model to restate it as numbered rules with every threshold explicit and marked as a parameter. Then ask what a tester would have to decide that the rules do not specify — the ambiguous cases are exactly where a backtest quietly resolves things in your favour.

Next ask for the ways the rule set could produce a flattering backtest: which parameters would be tempting to tune, where look-ahead could creep in, what costs are being ignored. Models are notably good at this when asked directly, and notably bad at volunteering it.

Then take the rules to a backtester and grade them out-of-sample. If you use the model to iterate on the rules after seeing results, count each iteration — a conversation is a search, and thirty rounds of adjustment against the same history is thirty trials whether or not it felt like tuning.

What about strategies a model suggests on its own?

Strategies produced from a bare prompt tend to be composites of widely published material, which means they are the strategies most likely to have been arbitraged and least likely to contain anything distinctive.

That is not a criticism of the model; it is a description of what it was trained on. A moving average crossover with an RSI filter appears in a great deal of published material, so it is a natural completion to a request for a strategy. Popularity in training data is not evidence about markets.

The more useful direction is to bring your own hypothesis — something from your own trading, your own market observation, or your own instrument — and use the model to sharpen it. Your idea is at least not already in a thousand blog posts.

And whichever way the idea arrived, the verdict comes from the same place: a fixed rule set, graded on data that was not used to build it, with the number of variants tried written down.

Questions people actually ask

Can ChatGPT write MQL5 or Pine Script for my strategy?

Yes, and this is one of its more reliable uses, with a caveat worth taking seriously: generated code frequently compiles and does something subtly different from what you described. Test the generated version against a handful of hand-checked trades before trusting it, because a mis-implemented rule produces a perfectly plausible backtest of a strategy you never intended.

Will a language model give the same strategy to everyone who asks?

Broadly similar ones, because the popular published strategies dominate what the model has seen. That is a good reason to bring your own hypothesis rather than requesting one from scratch. If a strategy arrives fully formed from a bare prompt, assume many other people have received something close to it.

Is it safe to share my strategy with a chat model?

Check the provider's data retention and training policies before pasting anything you consider proprietary, since defaults vary between consumer and business tiers and change over time. For most retail strategies the practical risk is low, but the honest answer is that it depends on a policy you should read rather than on a general assurance.

The only backtest that settles it is yours.

Build a strategy from a sentence, paste your own Python, or import your live trade history and have it graded. Five full backtests free, no card, and we'll tell you plainly when the result is indistinguishable from luck.

We publish research and tooling, not trading advice, and we make no claim about future returns. Everything above describes how to test an idea — not a reason to trade one.