AAPL MACD (12, 26, 9) Crossover Backtest

HISTORICAL BACKTEST · AAPL DAILY

What this backtest found

2016-09-28 to 2026-09-25 · $10,000.00 USD starting capital · costs as specified below

The strategy returned 500.28% over the full test period, compared with 1097.22% for buy and hold. It underperformed that benchmark on total return. Its largest decline from a previous equity high was 26.89%.

Modify this strategy
Total return500.28%
Profit factor2.06
Longest losing streak4 trades
Best closed trade26.42%
Worst closed trade-10.85%
Longest drawdown duration478 calendar days
Ending equity$60,028.07
Closed trades89
Win rate52.8%
Average winner6.83%
Average loser-3.08%
Average holding period14.7 sessions
Time invested53.07% of sessions

CAGR is the equivalent compounded yearly return across these dates, not the return earned in every year. Drawdown measures the largest fall from a previous daily equity high. Ending equity includes any open position marked to the final close.

How this strategy works

AAPL is tested on daily bars with one long position at a time. Entry conditions are combined using AND: every condition must match. A close signal executes at the next session’s open.

  • Entry: MACD (12/26) crosses above MACD signal (9).
  • Indicator exit: MACD (12/26) crosses below MACD signal (9). It executes at the next open.

MACD (12, 26, 9): the 12-session EMA minus the 26-session EMA forms the MACD line. Its 9-session EMA is the signal line. A crossing requires the previous line relationship and the current relationship to change; staying above or below alone is not another crossover. A signal-line crossover can occur above or below zero. This is a momentum signal, not a forecast, and sideways markets can produce repeated reversals.

10% trailing stop: starts at the entry open and follows the highest daily close reached while invested. The updated level becomes active the next session. The line is not tightened using the same day’s high or low. Gaps can execute beyond the level; it is not a guaranteed maximum loss.

Strategy versus buy and hold

Both curves start with $10,000.00 USD and use the same historical dates. Buy and hold returned 1097.22% (28.21% annualized), with 38.73% maximum drawdown.

● Strategy ● Buy and hold

Drawdowns over time

● Strategy ● Buy and hold

Annual performance

YearStrategyBuy and holdClosed tradesWorst ongoing drawdown
2016 (partial)5.21%1.9%02.41%
201737.49%46.11%85.4%
2018-3.24%-6.79%1018.91%
201926.61%86.16%1126.89%
202068.5%80.75%811.64%
202123.39%33.82%716.19%
2022-2.26%-26.83%618.08%
202327.48%48.18%1314.61%
202414.56%30.07%1110.77%
2025-12.12%8.56%1122.88%
2026 (partial)29.89%25.13%417.85%

Annual returns use the previous year’s final equity, or initial capital for the first year. Ongoing drawdown retains the previous all-time peak, including peaks in earlier years.

Execution risk observed in this test

A 10% stop did not cap every loss: the trade exiting on 2022-06-13 lost 10.85% after opening beyond the stop. Daily gaps can bypass the intended exit level.

What these results mean

The strategy’s 19.65% annualized return was 8.56 percentage points below the long buy-and-hold benchmark’s 28.21%. Its worst daily peak-to-trough decline was smaller by 11.84 percentage points. That is a return/drawdown trade-off, not proof of better risk-adjusted performance. It held a position during 53.07% of sessions; cash earned no interest in this simulation.

Across 89 closed trades, 52.8% were profitable. The average winner was 6.83% and the average loser was -3.08%. Profit factor was 2.06: $2.06 of positive closed-trade P&L for each $1 of losses. The longest losing run was 4 trades. Win rate alone does not capture the size of wins and losses.

The weakest displayed calendar period was 2025 at -12.12%. First and last years may be partial. A full-period average can hide substantial variation.

The longest observed drawdown lasted 478 calendar days, with 329 underwater sessions, from 2018-09-04 to 2019-12-26. Equity regained the earlier peak on the ending date.

Best closed trade: 26.42% · 2020-03-30 to 2020-05-28, exiting because of indicator exit.

Worst closed trade: -10.85% · 2022-05-31 to 2022-06-13, exiting because of gap below stop.

Fees and slippage are 0% and 0% per side. This is a zero-cost simulation; adding execution costs can reduce results. This report contains no out-of-sample validation or parameter robustness study, so it does not establish that these rules generalize.

Price, trades and active exit levels

● Daily close ● Trailing stop (10%)

MACD and signal line

● MACD (12/26) ● MACD signal (9)

