BACKTEST RESULTS

Donchian breakout strategy backtest results

SPY daily data, 2016 to 2026: the 20-day entry, 10-day exit rule, long and short, lost 30.0% after costs over 117 trades, winning 35.9% of them, against +277.8% for holding SPY. Long only it made 24.8%. The best of 6 runs was 20-day entry, 10-day exit on QQQ, long only: +100.6%, held-out survived. Every run, every trade and the script are on this page.

SPY · daily data · 20-day entry, 10-day exit · long and short
Net after costs
-30.0%
Holding SPY
+277.8%
Trades
117
Win rate
35.9%
Profit factor
0.84
Max drawdown
39.8%
Held out, last third: did not survive
Long only: +24.8% on 76 trades, held-out survived
4 January 2016 to 23 October 2026
  • Checked 25 October 2026
  • Alpaca daily data since 2016
  • 0.05% commission + 0.025% slippage per fill
  • last third of the history held out
  • 6 runs, 546 trades
  • Updated 1 November 2026

The short answer

Answers here: Do the turtle rules still work? · 20/10 or 55/20? · What is the win rate? · Long only, or both ways?

SPY daily data, 4 January 2016 to 23 October 2026, long and short: 117 trades, lost 30.0% after costs, 35.9% of trades won, profit factor 0.84, worst drawdown 39.8%, 59% of the time in the market. Holding SPY returned +277.8% over the same period.

Held out on its own, the last third (16 March 2023 to 23 October 2026) lost 15.5% on 39 trades: it did not survive its held-out period.

Long only, the same rule made 24.8% on 76 trades (44.7% won, profit factor 1.40, held-out survived): the short side cost 54.9 points of return in a period when SPY rose 277.8%.

Across all 6 runs on this page, 3 made money after costs, 3 survived the held-out third, and 0 beat holding the symbol.

The best run was 20-day entry, 10-day exit on QQQ, long only: +100.6% net on 63 trades, profit factor 2.03, worst drawdown 12.7%, held-out survived. The tester's verdict on it reads "real edge so far · check the test period".

One symbol's past after modelled costs is not a forecast. Prices are split-adjusted and not dividend-adjusted, so every return here is a price return; the period includes a long rise with two sharp falls, and a rule that is often long did well for that reason as much as any other. These are research results, not investment advice.

What the script does

Donchian Breakout Strategy (turtle), from the strategy library.

Turtle-style: goes long when the close breaks above the highest high of the last 20 days and goes short when it breaks below the lowest low of the last 20 days; the trade closes on a 10-day low (a 10-day high for shorts). A stop sits 2 ATR away and there is no trend filter. The 55-day entry with a 20-day exit the Turtles also used was run on SPY, and long-only versions on SPY and QQQ.

The indicator itself, with its Pine code drawn on real market data: Donchian Channels.

The numbers, run by run

Net and holding the symbol are after costs over the same period. Held-out is the verdict on the last third of the history judged alone: survived, decayed, did not survive, or too few trades to judge.

SymbolTimeframeSettingsDirectionTradesWin rateNetHoldingProfit factorMax drawdownHeld-out
SPYdaily20-day entry, 10-day exitlong and short11735.9%-30.0%+277.8%0.8439.8%did not survive
SPYdaily55-day entry, 20-day exitlong and short8236.6%-46.4%+277.8%0.5153.9%did not survive
QQQdaily20-day entry, 10-day exitlong and short10736.5%-32.2%+542.3%0.9238.6%survived
NVDAdaily20-day entry, 10-day exitlong and short10135.6%+21.9%+25955.3%1.3673.3%did not survive
SPYdaily20-day entry, 10-day exitlong only7644.7%+24.8%+277.8%1.4017.4%survived
QQQdaily20-day entry, 10-day exitlong only6347.6%+100.6%+542.3%2.0312.7%survived

Year by year

20-day entry, 10-day exit on SPY, long and short, the same rule long only, and SPY itself, each calendar year after costs. A partial first or last year counts the sessions it has.

Year20-day entry, 10-day exit, long and short20-day entry, 10-day exit, long onlyHolding SPY
2016+0.2%+7.0%+11.2%
2017-2.0%+1.0%+18.5%
2018-2.5%+2.8%-6.9%
2019-3.4%+8.1%+28.6%
2020+1.5%+3.7%+15.1%
2021-14.6%-8.1%+28.8%
2022+3.1%-2.6%-19.9%
2023-7.9%+3.1%+24.8%
2024-7.3%+2.7%+24.0%
2025-8.4%-2.2%+16.6%
2026+5.9%+6.2%+11.2%

