AAPL 5-Day EMA 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 333.69% 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 30.7%.

Modify this strategy
Total return333.69%
Profit factor1.43 (approx.)
Longest losing streak12 trades
Best closed trade10.09%
Worst closed trade-9.03%
Longest drawdown duration891 calendar days
Ending equity$43,369.33
Closed trades197
Win rate36%
Average winner6.29%
Average loser-2.27%
Average holding period6.6 sessions
Time investedUnavailable (legacy open trade)

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: close crosses above EMA(5).

EMA: an exponential moving average gives more weight to recent closes. The engine seeds each period with a simple average, then applies exponential smoothing. A close/EMA crossover compares yesterday’s relationship with today’s; an EMA/EMA rule compares the two requested averages.

6% profit target: measured from the raw entry open, before execution slippage and fees. Opening gaps fill at open; otherwise daily high/low touches determine fills. A stop takes priority when both stop and target touch in one daily bar.

2% fixed stop: measured from the raw entry open, before execution slippage and fees. Opening gaps fill at open; otherwise daily high/low touches determine fills. A stop takes priority when both stop and target touch in one daily bar.

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

Legacy report: the benchmark curve and its drawdown are approximated from stored rounded prices and the original benchmark total. The strategy figures remain the original saved calculations.

Drawdowns over time

● Strategy ● Buy and hold

Annual performance

YearStrategyBuy and holdClosed tradesWorst ongoing drawdown
2016 (partial)0.02%1.92%35.88%
201725.56%46.1%96.52%
2018-5.04%-6.78%2224.27%
201978.59%86.13%1524.75%
202018.44%80.75%2821.53%
202122.28%33.82%2211.74%
2022-28.77%-26.83%3030.5%
202333.72%48.18%1330.7%
202426.54%30.07%2115.32%
202516.02%8.56%2120.94%
2026 (partial)0.54%25.13%1311.08%

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 2% stop did not cap every loss: the trade exiting on 2026-07-31 lost 9.03% after opening beyond the stop. Daily gaps can bypass the intended exit level.

What these results mean

The strategy’s 15.82% annualized return was 12.39 percentage points below the long buy-and-hold benchmark’s 28.21%. Its worst daily peak-to-trough decline was smaller by 8.03 percentage points. That is a return/drawdown trade-off, not proof of better risk-adjusted performance.

Across 197 closed trades, 36% were profitable. The average winner was 6.29% and the average loser was -2.27%. Profit factor was 1.43: $1.43 of positive closed-trade P&L for each $1 of losses (approximate legacy reconstruction). The longest losing run was 12 trades. Win rate alone does not capture the size of wins and losses.

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

The longest observed drawdown lasted 891 calendar days, with 612 underwater sessions, from 2022-01-03 to 2024-06-12. Equity regained the earlier peak on the ending date.

Best closed trade: 10.09% · 2024-04-25 to 2024-05-03, exiting because of gap above target.

