LearnBrokersAlpaca › Golden Cross (SMA 50/200)

Golden Cross (SMA 50/200) on Alpaca

Hold while the 50-day average is above the 200-day; step aside when it crosses below (the death cross). Deployed to your own Alpaca account — no code, your assets never leave the broker.

The short version: connect Alpaca once, deploy the golden cross template with its own cash allocation, and DeployQuant runs the rules every session — entries, resting exits, and the journal that explains each decision. Median backtested CAGR across 59 ETFs: 2.4% (2021-01-04 → 2026-07-17).

Setup on Alpaca

  1. Connect Alpaca with your API keys — paper and live accounts are both supported.
  2. Validate any strategy against Alpaca paper first: same rules, simulated money, live data.
  3. Promote to the live account when paper behavior matches the backtest.
  4. Each deployed strategy runs in its own sleeve with independent cash.
  5. Guardrails check every order: price bands, notional caps, and a global pause.

The strategy

  1. WHEN the market opens · IF not invested AND SMA(50) > SMA(200) · THEN buy with 98% of the sleeve
  2. WHEN the market opens · IF invested AND SMA(50) < SMA(200) · THEN sell the whole position

Good for: long-horizon investors who want to hold trends but sidestep multi-year bear markets.
Watch out: crosses lag badly at turning points — the strategy always gives back the first leg of a crash and misses the first leg of a recovery; choppy sideways markets whipsaw it.

Strongest backtests for this strategy

ETFCAGRmax DDtrades
SOXL 43.0% −61.7%3
SOXX 26.7% −24.7%3
CLSE 18.1% −16.2%2
XLK 13.3% −19.5%2
QQQM 12.9% −22.4%2
QQQ 12.6% −22.3%2
SPUU 12.5% −34.7%3
VOX 12.0% −20.9%2

Top-8 by CAGR shown of 59 tested — hindsight selection; see the full table including the losers.

Run golden cross on Alpaca yourself — free →

Build it from blocks (or type it in English), backtest it on 5.5 years of minute data in seconds, tweak any parameter, then paper trade it on live data. No card, no broker needed to start.

Frequently asked questions

How do I automate golden cross on Alpaca?

Connect Alpaca to DeployQuant (trade & read permissions only), pick the Golden Cross (SMA 50/200) template or describe it in English, backtest it on your chosen ETF, allocate cash, and confirm live trading. The strategy then runs every session in its own sleeve inside your Alpaca account.

How often does a golden cross happen?

On a broad index, roughly every couple of years. The backtest pages show the exact trade count for each ETF over the 2021–2026 window.

Backtests are hypothetical, computed by DeployQuant's engine on minute-resolution consolidated US market data (2021-01-04 to 2026-07-17, $10,000 starting capital, no margin, fees and slippage not modeled) and do not guarantee future results. Nothing on this page is investment advice. Live trading involves risk of loss.