Best AI for Trading? ChatGPT vs Claude vs Gemini vs Grok (Backtested Results)
A recorded comparison of AI-generated Pine Script strategies, with historical results, test settings, limitations and a checklist for repeating the experiment.
I gave ChatGPT, Claude, Gemini and Grok the same request for a Pine Script trading strategy, then compared the generated strategies in TradingView historical backtests. Claude was my preferred starting point in this recorded experiment. The comparison shows how those particular drafts behaved; it does not establish which current model is universally best or that any strategy will make money in live trading.
Key Takeaways
- Four leading AI models (ChatGPT, Claude, Gemini, Grok) were given an identical prompt to design a Pine Script trading strategy for crypto on the 1-4 hour timeframe.
- The recorded sizing was a simulated $100,000 account and $10,000 per trade. Multiple assets and timeframes were explored; identical sizing alone does not make this a controlled benchmark.
- Claude was my preferred draft in the examples shown, while Gemini's draft was the least appealing. This is a judgment about those outputs, not a statistical ranking of the models.
- The walkthrough's preference order was Claude, ChatGPT, Grok, then Gemini. Different prompts, model versions and generated drafts could change that order.
- Evaluate unchanged rules on new data and check order behavior. Forward testing can expose problems, but neither paper results nor a backtest establishes future profitability.
The Experiment: Same Prompt, Four AI Models
The request was for a Pine Script strategy aimed at crypto on 1–4-hour charts. Each assistant chose its own indicators and order logic, with a request to avoid repainting. I then explored additional timeframes and assets, including daily charts, SPY and QQQ. That exploration is useful for finding weaknesses, but selecting the best result afterward introduces selection bias.
Repainting means that a script's historical and real-time behavior can differ. One cause is an open bar changing before it closes; future-data leakage or incorrectly handled higher-timeframe data can create more serious problems. Not every changing intrabar value is a faulty strategy. Inspect whether the behavior fits the intended rule instead of assuming that asking an AI for 'no repainting' verifies the code.
The video states a $100,000 starting account with $10,000 allocated per trade. Keep that distinction when interpreting returns: an account-level percentage is not a return on a single fully invested position. Costs, exposure, dates and order-fill settings also affect comparisons.
How Each AI Approached the Strategy
The four assistants produced different rule sets from the request. This experiment does not isolate whether those differences came from model training, prompt interpretation, account context or variation between generations.
ChatGPT built a Trend Continuation Breakout Strategy. It looks for markets already in strong bullish or bearish regimes, waits for a period of volatility compression, then enters on a breakout with momentum confirmation. The idea is to avoid random chop and only enter when price has compressed, pulled back, and started expanding in the direction of the broader trend. ChatGPT required a few rounds of error fixes before the code ran cleanly.
Gemini produced the Volatility Adjusted Mean Reversion (VAMR) Strategy. At its core, it identifies the dominant macro trend and waits for statistically extreme counter-trend moves to enter — buying the dip in an uptrend and selling the rip in a downtrend. Notably, Gemini's code ran on the first try with zero edits required.
Grok delivered the Adaptive SuperTrend Confluence Strategy. It uses the SuperTrend indicator as the core engine for both direction and dynamic trailing stops, then layers simple confluence filters to avoid chop. Grok required one minor fix before the code executed properly.
Claude generated an Adaptive Momentum Breakout draft combining higher-timeframe trend, current-timeframe momentum and a Donchian breakout with volume. The model suggested a 35–45% win rate and 1.3–1.8 profit factor; those were unverified model estimates, not measured results. The video reports that the code compiled without an additional edit, which is separate from verifying its logic.
Backtest Results and Their Limits
The figures below are historical results described in the embedded recording. They were not rerun for this update. Treat them as examples from selected configurations, not audited performance or a complete comparison of every model on every asset.
ChatGPT's Bitcoin daily example showed about 33% account return, 4.64% drawdown and 98 trades. At 6:45–7:20 in the video, I describe the Coinbase Bitcoin chart and a first trade around October 28, 2015. Lower timeframes showed weaker recent behavior. The full end date and all settings are needed to reproduce those figures; comparison with buy-and-hold also needs to account for capital exposure.
Gemini's strategy was the clear underperformer. Across Bitcoin, ETH, SPY, and QQQ, on multiple timeframes, it failed to produce any equity curve I'd be willing to trade. A few of the configurations were technically profitable, but the trade counts were far too low — sometimes under 35 trades over a 10-year span — to draw any meaningful conclusions. Sample size matters, and Gemini didn't have one.
Grok's strategy was an interesting case. The 4-hour ETH backtest showed the best raw returns of any strategy I tested, but almost all of those gains came from a single large trade back in 2017, with long stretches of flatlining since. With only 41-50 trades across the full backtest, the profit factor looked great on paper but the small sample makes it difficult to trust. Better than Gemini, but still not something I'd commit capital to without serious refinement.
Claude's Bitcoin 4-hour example showed 474 trades, about 100% account return and 10% drawdown. At 14:13–14:29 in the recording, I also note that recent performance was flat to slightly down. The daily example showed 121 trades, a 55% win rate and about 5% drawdown. These are different configurations. More trades give more observations to inspect, but do not prove independence, statistical significance or a durable edge.
Why I Preferred Claude's Draft in This Test
I preferred Claude's draft as a starting point because of the trade history and the particular equity curves shown. That preference is not established by crossing a trade-count threshold. Hundreds of correlated trades, exposure to one market regime or one unusually profitable period can still mislead. Review where returns came from, losing periods, costs and performance on data that did not guide the choice.
ChatGPT was my next preference in the recording. Its daily example was more appealing than its lower-timeframe results. Both drafts still require code review and a fresh evaluation; this experiment did not prove that either model consistently produces superior strategies.
The recording explored initial drafts and different chart configurations, rather than a pre-registered benchmark with repeated generations. Model versions, full code and all backtest properties are not supplied here as a complete reproducibility package. Treat the observations as a walkthrough, and record those details in any comparison you run yourself.
How to Forward Test Before Going Live
Backtesting simulates a strategy on historical data. Forward testing applies the rules as new data arrives; it may still use simulated orders. Label a paper test as paper rather than calling its fills real execution. It can reveal differences in behavior but cannot certify future live results.
Intrabar calculation and order-fill assumptions are one source of differences. Others include spread, slippage, fees, data feeds and alert timing. Check when a signal is calculated and when an order is assumed to fill; those may be different moments. Compare like-for-like settings before attributing a mismatch to repainting.
The video demonstrates an AlphaInsider workflow using TradingView alerts and a webhook. In a supported paper setup, log each signal, submitted order and simulated fill, then compare its time, price and size with TradingView's report. Investigate discrepancies rather than assuming the backtest was dishonest. Matching a limited test period is also not sufficient evidence to commit capital.
The lesson from the examples discussed in the video is to inspect execution assumptions before relying on an attractive chart. Keep a record of the mismatch and the code version so a correction can be tested without silently changing the experiment.
Should You Trust AI to Build Your Trading Strategies?
The honest answer: AI is an excellent collaborator and a terrible decision-maker. Every model in this test produced something usable as a starting point — even Gemini, the worst performer of the group, generated valid Pine Script code that ran cleanly. But every single strategy needed validation, refinement, and forward testing before it could be trusted with real capital. The AI didn't replace the work — it accelerated it.
AI can help draft and explain code, but it cannot replace specification, testing and judgment. This recording favored Claude and ChatGPT's particular drafts. It does not support a universal current ranking of Claude, ChatGPT, Gemini or Grok.
Frequently Asked Questions
Which AI is best for building trading strategies?
In this recording, Claude's draft was my preferred starting point and ChatGPT's was next. One generation from each assistant is not enough to rank the models generally. Compare current versions with a fixed prompt, repeated drafts and the same evaluation rules.
Can ChatGPT actually create profitable trading strategies?
Yes — ChatGPT generated a profitable Trend Continuation Breakout strategy in this test, particularly on Bitcoin's daily timeframe. But profitable in a backtest is not the same as profitable in live markets. Every strategy needs to be validated through forward testing before being traded with real capital.
Why did Gemini perform so poorly?
The particular Gemini draft produced unattractive results and sparse trades in many configurations shown. That does not identify the cause or establish a general weakness of Gemini. A different draft, prompt, parameter set or market regime could behave differently.
What's the difference between backtesting and forward testing?
Backtesting evaluates historical data. Forward testing observes the strategy as new data arrives, often with simulated orders. It helps assess behavior beyond the development sample, but does not confirm a lasting edge or guarantee live fills.
Is it safe to trade an AI-generated strategy with real money?
An attractive simulation does not make a strategy safe. Check its rules, code, costs, execution assumptions and behavior on new data. Losses remain possible after testing; paper fills are not a guarantee of live execution.
What is repainting and why does it matter?
Repainting covers differences between historical and real-time calculations or plots. See the explanation above and inspect the code's timing and data requests. A prompt alone does not verify the absence of future-data leakage, and ordinary open-bar changes do not automatically mean a backtest is fraudulent.
Final Thoughts
The takeaway from this experiment isn't that one AI is universally better — it's that AI is now a legitimate part of the strategy development workflow, and treating it like a magic profit machine is a fast way to lose money. Use it to accelerate your process, not replace it. Backtest everything. Forward test before you risk real capital. And keep your own judgment in the driver's seat.
How to review or repeat this comparison
The recording is the evidence for the reported examples. Useful checkpoints:
- 3:01 — sizing setup: $100,000 simulated capital and $10,000 per trade.
- 6:28 — context limitation: I discuss possible influence from previous Claude conversations. That influence was not measured or controlled.
- 6:45 — ChatGPT Bitcoin daily example: chart history and the reported 98-trade result.
- 14:13 — Claude Bitcoin 4-hour example: 474 trades, including the warning about weak recent performance.
Use the same record for every draft
- Save model/version, date, complete prompt, account context and unedited initial output. Record every code fix.
- Fix the symbol/data feed, chart type, timeframe, date range, starting capital, sizing, costs and fill assumptions before comparing results.
- Keep failed or unprofitable drafts in the record. Do not compare only the best chart from each assistant.
- Measure returns, drawdown, trade count and concentration of profits. Compare unchanged rules on unused data and document how they behave in a separate paper test.
For the hands-on process, use my Claude and TradingView walkthrough and the backtesting guide. Technical definitions were checked November 2, 2026 against TradingView's repainting documentation and backtesting and forward-testing explanation.