Every trade

The 117 trades of 20-day entry, 10-day exit on SPY, long and short, oldest first: side, entry and exit days, fill prices after slippage, and the return after both commissions. The other runs' trades open below.

SideInOutEntryExitReturn
long2016-02-232016-04-29194.05205.07+5.6%
long2016-05-312016-06-14210.61207.94-1.4%
short2016-06-272016-06-30201.53208.09-3.4%
long2016-07-112016-08-03213.25215.42+0.9%
long2016-08-082016-09-01218.46216.05-1.2%
short2016-09-122016-09-12212.33216.64-2.1%
short2016-11-022016-11-07210.61212.50-1.0%
long2016-11-102016-12-28217.38224.32+3.1%
long2017-01-262017-01-30229.47226.38-1.4%
long2017-02-102017-03-08231.09236.66+2.3%
short2017-03-222017-04-05233.70237.05-1.5%
long2017-04-262017-05-17238.60237.52-0.6%
long2017-05-262017-06-28241.62242.43+0.2%
long2017-07-172017-08-10245.54243.92-0.8%
short2017-08-182017-08-30242.83246.34-1.5%
long2017-09-122017-10-25249.70254.97+2.0%
long2017-10-302017-11-15257.14255.94-0.6%
long2017-11-222017-12-01260.11261.80+0.6%
long2017-12-192018-01-30268.56282.51+5.1%
short2018-02-062018-02-07259.92270.54-4.2%
short2018-02-092018-02-12260.72266.32-2.2%
short2018-03-232018-04-13264.08267.49-1.4%
long2018-05-112018-05-30272.24270.45-0.8%
long2018-06-052018-06-19275.12273.58-0.7%
long2018-07-162018-08-15279.72280.25+0.1%
long2018-08-222018-09-06285.96287.49+0.4%
long2018-09-212018-09-26293.17289.69-1.3%
short2018-10-112018-11-01277.00273.59+1.1%
short2018-12-182019-01-08257.12256.890.0%
long2019-01-172019-03-08260.08272.85+4.8%
long2019-03-192019-03-22283.59279.19-1.7%
long2019-04-022019-05-06286.12289.17+1.0%
short2019-05-142019-05-16281.94288.03-2.3%
short2019-05-302019-06-05279.03282.41-1.3%
long2019-06-192019-07-31292.63297.41+1.5%
short2019-08-022019-09-06293.77298.25-1.6%
long2019-09-062019-09-25298.25295.88-0.9%
short2019-10-032019-10-07287.74295.14-2.7%
long2019-10-282019-12-03303.03308.56+1.7%
long2019-12-132020-01-06316.96320.40+1.0%
long2020-01-102020-01-27327.38322.94-1.5%
long2020-02-072020-02-24332.91323.05-3.1%
short2020-02-262020-03-13314.11271.14+13.6%
short2020-03-172020-03-25244.97252.27-3.1%
long2020-04-132020-05-14277.23274.81-1.0%
long2020-05-192020-06-11294.42306.81+4.1%
long2020-07-212020-09-03326.54345.83+5.8%
short2020-09-212020-10-06325.61340.00-4.5%
long2020-10-092020-10-27345.67339.66-1.8%
short2020-10-292020-11-03326.82338.32-3.6%
long2020-11-102020-12-21353.58363.85+2.8%
long2021-01-082021-01-27380.70374.68-1.7%
long2021-02-052021-02-23388.32383.57-1.3%
short2021-03-052021-03-09380.31388.87-2.3%
long2021-03-162021-03-25397.18384.29-3.3%
long2021-04-052021-05-04403.57412.20+2.0%
long2021-05-102021-05-11422.62412.99-2.4%
short2021-05-132021-05-14406.96415.01-2.1%
long2021-06-112021-06-18424.31416.97-1.8%
long2021-06-282021-07-08427.29427.90+0.0%
long2021-07-122021-07-19435.54426.07-2.3%
long2021-07-262021-08-19439.43436.15-0.8%
long2021-08-242021-09-10448.09446.99-0.3%
short2021-09-212021-09-23436.41443.03-1.6%
long2021-10-182021-11-29444.09463.94+4.4%
short2021-12-012021-12-07461.51466.18-1.1%
long2021-12-282022-01-10477.85462.57-3.3%
short2022-01-212022-03-02445.44439.80+1.2%
long2022-03-212022-04-12444.46442.96-0.4%
short2022-04-252022-05-27423.54414.07+2.1%
short2022-06-142022-06-24376.75387.65-3.0%
long2022-07-212022-08-22394.27413.53+4.8%
short2022-08-292022-10-04402.09373.73+7.0%
long2022-10-262022-11-03381.72371.37-2.8%
long2022-11-112022-12-06395.70393.33-0.7%
short2022-12-162023-01-09385.08390.48-1.5%
long2023-01-242023-02-22398.99399.40+0.0%
short2023-03-102023-03-30390.88404.20-3.5%
long2023-04-032023-04-26408.97406.61-0.7%
long2023-05-012023-05-04415.58406.33-2.3%
long2023-05-192023-05-24420.29410.09-2.5%
long2023-06-052023-06-23428.42432.81+0.9%
long2023-07-132023-08-03448.02447.92-0.1%
short2023-08-162023-08-30442.34449.65-1.8%
short2023-09-222023-10-09432.34431.65+0.1%
short2023-10-262023-11-02416.34429.02-3.1%
long2023-11-132024-01-03439.34468.96+6.6%
long2024-01-222024-01-31484.14483.28-0.3%
long2024-02-052024-02-13493.84493.06-0.3%
long2024-02-232024-04-05509.39514.29+0.9%
short2024-04-162024-04-24504.80507.00-0.5%
long2024-05-102024-05-31521.95523.44+0.2%
long2024-06-062024-07-18535.12555.67+3.7%
short2024-07-252024-07-31541.20552.79-2.2%
short2024-08-052024-08-15511.50549.65-7.6%
long2024-08-202024-09-04559.30550.05-1.8%
long2024-09-202024-11-01567.99571.17+0.5%
long2024-11-072024-12-18593.24597.62+0.6%
long2025-01-232025-02-03605.96591.91-2.4%
long2025-02-192025-02-24610.24599.08-1.9%
short2025-02-282025-03-24585.40571.72+2.2%
short2025-04-042025-04-25523.59546.80-4.5%
long2025-05-052025-08-01562.70623.82+10.8%
long2025-08-132025-09-02645.08636.14-1.5%
long2025-09-112025-09-25654.35656.62+0.2%
long2025-10-022025-10-10670.65663.27-1.2%
short2025-10-132025-10-13660.47665.22-0.8%
long2025-10-272025-11-07682.91662.71-3.1%
short2025-11-192025-11-25660.60671.50-1.7%
long2025-12-082025-12-17686.78679.71-1.1%
long2025-12-262026-01-20690.82681.31-1.5%
short2026-03-162026-04-01668.16654.05+2.0%
long2026-04-142026-06-05687.87740.17+7.5%
short2026-07-302026-07-31735.86746.78-1.6%
long2026-08-042026-08-21760.82765.84+0.6%
short2026-09-112026-09-21764.49767.36-0.5%
long2026-10-072026-10-15775.97765.39-1.5%

