KO SMA(50) / SMA(200) Crossover Backtest

HISTORICAL BACKTEST · KO 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 19.19% over the full test period, compared with 106.05% for buy and hold. It underperformed that benchmark on total return. Its largest decline from a previous equity high was 37.54%.

Modify this strategy
Total return19.19%
Profit factor0.79
Longest losing streak2 trades
Best closed trade13.25%
Worst closed trade-13.38%
Longest drawdown duration2376 calendar days
Ending equity$11,919.20
Closed trades7
Win rate42.9%
Average winner6.52%
Average loser-5.56%
Average holding period189.9 sessions
Time invested60.59% 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

KO 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: SMA(50) crosses above SMA(200).
  • Indicator exit: SMA(50) crosses below SMA(200). It executes at the next open.

SMA: a simple moving average is the arithmetic mean of the requested number of daily closes. A price crossover compares the close with that average; a moving-average crossover compares the two averages. Moving averages lag prices and can whipsaw when trends do not persist.

Strategy versus buy and hold

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

● Strategy ● Buy and hold

Drawdowns over time

● Strategy ● Buy and hold

Annual performance

YearStrategyBuy and holdClosed tradesWorst ongoing drawdown
2016 (partial)0%-2.74%00%
20170%10.66%00%
20183.14%3.2%09.01%
201910.82%16.9%111.52%
2020-15.64%-0.92%137.54%
20217.97%7.97%031.82%
2022-4.58%7.43%120.67%
2023-5.82%-7.36%229.12%
20245.04%5.65%126.47%
2025-3.47%12.29%124.18%
2026 (partial)25.65%25.65%026.19%

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.

What these results mean

The strategy’s 1.77% annualized return was 5.73 percentage points below the long buy-and-hold benchmark’s 7.5%. It did not reduce the largest daily peak-to-trough decline versus the benchmark. It held a position during 60.59% of sessions; cash earned no interest in this simulation.

Across 7 closed trades, 42.9% were profitable. The average winner was 6.52% and the average loser was -5.56%. Profit factor was 0.79: $0.79 of positive closed-trade P&L for each $1 of losses. The longest losing run was 2 trades. Win rate alone does not capture the size of wins and losses.

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

The longest observed drawdown lasted 2376 calendar days, with 1633 underwater sessions, from 2020-02-21 to 2026-08-24. Equity regained the earlier peak on the ending date.

Best closed trade: 13.25% · 2020-10-20 to 2022-10-05, exiting because of indicator exit.

Worst closed trade: -13.38% · 2019-05-20 to 2020-04-01, exiting because of indicator exit.

Fewer than 20 closed trades make these statistics especially sensitive to individual outcomes.

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 ● SMA(50) ● SMA(200)

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.

Trade history

Show 7 closed trades
EntryExitEntry $Exit $ReturnReason
2018-08-142019-04-0545.9146.491.26%Indicator exit
2019-05-202020-04-0149.0442.48-13.38%Indicator exit
2020-10-202022-10-0549.8956.5013.25%Indicator exit
2023-01-062023-02-2862.9159.70-5.1%Indicator exit
2023-04-272023-07-2763.5363.05-0.76%Indicator exit
2024-02-132024-12-2359.5062.505.04%Indicator exit
2025-03-192025-10-0168.5566.51-2.98%Indicator exit

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.00 USD; 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-10-01 17:26:19 UTC. Engine: 3.1. Data: KO, 2016-09-28–2026-09-25.

Dataset fingerprintd6e0f31a93a63e4800f4171b41aee1a1fa9d89ad5c5d12ee6e162abab7f75ac2

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.