Price circles show executed entries and exits; select a circle to open its trade. Triangles mark individual crossover conditions, not executed orders: other conditions and the existing position can prevent execution. Dashed exit levels apply only while a position is held. All charts share the same date range. Zoom in/out, select a year, or pan on any chart to update them together.

Indicator overlays are approximated from saved rounded closes because the original full dataset is unavailable. Saved trades and equity remain unchanged; volume is unavailable. Active exit levels for the legacy open position are unavailable because its entry was not saved.

Trade history

Show 89 closed trades
EntryExitEntry $Exit $ReturnReason
2016-11-212017-01-0427.5228.975.27%Indicator exit
2017-01-102017-01-2529.7030.111.38%Indicator exit
2017-01-262017-02-2830.4434.2912.62%Indicator exit
2017-05-022017-05-2236.8938.514.4%Indicator exit
2017-07-112017-08-2136.1839.388.82%Indicator exit
2017-08-302017-09-0740.9340.53-0.99%Indicator exit
2017-10-092017-11-1638.9642.809.86%Indicator exit
2017-12-192017-12-2743.6642.53-2.61%Indicator exit
2018-01-092018-01-2543.6443.57-0.15%Indicator exit
2018-02-152018-03-2042.4543.823.23%Indicator exit
2018-04-112018-04-2343.0641.70-3.15%Indicator exit
2018-05-032018-05-2943.9746.906.66%Indicator exit
2018-06-072018-06-1148.5447.84-1.44%Indicator exit
2018-07-102018-07-3147.6547.59-0.12%Indicator exit
2018-08-022018-09-1050.1655.2410.14%Indicator exit
2018-10-032018-10-0957.5155.91-2.79%Indicator exit
2018-12-042018-12-1245.2442.60-5.84%Indicator exit
2018-12-132018-12-2142.6239.22-7.99%Indicator exit
2018-12-312019-01-0339.6335.66-10%Fixed / trailing stop
2019-03-132019-03-2945.5747.494.2%Indicator exit
2019-04-032019-04-1648.3149.873.21%Indicator exit
2019-04-222019-04-2950.6751.100.86%Indicator exit
2019-05-062019-05-0751.0751.480.82%Indicator exit
2019-06-072019-07-1846.6451.009.34%Indicator exit
2019-07-242019-08-0551.8849.53-4.53%Indicator exit
2019-08-202019-08-2852.7051.04-3.14%Indicator exit
2019-09-032019-09-0451.6152.100.95%Indicator exit
2019-09-062019-09-2553.5054.692.23%Indicator exit
2019-10-082019-11-2156.4666.0016.89%Indicator exit
2019-12-172020-01-2769.9577.5210.81%Indicator exit
2020-03-302020-05-2862.6379.1826.42%Indicator exit
2020-06-092020-06-3083.0390.028.42%Indicator exit
2020-07-092020-07-2096.2696.400.14%Indicator exit
2020-07-212020-07-2299.1796.67-2.53%Indicator exit
2020-08-032020-09-03108.31120.7611.5%Fixed / trailing stop
2020-10-022020-10-22112.84117.434.07%Indicator exit
2020-11-092020-11-24120.50113.91-5.47%Indicator exit
2020-12-022021-01-06122.03127.724.66%Indicator exit
2021-01-252021-02-02143.03135.62-5.18%Indicator exit
2021-03-162021-04-30125.71131.804.84%Indicator exit
2021-06-082021-07-22126.62145.9315.25%Indicator exit
2021-09-012021-09-13152.80150.65-1.41%Indicator exit
2021-10-152021-11-11143.72148.963.65%Indicator exit
2021-11-182021-12-20153.65168.239.49%Indicator exit
2022-02-022022-02-18174.74169.84-2.8%Indicator exit
2022-03-212022-04-11163.51168.733.19%Indicator exit
2022-05-312022-06-13149.03132.86-10.85%Gap below stop
2022-06-242022-08-23139.90167.1319.46%Indicator exit
2022-10-182022-11-03145.34140.17-3.56%Fixed / trailing stop
2022-11-142022-11-30149.06141.42-5.13%Indicator exit
2023-01-102023-02-22130.28148.8114.22%Indicator exit
2023-03-172023-04-12156.08161.223.29%Indicator exit
2023-04-202023-04-21166.09165.05-0.63%Indicator exit
2023-05-022023-05-03170.09169.51-0.34%Indicator exit
2023-05-082023-05-17172.52171.75-0.45%Indicator exit
2023-05-222023-05-23173.96173.13-0.48%Indicator exit
2023-06-012023-06-27177.70185.914.62%Indicator exit
2023-06-282023-07-11187.97189.200.65%Indicator exit
2023-08-282023-09-13180.09176.49-2%Indicator exit
2023-10-052023-10-23173.74170.97-1.59%Indicator exit
2023-11-032023-12-01174.24190.339.23%Indicator exit
2023-12-112023-12-12193.22192.92-0.16%Indicator exit
2023-12-142023-12-20198.01196.86-0.58%Indicator exit
2024-01-222024-02-01192.29184.01-4.31%Indicator exit
2024-03-192024-04-22174.34165.57-5.03%Indicator exit
2024-04-262024-05-30169.83190.7812.34%Indicator exit
2024-06-062024-06-07195.67194.65-0.52%Indicator exit
2024-06-102024-06-11196.88193.69-1.62%Indicator exit
2024-06-122024-06-26207.37211.501.99%Indicator exit
2024-07-032024-07-19220.00224.842.2%Indicator exit
2024-08-162024-09-05223.78221.73-0.92%Indicator exit
2024-09-232024-10-08227.34224.25-1.36%Indicator exit
2024-10-112024-10-28229.49233.341.68%Indicator exit
2024-11-202024-12-31228.06252.4410.69%Indicator exit
2025-01-302025-03-04238.67237.71-0.4%Indicator exit
2025-03-262025-04-03223.51201.50-9.85%Fixed / trailing stop
2025-04-162025-05-09198.36199.000.32%Indicator exit
2025-05-132025-05-23210.37193.67-7.94%Indicator exit
2025-06-092025-06-12204.44199.08-2.62%Indicator exit
2025-06-242025-07-30202.59211.904.6%Indicator exit
2025-08-082025-08-26220.86226.862.72%Indicator exit
2025-09-042025-09-11238.45226.84-4.87%Indicator exit
2025-09-222025-10-08248.30256.523.31%Indicator exit
2025-10-242025-11-10261.16269.113.04%Indicator exit
2025-12-012025-12-09278.10278.160.02%Indicator exit
2026-01-292026-02-17258.00257.90-0.04%Indicator exit
2026-02-252026-03-03271.73263.48-3.04%Indicator exit
2026-04-012026-06-04253.90313.1623.34%Indicator exit
2026-07-062026-07-31307.22304.74-0.81%Gap below stop

