Skip to content
Menu

MACD cross on AAPL

Buy when MACD (26, 12) line crosses above MACD (26, 12) signal line. Sell when MACD (26, 12) line crosses below MACD (26, 12) signal line.

Started from the “MACD cross” template. A template is a well-known idea to test, not a recommendation.

Buy when

Open a position when

Sell when

Close it when

Assumptions 10,000 to start · 0.05% cost per trade · fills at the next open
This rule
+0.8%
10,000 became 10,082
Buy and hold AAPL
+52.6%
10,000 became 15,262
Worst fall
−26.2%
−2,670 · back in 17 months
Trades
20
9 won · 11 lost · 45% win rate
Profit factor
1.02
gains ÷ losses
In the market
49%
of 500 days
  • Only 20 trades. A handful of trades says little about a rule: a few lucky or unlucky ones decide the result. Thirty or more is a common minimum; a longer period gives more.
  • Buying and holding did better. Over the same dates, simply holding AAPL returned 52 percentage points more than this rule after costs.
  • A signal on the last bar. The last bar gave a signal to open a long position. It would fill at the next bar’s open, so it is not in this result. If that bar is today’s and the session is still open, the signal can still change.

Account value

10,000 following this rule, beside the same cash bought and held, Nov 29, 2024 to Nov 27, 2026

8k10k12k14k−20.0%0%Fall from the peakNov 24Apr 25Sep 25Feb 26Jul 26Nov 26

Transactions chart

Buy and cover markers below the bar, sell and short markers above

200.0300.08.0k10.0kAccount valueNov 24Apr 25Sep 25Feb 26Jul 26Nov 26

Trades

20 round trips, oldest first. Each is an entry and its exit, after costs.

Backtest trades
SideEntryExitSharesHeldProfitReturnWorst / best
LongJan 30, 2025 · 238.67 MACD (26, 12) line crosses above MACD (26, 12) signal lineFeb 11, 2025 · 228.20 MACD (26, 12) line crosses below MACD (26, 12) signal line41.888 days−448.24−4.48%−5.4% / +3.6%
LongFeb 12, 2025 · 231.20 MACD (26, 12) line crosses above MACD (26, 12) signal lineMar 4, 2025 · 237.71 MACD (26, 12) line crosses below MACD (26, 12) signal line41.2913 days+259.14+2.71%−0.4% / +8.1%
LongMar 26, 2025 · 223.51 MACD (26, 12) line crosses above MACD (26, 12) signal lineApr 4, 2025 · 193.89 MACD (26, 12) line crosses below MACD (26, 12) signal line43.877 days−1,308.67−13.34%−13.3% / +0.9%
LongApr 16, 2025 · 198.36 MACD (26, 12) line crosses above MACD (26, 12) signal lineMay 9, 2025 · 199.00 MACD (26, 12) line crosses below MACD (26, 12) signal line42.8416 days+18.91+0.22%−4.3% / +8.2%
LongMay 13, 2025 · 210.43 MACD (26, 12) line crosses above MACD (26, 12) signal lineMay 23, 2025 · 193.67 MACD (26, 12) line crosses below MACD (26, 12) signal line40.478 days−686.52−8.06%−8.0% / +1.7%
LongJun 9, 2025 · 204.39 MACD (26, 12) line crosses above MACD (26, 12) signal lineJun 12, 2025 · 199.08 MACD (26, 12) line crosses below MACD (26, 12) signal line38.313 days−211.17−2.70%−2.9% / +0.8%
LongJun 24, 2025 · 202.59 MACD (26, 12) line crosses above MACD (26, 12) signal lineJul 30, 2025 · 211.90 MACD (26, 12) line crosses below MACD (26, 12) signal line37.6125 days+342.37+4.49%−1.6% / +6.7%
LongAug 8, 2025 · 220.83 MACD (26, 12) line crosses above MACD (26, 12) signal lineAug 26, 2025 · 226.87 MACD (26, 12) line crosses below MACD (26, 12) signal line36.0512 days+209.70+2.63%−0.7% / +6.5%
LongSep 4, 2025 · 238.45 MACD (26, 12) line crosses above MACD (26, 12) signal lineSep 11, 2025 · 226.88 MACD (26, 12) line crosses below MACD (26, 12) signal line34.275 days−404.46−4.95%−5.2% / +1.2%
LongSep 22, 2025 · 248.30 MACD (26, 12) line crosses above MACD (26, 12) signal lineOct 8, 2025 · 256.52 MACD (26, 12) line crosses below MACD (26, 12) signal line31.2812 days+249.24+3.21%−0.1% / +4.4%
LongOct 24, 2025 · 261.19 MACD (26, 12) line crosses above MACD (26, 12) signal lineNov 10, 2025 · 268.96 MACD (26, 12) line crosses below MACD (26, 12) signal line30.6911 days+230.34+2.87%−0.8% / +6.2%
LongDec 1, 2025 · 278.01 MACD (26, 12) line crosses above MACD (26, 12) signal lineDec 9, 2025 · 278.16 MACD (26, 12) line crosses below MACD (26, 12) signal line29.666 days−3.80−0.05%−0.7% / +3.8%
LongJan 29, 2026 · 258.00 MACD (26, 12) line crosses above MACD (26, 12) signal lineFeb 17, 2026 · 258.05 MACD (26, 12) line crosses below MACD (26, 12) signal line31.9512 days−6.65−0.08%−2.3% / +8.9%
LongFeb 25, 2026 · 271.78 MACD (26, 12) line crosses above MACD (26, 12) signal lineMar 3, 2026 · 263.48 MACD (26, 12) line crosses below MACD (26, 12) signal line30.34 days−259.63−3.15%−4.3% / +1.6%
LongApr 1, 2026 · 254.08 MACD (26, 12) line crosses above MACD (26, 12) signal lineJun 4, 2026 · 313.23 MACD (26, 12) line crosses below MACD (26, 12) signal line31.3944 days+1,848.04+23.16%−3.3% / +24.7%
LongJul 6, 2026 · 307.36 MACD (26, 12) line crosses above MACD (26, 12) signal lineAug 3, 2026 · 309.58 MACD (26, 12) line crosses below MACD (26, 12) signal line31.9620 days+61.10+0.62%−2.4% / +12.1%
LongAug 27, 2026 · 310.55 MACD (26, 12) line crosses above MACD (26, 12) signal lineSep 30, 2026 · 330.80 MACD (26, 12) line crosses below MACD (26, 12) signal line31.8323 days+634.35+6.41%−0.4% / +11.2%
LongOct 15, 2026 · 346.95 MACD (26, 12) line crosses above MACD (26, 12) signal lineOct 21, 2026 · 339.36 MACD (26, 12) line crosses below MACD (26, 12) signal line30.324 days−240.52−2.29%−2.4% / +0.3%
LongOct 23, 2026 · 349.12 MACD (26, 12) line crosses above MACD (26, 12) signal lineOct 29, 2026 · 348.00 MACD (26, 12) line crosses below MACD (26, 12) signal line29.444 days−43.24−0.42%−2.3% / +0.7%
LongNov 12, 2026 · 357.81 MACD (26, 12) line crosses above MACD (26, 12) signal lineNov 20, 2026 · 352.63 MACD (26, 12) line crosses below MACD (26, 12) signal line28.616 days−158.34−1.55%−3.2% / +0.8%

