Claude Trading Bot: 20/50 SMA Backtest on Apple and ETH

A viral tutorial built a Claude trading bot for Apple stock with a 20/50 SMA cross. We rebuilt it with fees: it lagged holding Apple but beat holding ETH.

April Zoe4 min read
On this page
  1. The viral claim
  2. How we rebuilt it in Trigr
  3. The results on Apple
  4. Where does this setup actually work?
  5. Is it just luck?
  6. Why the same rule behaves so differently
  7. Verdict: trade it or fade it?
  8. Try it yourself

A viral tutorial showed how to build an AI trading bot with Claude in 14 minutes: Claude connects to a broker and trades Apple stock with a 20/50 moving average crossover. We rebuilt the same rules in Trigr with fees. On Apple it made +810% since 2010 but trailed just holding Apple by a wide margin. On Ethereum the same rules made +2,399% and beat holding.

The viral claim

The post by a former Meta engineer promised a full tutorial to build your own AI trading bot with Claude in 14 minutes. Claude Code connects to a trading account through MCP, the bot gets a simple 20/50-day moving average crossover strategy, and it checks the market and buys or sells on its own, starting with paper trading.

It is a great tutorial for the plumbing. The question we cared about is the strategy itself: does a 20/50 crossover on Apple actually beat just buying Apple?

See the original tutorial post on X.

How we rebuilt it in Trigr

We told the rules to Claude, connected to Trigr through MCP, and it built the strategy. There is no language model guessing trades here. Claude only turns what you say into fixed rules, and the backtest runs them on closed daily candles. Only math, zero vibes.

Setting Value
Market Apple (AAPL), then Bitcoin and Ethereum
Timeframe Daily candles
Buy 20-day simple average crosses above the 50-day
Sell 20-day crosses back below the 50-day
Direction Long only, no leverage
Test window January 2010 to October 2026 for Apple, January 2020 to October 2026 for crypto
Costs Fees included

The results on Apple

From 2010 to October 2026, the strategy made +809.7% with fees, on 47 trades with a 49% win rate. That is not bad. It is just not great, because buying and holding Apple over the same period made about +4,300%.

Apple, 2010 to Oct 2026 20/50 SMA cross Just holding Apple
Return +810% about +4,300%
Worst drop from the top -28% -44%
Trades 47 1

Apple 2010 to Oct 2026 with fees: the 20/50 SMA cross made +810% vs about +4,300% for holding Apple

Worst drop: -28% for the strategy vs -44% for holding Apple

It did fall less: 28% at worst versus 44% for holding. So it makes money and it is calmer, but it does not beat holding. For most people the simpler choice wins here.

Where does this setup actually work?

Same strategy, different results. We dug deeper with Claude and Trigr to find an asset where the rules have a real edge.

Asset 20/50 SMA cross Just holding
Apple +810% about +4,300%
Bitcoin +771% (optimized version) about +1,038%
Ethereum +2,399% +1,652%

Same rules on Ethereum: +2,399% vs +1,652% for holding ETH

Bitcoin was still behind holding. Ethereum was the surprise: +2,399% against +1,652% for just holding ETH. Different assets can give completely different results with the exact same rules, and here the strategy has a real edge on Ethereum but not on Apple.

Is it just luck?

That was our next question. Claude put the setup through more than 40 backtests in Trigr: the original, popular upgrades and different settings such as 16/40 and 24/60 averages, with every setting moved about 20%. The Ethereum result still held up. That does not make it a sure thing, but a rule that survives changes to its settings is more believable than one that only works at one exact number. If you want to go deeper on this, read our guide to backtest overfitting warning signs.

Why the same rule behaves so differently

A moving average crossover is a trend-following rule. It makes its money by stepping aside during long declines and riding long advances. That means its value depends on the shape of the market more than on the rule itself.

Apple spent most of 2010 to 2026 going up, with drops that recovered quickly. In that kind of market, every exit is a chance to miss the next leg up, and the crossover keeps buying back higher than it sold. Ethereum is the opposite case: huge trends in both directions and crashes of 80% or more. There, avoiding even part of a big crash matters more than missing the first part of a rally, so the same rule adds real value.

This is why we never judge a strategy on one asset. Before you automate a bot, run the rule on the market you plan to trade and on a few neighbors, and compare each result with just holding.

Verdict: trade it or fade it?

  • The 20/50 cross on Apple: fade it as a way to beat the stock. It made money with smaller drops, but holding Apple made several times more.
  • The same rules on Ethereum: trade it, carefully. It beat holding with fees included and held up across settings.

The bigger lesson: before you build the bot, test the strategy on more than one asset and compare it with just holding.

Try it yourself

All three versions are on the Trigr Marketplace under "Trade It or Fade It": Apple, Ethereum and Bitcoin. To build your own with Claude, see our Claude research workflow and the Trigr docs.

Sources: the viral tutorial on X, Wikipedia on moving average crossovers and Alpaca's trading API, the broker used in the viral tutorial.

Backtest, not live. Apple daily from January 2010, BTC and ETH daily from January 2020, to October 2026, fees included. Past results are not a promise of future results, and this is not financial advice.

Frequently asked questions

What strategy did the viral Claude bot use?

A simple 20/50 simple moving average crossover on Apple stock: hold when the 20-day average is above the 50-day, sell when it drops below.

Did the Apple bot make money?

Yes, +810% from 2010 to October 2026 with fees, but just holding Apple made about +4,300%. It made money, it did not beat holding.

Why did it work better on Ethereum?

Ethereum had long trends and very deep crashes. A trend rule that steps aside in big drops adds more value there than on a stock that mostly went up.

Does the AI pick the trades?

No. Claude turns the spoken rules into a fixed strategy. The backtest and any agent follow the rules on closed candles, with no AI guessing in the loop.

Put the idea to an honest test.

Describe a strategy in plain English or from your own AI assistant, backtest it on point-in-time data, and forward-test it on paper before any real money is involved.