Exact rules and methodology

Read the strategy-specific explanation above.

  • Signals use completed daily bars; entries and indicator/holding exits execute at the next session open. Indicators warm up using earlier history; no pre-range entry signal is carried in.
  • Opening stop/target gaps execute at open. Otherwise a scheduled indicator/holding exit executes at open; within a bar, stop takes priority if both stop and target touch.
  • Initial capital $10,000; one fully allocated fractional position, no pyramiding or leverage. Fees and adverse slippage apply to entry and exit. Buy-and-hold benchmark is always long.
  • Open positions are marked at the last close without an assumed final sale fee. Cash interest and dividends are excluded.

Results are calculated on the supplied daily prices. Dividends and cash interest are excluded.

Calculated: 2026-09-30 01:16:09 UTC. Engine: 3.0. Data: AAPL, 2016-09-28–2026-09-25.

Dataset fingerprint0d971f6fbef34f44fc3c55955eb64a877767b56e300e49beb27bdc1e30bc572f

Related backtests

These are separate saved tests. Compare dates and costs before comparing results.

Understand the metrics

What is CAGR?

The equivalent compounded yearly growth across the test’s elapsed calendar dates. It is not the return earned in each year.

What are drawdown and drawdown duration?

Drawdown is the percentage decline from a previous daily equity peak. Longest drawdown duration is the longest observed calendar time from a peak until that equity level is regained, or until the test ends. Underwater sessions count daily closes below the peak and exclude the recovery close. This duration need not belong to the deepest drawdown. “Unrecovered at test end” means the recovery date is unknown.

How is profit factor calculated?

Gross positive dollar profit divided by the absolute sum of negative dollar profit across closed trades, after configured costs. It excludes open positions. Because capital compounds, later trades can have greater dollar weight. Legacy reports without saved dollar P&L use reconstructed amounts from rounded trade returns and are labeled approximate. No losses gives “No losing trades,” not a finite ratio.

What are best/worst trade and losing streak?

Best and worst rank closed trades by percentage return. Longest losing streak counts consecutive closed trades with negative returns; a zero-return or positive trade breaks the streak. These statistics do not forecast future outcomes.

How are holding period and time invested measured?

Holding periods count sessions inclusively, including entry and exit sessions. Time invested is the share of sessions with a position at any point; it does not measure intraday hours. Average winners and losers use closed-trade percentage returns.

Educational historical simulation, not investment advice.

As an Amazon Associate I earn from qualifying purchases.