The script

Pine v6, exactly as it ran for 20-day entry, 10-day exit on SPY, long and short. The variants change only the inputs listed in the table.

//@version=6
strategy("Donchian Breakout Strategy", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=100, initial_capital=100000, commission_type=strategy.commission.percent, commission_value=0.05, slippage=1, margin_long=0, margin_short=0)

entryLen = input.int(20, "Entry channel length", minval=2, group="Setup")
exitLen  = input.int(10, "Exit channel length", minval=1, group="Setup")
trendLen = input.int(0, "Trend filter SMA length (0 = off)", minval=0, group="Setup")
useLong  = input.bool(true, "Trade longs", group="Direction")
useShort = input.bool(true, "Trade shorts", group="Direction")
atrLen   = input.int(14, "ATR length", minval=1, group="Risk")
stopMult = input.float(2, "Stop (ATR multiples)", minval=0, step=0.5, group="Risk")

// channels of the previous bars, so a breakout compares against history
entryHigh = ta.highest(high, entryLen)[1]
entryLow  = ta.lowest(low, entryLen)[1]
exitHigh  = ta.highest(high, exitLen)[1]
exitLow   = ta.lowest(low, exitLen)[1]
atr       = ta.atr(atrLen)
// the trend filter is computed every bar and only consulted when it is on
trendMa   = ta.sma(close, math.max(trendLen, 1))
okLong    = trendLen == 0 or close > trendMa
okShort   = trendLen == 0 or close < trendMa

longSig   = ta.crossover(close, entryHigh) and okLong and barstate.isconfirmed
shortSig  = ta.crossunder(close, entryLow) and okShort and barstate.isconfirmed
exitLong  = ta.crossunder(close, exitLow) and barstate.isconfirmed
exitShort = ta.crossover(close, exitHigh) and barstate.isconfirmed