Return and risk

This rule beside buying and holding over the same dates

MeasureThis ruleBuy and hold
Total return+0.8%+52.6%
Return per year+0.4%+23.6%
Volatility per year18.4%29.0%
Worst fall from a peak−26.2%−33.4%
Longest time below a peak506 days298 days
Sharpe ratio0.120.87
Sortino ratio0.151.31
Return per year ÷ worst fall0.020.71

Trade statistics

Round trips for the long side, the short side and both together

Backtest results by side
StatisticLongShortTotal
Trades20020
Won909
Lost11011
Win rate45%—45%
Net profit+81.94—+81.94
Profit factor1.02—1.02
Average trade+4.10—+4.10
Average trade return+0.26%—+0.26%
Average win428.13—428.13
Average loss342.84—342.84
Average win ÷ average loss1.25—1.25
Largest win1,848.04—1,848.04
Largest loss1,308.67—1,308.67
Most losses in a row303
Average days held12.2—12.2

Does it hold up on the last part?

The last 30% of the period, from Apr 27, 2026, is shaded on the chart and counted apart. A rule that only worked earlier was probably fitted to the past.

PartThis ruleBuy and holdTrades
First 70%−14.9%+15.4%15
Last 30%+18.5%+32.3%5

Monthly returns

This rule, month by month. The last column is buying and holding for the same year.

YearJanFebMarAprMayJunJulAugSepOctNovDecYearHold
20260.5-3.4-0.36.715.00.30.52.14.4-2.7-1.5+22.3%+31.9%
2025-1.21.0-2.4-6.6-13.9-1.53.22.6-2.64.2-0.6-0.0−17.5%+8.6%
20240.00.00.0%+6.6%

How the trades turned out

The number of trades in each band of return, after costs

  • under −20% 0
  • −20% to −10% 1
  • −10% to −5% 1
  • −5% to −2% 5
  • −2% to 0% 4
  • 0% to +2% 2
  • +2% to +5% 5
  • +5% to +10% 1
  • +10% to +20% 0
  • over +20% 1

What this result assumes

  • Account. Starts with 10,000 in cash, 100% of the account on each entry, one position at a time. Fractional shares are allowed.
  • Fills. A signal is read at a bar’s close and fills at the next bar’s open.
  • Costs. 0.05% of the amount traded on every buy and every sell, for commission and slippage. This run paid 177.30 in all.
  • Exits. The exit condition closes the position. A position still open at the end is valued at the last close.
  • Signals. 41 in this period. Studies are calculated on the bars before the period as well, so they are warmed up when it starts.
  • Prices. 500 daily bars, adjusted for splits. Dividends are not included, for this rule or for buying and holding.
  • Buy and hold. The same cash put into AAPL at the first bar’s open, one cost, never sold.

These results are hypothetical. They come from applying a rule to past prices under the assumptions above, with the benefit of hindsight, and are not a record of real trading. Real orders can fill at other prices or not at all. Past results do not predict future results, and nothing here is investment advice. The Stock Master app calculates backtests differently, so its numbers will not match these.