XOM golden cross backtest: the 50/200 moving average, 2020 to 2024.
We ran the golden cross rule (50 day average against 200 day average) on Exxon Mobil through Candlo Academy's backtest engine, starting with $10,000. It beat buy and hold.
| Strategy | Return | End value | Trades | Sharpe |
|---|---|---|---|---|
| 50/200 moving average | +72.70% | $17,270.36 | 6 | 0.58 |
| Buy and hold | +52.96% | $15,295.87 | 1 | 0.41 |
The rule finished 19.74 percentage points ahead of buy and hold. It was in cash about 32% of the time.
- The rule
- Hold it while its 50 day average is above its 200 day average, so buy on the golden cross and sell on the death cross. Hold cash otherwise. The signal is read at the close and the fill happens at the next day's open.
- What it did
- The rule made 6 trades and was in cash for 593 of 1,825 calendar days, about 32%. It sold at $107.44 in Jul 2023 and bought back at $115.77 in Sep 2023, higher than it sold. It sold at $103.06 in Nov 2023 and bought back at $119.11 in Apr 2024, higher than it sold. It sold at $106.25 in Dec 2024 and was still in cash when the test ended.
- Costs in the test
- Every fill moves 5 basis points against you (0.05%). Returns are price returns, so dividends are not counted for either line. No commission or taxes are modelled.
- What this does not show
- One stock and one five year window. A different ticker or period can reverse the order, so do not read this as a general result about moving averages.
Every fill
| Date | Side | Price |
|---|---|---|
| 2021-01-21 | Buy | $49.35 |
| 2023-07-03 | Sell | $107.44 |
| 2023-09-22 | Buy | $115.77 |
| 2023-11-30 | Sell | $103.06 |
| 2024-04-04 | Buy | $119.11 |
| 2024-12-30 | Sell | $106.25 |
Hypothetical backtest, not a record of real trades. Prices are split adjusted. Past results do not predict future results. For education only, not financial advice. Other tickers are on the backtests page, and what a paper fill costs in each market is on the fees page.