plot(entryHigh, "Entry high", color=color.new(#16A56A, 0), linewidth=1)
plot(entryLow, "Entry low", color=color.new(#E5484D, 0), linewidth=1)
plot(exitLow, "Exit low", color=color.new(#16A56A, 60), linewidth=1, style=plot.style_stepline)
plot(exitHigh, "Exit high", color=color.new(#E5484D, 60), linewidth=1, style=plot.style_stepline)
plot(trendLen > 0 ? trendMa : na, "Trend filter", color=color.new(#A3A39E, 0), linewidth=1)

if longSig and useLong
    strategy.entry("Long", strategy.long)
    strategy.exit("Long stop", "Long", stop=stopMult > 0 ? close - stopMult * atr : na)
if shortSig and useShort
    strategy.entry("Short", strategy.short)
    strategy.exit("Short stop", "Short", stop=stopMult > 0 ? close + stopMult * atr : na)
if exitLong
    strategy.close("Long")
if exitShort
    strategy.close("Short")

How it was tested

Alpaca daily data since 2016, 0.05% commission and 0.025% slippage on every fill, the last third of the history held out, textbook settings and nothing tuned. The engine, fills and what it does not model are written out once, in data and methodology.

Run the Donchian breakout (turtle) strategy on your own symbol, free

Describe the rule in your own words or paste the script. The Free plan writes the Pine v6 script with the AI, runs it on any US stock or ETF with the same costs and the same held-out check, and shows every trade on the chart. No card.

Every strategy tested

Seventeen popular rules through the same engine, the same costs and the same held-out check, with every trade listed. Next: Keltner Channel strategy, SuperTrend strategy, Trailing stop strategy.

Questions

Does the Donchian breakout (turtle) strategy work?

SPY, daily data, 2016 to 2026, long and short: 20-day entry, 10-day exit lost 30.0% after costs over 117 trades (35.9% won, profit factor 0.84) against +277.8% for holding SPY, and the held-out third did not survive. Long only it made 24.8%. Across all 6 runs on the page, 3 made money after costs, 3 survived their held-out third and 0 beat holding the stock.

What is the win rate of the Donchian breakout (turtle) strategy?

From 35.6% to 47.6% across the 6 runs. The classic setting, 20-day entry, 10-day exit on SPY long and short, won 35.9% of 117 trades. The win rate alone does not decide the result: that run's profit factor was 0.84, so its losers outweighed its winners, and the net return was -30.0%.

What are the best Donchian breakout settings?

Of the 2 settings tested, 20-day entry, 10-day exit on QQQ (long only) did best: +100.6% net, profit factor 2.03, held-out survived. That is the best of 6 tries on 10.8 years of daily data of one symbol, which is already a fitted number. A setting that works on one symbol or one period only is a coincidence, not a setting; run it on your own symbol and timeframe before trusting it.

Does the Donchian breakout (turtle) strategy beat holding the stock?

0 of the 6 runs did. SPY itself returned +277.8% between 4 January 2016 and 23 October 2026, so a rule that is out of the market part of the time has a lot to make up; what a timing rule usually gets you is a smaller drawdown, not a bigger return. The classic run's worst drawdown was 39.8% with 59% of the time in the market.

Did the Donchian breakout (turtle) strategy hold up out of sample?

The last third of every run's history (16 March 2023 to 23 October 2026 for the lead run) was judged on its own, with no fitting on it: 3 of 6 runs survived, 0 decayed, 3 did not survive and 0 had too few trades there to judge. Survived means a positive Sharpe ratio on the held-out part at least half the fitted period's; it is a check on one later stretch, not a forecast.

How was this tested?

With the free Alpha Charts tester's own engine: the Pine v6 scripts on this page, run on Alpaca daily data since 2016, split-adjusted and not dividend-adjusted, one position at a time with the whole account, fills at the next candle's open, a commission of 0.05% and slippage of 0.025% on every fill, the last third of the history held out. The settings are the textbook ones and every variant is stated; nothing was tuned to make the page look better.

Every number on this page is the output of the Alpha Charts backtest engine on 25 October 2026, on Alpaca market data; the scripts are the strategy library's templates, shown as they ran. Symbols are US-listed ETFs and stocks; results are price returns after the costs stated. Past results are not a forecast and nothing here is investment advice. TradingView and Pine Script belong to TradingView, Inc.; Alpha Charts is not affiliated with it.