The 14-Minute Claude Bot (20/50 MA Crossover)
Buy SPY when the 20-day average crosses above the 50-day; go to cash when it crosses back below.
Viral source: X post: 'Full tutorial to build your own AI trading bot with Claude in 14 minutes' (Claude Code + Alpaca MCP, 20/50-day MA)
Reach: 685,001 impressions, 1,660 bookmarks (X API, read 2026-10-16)
How faithful is our rebuild? Faithful: the source strategy is daily 20/50 MA crossover.
Rebuild it yourself: free prompt →
Forward paper run Simulated · no real money
Started 2026-10-16 with $10,000. Execution: built-in simulator. Just started: no forward trades have closed yet. Check back as new daily bars arrive.
Signal at the latest close (fills next open): BUY SPY
Backtest Hypothetical · 2019-01-02 → 2026-10-16
Same window, SPY buy & hold: +244.4% (max drawdown -33.7%).
Still open at end of backtest SPY bought 2026-04-24 @ 707.5212 (unrealized +7.9%) ·
Win rate only counts closed trades. Open losers don't show up in it.
Trade log Backtest · 16 closed trades
| Symbol | Entry | Entry price | Exit | Exit price | Qty | P&L | Return | Exit reason |
|---|---|---|---|---|---|---|---|---|
| SPY | 2025-05-15 | 576.294 | 2026-03-03 | 669.493 | 26.600089 | $2,479 | +16.2% | signal |
| SPY | 2025-02-05 | 589.362 | 2025-03-10 | 556.376 | 27.552339 | -$909 | -5.6% | signal |
| SPY | 2024-09-04 | 536.413 | 2025-01-15 | 578.667 | 28.061581 | $1,186 | +7.9% | signal |
| SPY | 2024-05-21 | 514.358 | 2024-08-12 | 520.303 | 28.930436 | $172 | +1.2% | signal |
| SPY | 2023-11-21 | 437.266 | 2024-04-29 | 495.213 | 30.048864 | $1,741 | +13.3% | signal |
| SPY | 2023-04-14 | 395.445 | 2023-08-29 | 425.179 | 30.903081 | $919 | +7.5% | signal |
| SPY | 2023-01-30 | 384.389 | 2023-03-15 | 367.884 | 33.218279 | -$548 | -4.3% | signal |
| SPY | 2022-11-14 | 376.799 | 2023-01-04 | 365.3 | 34.954094 | -$402 | -3.0% | signal |
| SPY | 2022-08-02 | 387.046 | 2022-09-19 | 362.757 | 36.307123 | -$882 | -6.3% | signal |
| SPY | 2022-04-04 | 426.837 | 2022-05-03 | 390.538 | 35.982415 | -$1,306 | -8.5% | signal |
| SPY | 2021-10-29 | 426.59 | 2022-01-26 | 413.448 | 37.147687 | -$488 | -3.1% | signal |
| SPY | 2020-10-21 | 316.815 | 2021-10-04 | 404.783 | 39.148878 | $3,444 | +27.8% | signal |
| SPY | 2020-05-01 | 261.077 | 2020-10-02 | 305.777 | 40.562054 | $1,813 | +17.1% | signal |
| SPY | 2019-09-19 | 271.71 | 2020-03-04 | 278.204 | 38.064999 | $247 | +2.4% | signal |
| SPY | 2019-06-28 | 263.645 | 2019-08-19 | 263.031 | 39.321065 | -$24 | -0.2% | signal |
| SPY | 2019-02-01 | 241.193 | 2019-05-30 | 250.04 | 41.460643 | $367 | +3.7% | signal |
Assumptions
- Start cash $10,000; long-only; no leverage; fractional shares.
- Signals on the daily close, fills at the next bar open; stops and targets checked against each day's low and high.
- Slippage (bps per fill): SPY 5, QQQ 5, GLD 5, BTC-USD 10, ETH-USD 10. Commission $0.
- Data: Yahoo Finance daily bars via yfinance (adjusted). As of 2026-10-17; computed 2026-10-16T23:36:21-07:00.