Worst closed trade: -9.03% · 2026-07-27 to 2026-07-31, 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 ● EMA(5) ● Profit target (6%) ● Fixed stop (2%)

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 197 closed trades
EntryExitEntry $Exit $ReturnReason
2016-10-252016-10-2629.4928.58-3.09%Gap below stop
2016-11-092016-11-1027.4726.92-2%Stop
2016-11-172016-12-1527.4629.106%Target
2016-12-272017-02-0129.1431.768.98%Gap above target
2017-02-022017-02-1532.0033.926%Target
2017-03-132017-05-0134.7136.806%Target
2017-05-222017-06-0938.5137.74-2%Stop
2017-06-202017-06-2736.7235.98-2%Stop
2017-06-292017-07-2536.1938.366%Target
2017-08-032017-09-2039.2638.48-2%Stop
2017-09-282017-10-2738.4640.766%Target
2017-11-222017-11-2943.3642.49-2%Stop
2017-12-122018-01-2943.0442.18-2%Stop
2018-02-072018-02-0740.7739.96-2%Stop
2018-02-132018-02-1540.4942.926%Target
2018-03-052018-03-2143.7942.91-2%Stop
2018-03-272018-03-2743.4242.55-2%Stop
2018-04-042018-04-1241.2243.696%Target
2018-05-012018-05-0241.6044.096%Target
2018-05-172018-06-1947.0046.06-2%Stop
2018-06-292018-08-0146.5749.796.92%Gap above target
2018-08-022018-08-1650.1653.166%Target
2018-09-122018-09-1256.2455.11-2%Stop
2018-09-142018-09-1756.4455.31-2%Stop
2018-09-212018-10-1055.1654.05-2%Stop
2018-10-152018-10-1855.2954.18-2%Stop
2018-10-222018-10-2354.9753.87-2%Stop
2018-10-262018-10-2953.9152.83-2%Stop
2018-11-012018-11-0254.7752.39-4.35%Gap below stop
2018-11-082018-11-0952.4951.38-2.11%Gap below stop
2018-11-292018-11-2945.6644.74-2%Stop
2018-12-042018-12-0445.2444.33-2%Stop
2018-12-142018-12-1442.2541.41-2%Stop
2018-12-272018-12-2738.9538.17-2%Stop
2019-01-092019-01-3037.7440.818.13%Gap above target
2019-01-312019-03-0441.5344.026%Target
2019-03-122019-03-2144.9847.676%Target
2019-03-292019-04-0947.4950.346%Target
2019-05-022019-05-0652.4951.07-2.71%Gap below stop
2019-06-052019-06-1046.0648.836%Target
2019-06-272019-07-3150.0754.108.05%Gap above target
2019-08-092019-08-2150.3353.346%Target
2019-08-302019-09-0352.5451.49-2%Stop
2019-09-052019-09-1252.9956.206.06%Gap above target
2019-09-172019-10-0354.9753.87-2%Stop
2019-10-072019-10-2156.5759.966%Target
2019-11-012019-11-1362.3966.136%Target
2019-11-262019-12-0366.7364.58-3.23%Gap below stop
2019-12-062019-12-2366.8870.896%Target
2020-01-292020-01-3181.1379.51-2%Stop
2020-02-052020-02-1080.8878.55-2.88%Gap below stop
2020-02-112020-02-1880.8678.84-2.5%Gap below stop
2020-02-202020-02-2180.6679.04-2%Stop
2020-03-032020-03-0375.9274.40-2%Stop
2020-03-052020-03-0673.8870.48-4.61%Gap below stop
2020-03-112020-03-1269.3564.01-7.7%Gap below stop
2020-03-162020-03-1660.4764.106%Target
2020-03-252020-03-2562.7261.47-2%Stop
2020-04-072020-04-0767.7066.35-2%Stop
2020-04-232020-04-3068.9673.106%Target
2020-05-152020-05-1975.0979.596%Target
2020-06-152020-06-1683.2988.286%Target
2020-06-302020-07-0990.0296.266.94%Gap above target
2020-07-212020-07-2199.1797.19-2%Stop
2020-07-232020-07-2397.0095.06-2%Stop
2020-07-282020-07-3194.27102.889.13%Gap above target
2020-08-132020-08-21114.44121.316%Target
2020-09-232020-09-23111.63109.40-2%Stop
2020-09-282020-10-02114.91112.61-2%Stop
2020-10-062020-10-06115.68113.37-2%Stop
2020-10-082020-10-12116.25123.236%Target
2020-10-282020-10-28115.04112.74-2%Stop
2020-10-302020-10-30111.04108.82-2%Stop
2020-11-052020-11-10117.93115.56-2.01%Gap below stop
2020-11-122020-11-19119.71117.32-2%Stop
2020-11-302020-12-07116.94123.966%Target
2020-12-112020-12-22122.49131.597.43%Gap above target
2021-01-082021-01-11132.43129.16-2.47%Gap below stop
2021-01-142021-01-15130.80128.18-2%Stop
2021-01-212021-01-25133.84143.036.87%Gap above target
2021-02-052021-02-10137.32134.57-2%Stop
2021-03-022021-03-02128.40125.83-2%Stop
2021-03-102021-03-25121.54119.11-2%Stop
2021-03-302021-04-07120.10127.316%Target
2021-04-222021-05-04133.04130.38-2%Stop
2021-05-102021-05-10129.40126.81-2%Stop
2021-05-172021-05-19126.82123.16-2.89%Gap below stop
2021-05-212021-05-21127.85125.29-2%Stop
2021-05-252021-05-27127.84125.28-2%Stop
2021-06-072021-06-22126.18133.756%Target
2021-07-212021-07-28145.53142.62-2%Stop
2021-08-042021-09-07147.26156.106%Target
2021-09-232021-09-28146.62143.27-2.28%Gap below stop
2021-10-072021-10-13143.00140.14-2%Stop
2021-10-152021-10-28143.72152.346%Target
2021-11-032021-11-19150.39159.416%Target
2021-11-302021-12-01159.97169.576%Target
2021-12-072021-12-10169.06179.206%Target
2021-12-162021-12-16179.30175.71-2%Stop
2021-12-222022-01-10172.93169.08-2.23%Gap below stop
2022-01-122022-01-13176.09172.57-2%Stop
2022-01-312022-02-14170.24166.84-2%Stop
2022-02-162022-02-18171.82168.38-2%Stop
2022-02-282022-03-07162.97159.71-2%Stop
2022-03-102022-03-10160.20157.00-2%Stop
2022-03-172022-03-22158.55168.066%Target
2022-04-052022-04-06177.55172.35-2.93%Gap below stop
2022-04-142022-04-14170.73167.32-2%Stop
2022-04-202022-04-22168.76165.38-2%Stop
2022-04-292022-04-29161.86158.62-2%Stop
2022-05-042022-05-05159.67156.48-2%Stop
2022-05-182022-05-18146.86143.92-2%Stop
2022-05-242022-05-24140.83138.01-2%Stop
2022-05-272022-06-10145.39140.28-3.51%Gap below stop
2022-06-222022-06-27134.84142.936%Target
2022-06-302022-06-30137.22134.48-2%Stop
2022-07-052022-07-07137.77146.046%Target
2022-07-202022-07-29151.07161.246.73%Gap above target
2022-08-262022-08-26170.57167.16-2%Stop
2022-09-122022-09-13159.60156.41-2%Stop
2022-09-202022-09-23153.40150.33-2%Stop
2022-10-052022-10-07144.07141.19-2%Stop
2022-10-142022-10-14144.29141.40-2%Stop
2022-10-182022-10-18145.34142.43-2%Stop
2022-10-312022-11-01153.16150.10-2%Stop
2022-11-112022-11-29145.82142.90-2%Stop
2022-12-012022-12-06148.30145.33-2%Stop
2022-12-132022-12-13149.43146.44-2%Stop
2022-12-222022-12-22134.42131.73-2%Stop
2023-01-092023-01-18130.52138.356%Target
2023-02-142023-02-21152.07149.03-2%Stop
2023-03-062023-03-09153.81150.73-2%Stop
2023-03-142023-03-22151.27160.356%Target
2023-03-302023-05-05161.59171.296%Target
2023-05-082023-06-05172.52182.876%Target
2023-06-092023-06-30181.52192.416%Target
2023-07-132023-08-04190.50185.56-2.59%Gap below stop
2023-08-232023-09-01178.56189.576.17%Gap above target
2023-09-192023-09-21177.52173.97-2%Stop
2023-09-262023-09-27174.73171.24-2%Stop
2023-10-032023-10-26172.29168.84-2%Stop
2023-10-312023-11-06169.27179.436%Target
2023-11-292024-01-02190.91187.09-2%Stop
2024-01-092024-01-22183.92194.966%Target
2024-02-062024-02-14186.90183.16-2%Stop
2024-02-232024-02-26185.01181.31-2%Stop
2024-02-282024-03-01182.57178.92-2%Stop
2024-03-122024-03-25173.19169.73-2%Stop
2024-03-282024-04-02171.71168.28-2%Stop
2024-04-102024-04-19168.80165.42-2%Stop
2024-04-252024-05-03169.54186.6510.09%Gap above target
2024-05-282024-06-11191.51203.006%Target
2024-06-122024-06-12207.37219.816%Target
2024-06-272024-06-28214.70210.41-2%Stop
2024-07-022024-07-09216.15229.126%Target
2024-08-012024-08-01224.37219.88-2%Stop
2024-08-052024-08-05199.09211.046%Target
2024-08-092024-08-15212.10224.836%Target
2024-08-262024-09-03226.76222.22-2%Stop
2024-09-122024-09-16222.51216.52-2.69%Gap below stop
2024-09-192024-11-01225.00220.50-2%Stop
2024-11-082024-11-11227.17222.63-2%Stop
2024-11-142024-12-02225.11238.626%Target
2024-12-202025-01-02248.04243.08-2%Stop
2025-01-162025-01-16237.32232.57-2%Stop
2025-01-282025-01-31230.84247.097.04%Gap above target
2025-02-072025-02-07232.54227.89-2%Stop
2025-02-122025-02-14231.12244.996%Target
2025-03-032025-03-03241.81236.97-2%Stop
2025-03-102025-03-10235.50230.79-2%Stop
2025-03-242025-03-31221.00216.58-2%Stop
2025-04-012025-04-03219.76205.53-6.48%Gap below stop
2025-04-102025-04-10189.06185.28-2%Stop
2025-04-142025-04-14211.43207.20-2%Stop
2025-04-232025-05-05205.99201.87-2%Stop
2025-05-132025-05-19210.37206.16-2%Stop
2025-06-022025-06-13200.28196.27-2%Stop
2025-06-232025-07-03201.59213.696%Target
2025-07-172025-08-01210.72206.51-2%Stop
2025-08-072025-08-13218.89232.026%Target
2025-08-252025-09-05226.48240.076%Target
2025-09-152025-09-22237.00251.226%Target
2025-10-202025-10-29255.89271.246%Target
2025-11-112025-12-02269.85286.046%Target
2025-12-262026-01-05274.16268.68-2%Stop
2026-01-272026-01-30259.14253.96-2%Stop
2026-02-122026-02-12275.59270.08-2%Stop
2026-02-232026-03-05263.49258.22-2%Stop
2026-03-242026-04-15250.35265.376%Target
2026-04-232026-04-27274.90266.09-3.2%Gap below stop
2026-04-292026-05-01267.59283.656%Target
2026-06-032026-06-05314.18307.90-2%Stop
2026-06-162026-06-25295.15287.55-2.57%Gap below stop
2026-07-012026-07-06293.49311.106%Target
2026-07-222026-07-23327.86321.30-2%Stop
2026-07-272026-07-31334.99304.74-9.03%Gap below stop
2026-08-192026-09-03310.14328.756%Target

Exact rules and methodology

Read the strategy-specific explanation above.

  • Signal: close crosses above the EMA; enter at the next session’s open.
  • Exit: fixed target or stop from entry price; if both touch in one bar, stop takes priority.
  • Opening gaps fill at the open. A new entry waits until the session after a signal.
  • Initial equity $10,000, fully invested using fractional shares; no fees, slippage, dividends, or interest.
  • An open position at the end is marked to market, not counted as a closed trade.

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

Calculated: 2026-09-29 10:18:49 (original saved report). Engine: legacy 1.0. Data: AAPL, 2016-09-28–2026-09-25.

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.