Blog › Strategy

The Donchian channel breakout strategy, tested on gold, Nasdaq and the S&P 500 with costs

The Donchian channel strategy is the oldest trend rule there is: buy when price breaks the highest high of the last 20 days, sell when it breaks the lowest low of the last 10. I wrote this backtest down in advance, with a line that would count as failure, and ran it on the Nasdaq, the S&P 500, gold and bitcoin, net of costs. It passed on the Nasdaq. Then I looked at how long it took to get there.

The short version: by the line I set in advance, the Donchian breakout passes on the Nasdaq, though I rate it weak there. On QQQ out of sample (2015 to June 2026) it made 78 trades, won 52.6% of them and averaged +1.18% per trade after 0.05% per side, with a profit factor of 2.07 and a Sharpe of 0.70. Failure was a Sharpe below 0.3 or a profit factor below 1.1. On the S&P 500 it did better, on bitcoin it beat buy and hold, and on gold it only just scraped over the line. And one honest catch: on QQQ the same rule needed 19.3 years to get back above its January 2000 high.

Cumulative return of the Donchian 20/10 breakout on QQQ 1999-2026 net of costs: +168.8% for the breakout, +46.9% with the 200-day filter and +1543.3% for buy and hold, with the 19.3 years the breakout spent below its January 2000 high marked
The Donchian 20/10 breakout on QQQ from March 1999 to June 2026, net of costs, against holding QQQ. Left of the dashed line is the in-sample period, right of it everything after. The rule ended at +168.8%, buy and hold at +1543.3%. The arrow marks the day in April 2019 when the breakout finally passed the high it set in January 2000.

The rules fit on an index card, and the Turtles made them famous

Richard Donchian, often called the father of trend following, wrote his channel rule down in the 1950s: when price makes a new 4-week high, the trend is up; follow it until price makes a new low. Decades later the Turtle traders used a shorter version of it as their System 1, a 20-day breakout to get in and a 10-day low to get out, as Curtis Faith describes in Way of the Turtle (2007). That 20/10 form is what traders mean today by "the Donchian channel strategy", so that is what I tested. One market at a time, long only, with no Turtle position sizing.

Rule card for the Donchian 20/10 channel breakout: buy stop at the highest high of the previous 20 days, sell stop at the lowest low of the previous 10 days, fills at the open on gaps, one position, costs of 0.05% per side on ETFs and bitcoin and 0.01% round trip on gold futures
The whole strategy. The channel is built from the previous days only, so today's bar can trigger it but never moves it.

The test was registered on 2026-11-22, two days before it ran. QQQ from 1999 is the main market; SPY from 1993, GLD from 2004, bitcoin from 2014 and gold futures (GC) from 2010 are the checks. In-sample runs to the end of 2014 and out-of-sample from 2015; bitcoin's split is at the end of 2019, because it has less history. Costs are 0.05% per side on the ETFs and bitcoin, two to three times what a retail trader pays for an ETF, and 0.01% round trip on gold futures, the same as in our opening range breakout test. The futures hold positions for weeks, so the continuous GC series was first adjusted for its 67 contract rolls, which would otherwise show up as price moves that never happened. Gold futures use daily bars from the 08:30-13:30 New York session.

One rule matters more than it looks. A breakout is a stop order, and when a market opens above the trigger you don't get the trigger price, you get the open. So every entry fills at whichever is higher, the trigger or the open, and every exit at whichever is lower. If the entry day's low also hits the exit stop, the test assumes you were stopped out the same day. With that settled, here is what came out.

It held out of sample on every market

Net of costsQQQ in-sample 1999-2014QQQ out-of-sample 2015-2026SPY out-of-sampleGLD out-of-sampleGold futures out-of-sampleBitcoin out-of-sample 2020-2026
Trades987870696450
Win rate42.9%52.6%57.1%39.1%39.1%42.0%
Average trade+0.32%+1.18%+1.23%+0.64%+0.73%+6.10%
Median trade-0.70%+0.13%+0.51%-0.90%-0.73%-2.04%
Profit factor1.162.072.781.481.612.70
Total return+16.1%+131.6%+124.0%+44.2%+50.1%+870.0%
CAGR+0.95%+7.62%+7.31%+3.26%+3.67%+42.33%
Max drawdown-48.1%-24.0%-10.9%-20.4%-19.0%-51.2%
Time in market48.7%54.7%57.1%43.4%41.5%44.7%
Sharpe (daily, annualised)0.140.700.860.340.391.14
Longest losing streak (trades)844456
Longest time under water (days)5476823430169817141016
Buy and hold: total return+120.4%+645.5%+333.0%+244.1%+183.8%+756.9%
Buy and hold: max drawdown-83.0%-35.1%-33.7%-22.0%-23.5%-76.6%
Buy and hold: Sharpe0.320.910.820.760.650.86
Buy and hold: longest time under water (days)539271670913061335847

Every market cleared the failure line out of sample, gold only just. But read the first two columns together. From 1999 to 2014 the breakout on QQQ made +16.1% in total, a Sharpe of 0.14 and a profit factor of 1.16. From 2015 it made +131.6%. Same rules, same costs. The difference is the market: the first period holds the dot-com crash and 2008, the second is mostly one long climb. A trend rule looks only as good as the trends it was handed.

Look at the median trade too. On gold and bitcoin it is negative: the typical trade loses, and a few big ones pay for everything. The average QQQ win out of sample was +4.34%, the average loss -2.32%. That is the shape of every trend rule, and it is also where the catch hides, so it gets its own section.

The catch is time: 19 years under water on the Nasdaq

The breakout was long QQQ in late 1999 and peaked in January 2000. Then it kept buying rallies inside the bear market that failed: -27.8% in 2000, -1.7% in 2001, -8.4% in 2002 and then -11.6% in 2003, a year when QQQ itself gained +49.7%. Its in-sample drawdown reached -48.1%. Buy and hold fell -83.0% and needed 14.9 years to recover. The breakout needed 19.3, until April 2019. Over the full 27 years it returned +168.8% against +1543.3% for holding QQQ, and its Sharpe was 0.33.

Out of sample it was better, but not quick. Its longest stretch below a previous high lasted 823 days, from March 2015 to June 2017, while QQQ itself rose. Year by year, it beat buy and hold in 2 of the 12 years since 2015, and those were the two down years for the index:

Out of sampleQQQ breakoutQQQ buy and holdGLD breakoutGLD buy and hold
2015-5.3%+9.4%-8.3%-10.7%
2016+0.2%+7.1%+6.2%+8.0%
2017+8.6%+32.7%+3.0%+12.8%
2018+1.4%-0.1%+2.0%-1.9%
2019+20.3%+39.0%+8.7%+17.9%
2020+26.1%+48.4%+0.6%+24.8%
2021+16.8%+27.4%-3.0%-4.1%
2022-15.9%-32.6%+0.6%-0.8%
2023+29.5%+54.9%+0.8%+12.7%
2024+0.7%+25.6%+3.6%+26.7%
2025+5.5%+20.8%+25.3%+63.7%
2026 (to June 9)+8.0%+15.4%+1.0%-1.4%

Study 2022 first. The breakout still lost -15.9%, because every bear-market rally looks like a breakout for a few days. It lost half as much as the index, and that is the most you can honestly say for it on stocks. In 10 of the 12 years it was positive, but in 10 of them it also trailed the index. Gold tells a different story, and not a better one.

On gold, two trades made the result

Gold was the market the hypothesis was most hopeful about, and it barely passed: a Sharpe of 0.34 on GLD and 0.39 on gold futures, against 0.76 and 0.65 for simply holding gold. Out of sample, every year but one landed between -8.3% and +8.7%. Then came 2025.

Daily GLD candles July to November 2025: the breakout buys at 313.53 on August 28, gold climbs to a peak close 28.6% higher on October 20, and the 10-day-low stop sells at 368.93 on October 27 for +17.6% net after 41 trading days
The best GLD trade since 2015. A buy stop at 313.53 on August 28, 2025; 41 trading days later the 10-day low took it out at 368.93, +17.6% after costs. At the peak close on October 20 the trade was up 28.6%, and the exit gave 8.5% of the price back. That is the price of letting a trend prove it has ended.

The two best GLD trades since 2015 were both in the last ten months of the data: this one, and +14.0% from December 1, 2025 to February 26, 2026. Together they carry the result. Compounded, the 69 out-of-sample GLD trades made +44.4%; without those two they made +7.7%. On gold futures the same August 2025 trade was the best one too (+14.8%), and without the top two the result falls from +50.1% to +15.7%.

That is not a flaw in the code. It is how trend following earns its money: many small losses, then a move big enough to pay for all of them. But it means eleven years of gold breakouts were close to nothing until gold went vertical, and while waiting the strategy spent 1698 days, more than four and a half years, below a previous high. Buy and hold gold's longest stretch was 1306 days.

Drawdown from the previous peak for the Donchian breakout on GLD 2015-2026 against buy and hold: the breakout's drawdowns are shallower at the bottom but last longer, with a maximum of -20.4% against -22.0% for holding gold
GLD out of sample, drawdown from the last peak. Blue is the breakout, grey is holding gold. Its worst drawdown is about as deep as holding gold's, -20.4% against -22.0%, but it stays under for longer: it is out of the market more than half the time, so it also misses many of the recoveries.

So gold gets its own verdict: weak. It clears the line, but only because of two trades, and at double our ETF cost it no longer does. Bitcoin is the opposite case: the one market where it beat holding on risk.

Bitcoin is where the breakout beat buy and hold

Four panels of out-of-sample cumulative return, breakout against buy and hold: SPY 2015-2026 Sharpe 0.86 against 0.82, GLD 0.34 against 0.76, gold futures 0.39 against 0.65, bitcoin 2020-2026 1.14 against 0.86
Out of sample on the four check markets, net of costs. Each panel title gives the breakout's Sharpe first and buy and hold's second.

From 2020 to June 2026 the breakout on bitcoin returned +870.0% against +756.9% for holding it, with a Sharpe of 1.14 against 0.86 and a maximum drawdown of -51.2% against -76.6%. That is the one market where trend following did what its fans promise on risk: it caught the big runs and stepped aside for part of the crashes. Two caveats. The lead in total return depends on where the data ends: as the chart shows, buy and hold was far ahead through 2024 and 2025 and fell back only in the last months. And like gold, two trades carry it: the 50 out-of-sample trades compound to +872.4%, and +291.5% without the best two. The win rate was 42.0%, the median trade -2.04%, and it once lost 6 trades in a row. You would have to sit through that.

The S&P 500 was quietly good too: a Sharpe of 0.86 against 0.82 for holding SPY, with a worst drawdown of -10.9% against -33.7%. It still made +124.0% against +333.0%, because it was invested only 57.1% of the days in a rising decade, and from 1993 to 2014 its Sharpe was only 0.32. Before you take any of these results to a broker, though, there is the question every trend article skips: was 20/10 just lucky?

Every one of the 15 settings passed, and 20/10 is not the best one

The registration fixed a grid in advance: entry channels of 10, 20, 40, 55 and 100 days against exit channels of 5, 10 and 20 days. Nothing here was picked; the map only shows whether 20/10 sits on a plateau or on a spike.

Heatmap of QQQ out-of-sample Sharpe 2015-2026 for Donchian entry channels of 10 to 100 days and exit channels of 5 to 20 days: every cell between 0.43 and 1.01, the tested 20/10 cell at 0.70
Out-of-sample Sharpe on QQQ for every combination, the tested 20/10 rule boxed. The colours exaggerate the differences: the whole map runs from 0.43 to 1.01, and every cell passes the failure line.

All 15 combinations passed on QQQ, and all 15 passed on SPY, GLD, gold futures and bitcoin too. The slower 20-day exit was better than 10 days on QQQ at every entry length, which fits with what a trend rule needs: room to sit through pullbacks. I didn't switch to it. Picking the best cell after looking at out-of-sample data is exactly how a backtest stops meaning anything. On gold the range was 0.34 to 0.80 (GLD) and 0.30 to 0.65 (futures), so no setting turns gold into a strong result either. Next, costs.

Costs barely matter, except on GLD

Average out-of-sample breakout trade at no cost, house cost, 2x and 4x: QQQ +1.28%, +1.18%, +1.08%, +0.88%; SPY +1.33% to +0.93%; GLD +0.74% to +0.34%; gold futures +0.74% to +0.70%; bitcoin +6.20% to +5.80%; break-even round trips 1.28%, 1.33%, 0.74%, 0.74% and 6.20%
The average out-of-sample trade before costs (grey), at our house costs (blue: 0.10% round trip on the ETFs and bitcoin, 0.01% on gold futures), and at 2x and 4x. The break-even cost is the round trip that would wipe out the average trade.

A breakout trades about six times a year and holds for weeks, so costs are small next to the moves. On QQQ the break-even round trip is 1.28%, 12.8 times our already pessimistic cost, and at 4x costs the Sharpe is still 0.51. Gold futures barely notice: break-even at 73.9 times the cost used. GLD is the weak spot. Its trades are small, and at 2x costs its Sharpe drops to 0.28, under the line. Bitcoin fees vary a lot between venues, but its average trade was so large (+6.10%) that even 4x costs leave +5.80%.

The fill rule cost more than the commission. On QQQ, 21.6% of all breakout entries opened above the trigger and were filled at the open, on average 0.28% higher. On GLD it was 31.4% of entries, 0.49% higher on average. Fill every one of those at the trigger, as a lot of backtesting tools do, and you would be quoting a better strategy than the one you can trade. Then the improvement everyone suggests for breakouts.

The 200-day filter halved the drawdown on QQQ and broke gold

The one improvement registered in advance was the Turtle-style trend gate: take a breakout only when the previous close is above its 200-day average. Nothing else changes. Out of sample on QQQ it did what you hope: Sharpe 0.72 instead of 0.70, max drawdown -13.0% instead of -24.0%, for almost the same return (+123.1% against +131.6%). But in-sample, from 1999 to 2014, it turned the QQQ result negative: a Sharpe of -0.18 and -34.2% in total, with a run of 9 losing trades.

Elsewhere it hurt more than it helped. SPY out of sample fell from 0.86 to 0.71, bitcoin from 1.14 to 1.03, and on gold it crossed the failure line: GLD 0.23, gold futures 0.27. As a fix it is not convincing, so I tried the site's standard menu as well.

Nothing on the standard menu passed

Every strategy article now also runs the site's fixed list of possible improvements. It is separate from this test's registration, and its current version (2026-11-08) was set before this run. The choice uses in-sample data only: each market's data is cut at its in-sample end before any variant or indicator is computed. An item is kept if it raises the in-sample Sharpe by at least 0.10 on average over the markets and beats the base rule in at least 70% of its settings; at most two are kept, and only those are then run out of sample, once. Seven items apply to a long-only daily breakout, tried in 81 settings. The base rule's in-sample Sharpe was 0.14 on QQQ, 0.32 on SPY, 0.65 on GLD, 1.66 on bitcoin and 0.32 on gold futures.

Menu item (in-sample only)Change in SharpeShare of settings betterKept?
Trend filter (previous close above its 150/200/250-day average, exit when it flips)-0.0433%no
Calm market only (20-day volatility below its 70th/80th/90th percentile)+0.0353%no
Volatility-scaled size (10/20/40-day volatility, at most 2x)+0.0260%no
Fixed holding time (5/10/15 days) instead of the 10-day low+0.0433%no
ATR stop (2/3/4 x ATR) on top of the channel exit-0.0440%no
No position on Fed decision days (calendar from 2010)+0.0260%no
QQQ, SPY, GLD and gold futures together, equal risk+0.0675%no (gain too small)
Only after fear, one side only, distance from VWAPdo not apply (the menu limits them to mean reversion, two-sided or intraday strategies)

"Change in Sharpe" is the in-sample gain at the menu's default setting, averaged over the markets. None of them passed, so none was run out of sample. The items pulled in different directions on different markets; the menu's trend filter, for example, lifted bitcoin's in-sample Sharpe by 0.24 and cut QQQ's by 0.32. When a fix helps one market and hurts the next, it is noise, not an improvement. Which brings me back to what this site has already said about trend following.

It agrees with the graveyard: single-market trend is thin

The strategy graveyard counts trend following among the families that never cleared our portfolio bar: 44 variants, none added, with the note that one market on its own tends to run a Sharpe of 0.2 to 0.4. That bar is stricter than this test's line. It wants an out-of-sample Sharpe above 0.5 on a 2019 split, low correlation with what is already running, and walk-forward checks. This result fits it. Over the full 27 years on QQQ the breakout's Sharpe was 0.33, and gold out of sample sat at 0.34 and 0.39, right in that range. The 0.70 on QQQ since 2015 is the good stretch, not the whole record. If you want the opposite bet, fading breakouts that fail, we tested that too in Turtle Soup, and it failed on every market we tried.

Lab notes

The test was registered on 2026-11-22 and ran unattended early on November 24. What surprised me was the gap between the split and the whole curve. The in-sample and out-of-sample tables looked like a normal story, weak then good. My first version of the opening chart pointed at the longest dry spell inside the out-of-sample period, the 823 days from March 2015. Then the full-period numbers came out of the same run: 7050 days under water on QQQ, from January 2000 to April 2019. I changed the arrow. A test split into two halves can hide that the first half never really ended. The second surprise was the fill rule: on GLD almost a third of the entries opened above the trigger, which is a lot for a market people think of as calm.

So does the Donchian channel strategy work? By the line I wrote down in advance, yes on the Nasdaq and the S&P 500, yes and better than buy and hold on bitcoin, and only just on gold, where two trades carry the result (both from 2025-2026 on GLD). I would call QQQ weak despite the pass, because the same rule spent 1999 to 2014 going nowhere. A breakout rule is a way to be in a market about half the time with smaller drawdowns, not a way to beat holding it. What you pay for that is time under water, and on the Nasdaq it was measured in decades, not months.

FAQ

What is the Donchian channel strategy?

A Donchian channel is the highest high and the lowest low of the last N days. The classic breakout strategy buys when price breaks above the highest high of the previous 20 days and sells when it breaks below the lowest low of the previous 10 days. It comes from Richard Donchian's channel rule from the 1950s, and the 20/10 form is the one the Turtle traders used as their System 1.

Does the Donchian channel breakout strategy work?

In our pre-registered backtest it passed its failure line on every market tested, net of costs. On QQQ out of sample (2015 to June 2026) it made 78 trades with a 52.6% win rate, a profit factor of 2.07 and a Sharpe of 0.70. On bitcoin it beat buy and hold (Sharpe 1.14 against 0.86). On gold it only just passed (Sharpe 0.34 on GLD), helped by two trades in 2025-2026. The catch: on QQQ it trailed buy and hold by a wide margin, and from 1999 to 2014 its Sharpe was only 0.14.

What are the best Donchian channel settings?

There is no single best one. We tested entry channels of 10, 20, 40, 55 and 100 days against exit channels of 5, 10 and 20 days. On QQQ out of sample all 15 settings passed our failure line, with Sharpes between 0.43 and 1.01; the classic 20/10 scored 0.70. A 20-day exit did better than a 10-day exit on QQQ, but choosing it after seeing those results would be hindsight.

Is the Donchian channel strategy the same as the Turtle trading system?

It is one part of it. The Turtles' System 1 used a 20-day breakout entry and a 10-day exit, which is the rule tested here. The full Turtle system also traded many futures markets at once, went short, and sized each position by volatility. This test is the plain single-market version, long only.

Is there a Donchian channel strategy PDF?

Yes. EdgeLab's free PDF has every rule as tested, the results table and standalone Python code you can run on your own daily data. It is sent by email from the signup box in the article.

Backtest notice: QQQ (1999-03-10 to 2026-06-09), SPY (1993-01-29 to 2026-06-09), GLD (2004-11-18 to 2026-06-09) and bitcoin (BTC-USD, 2014-09-17 to 2026-06-09): daily prices from Yahoo Finance, frozen cache, 0.05% commission per side. Gold futures (GC): Databento continuous 15-minute data 2010-06-07 to 2026-04-06, ratio back-adjusted for contract rolls, daily bars from the 08:30-13:30 New York session, 0.01% per round trip. Stop entries and exits fill at the trigger or at the open when the market gaps through it; one position at a time, fully invested, long only. Rules from Richard Donchian's channel rule in the 20/10 form described in Curtis Faith's Way of the Turtle (2007); the test design was registered on 2026-11-22. Backtested performance is hypothetical. Past performance does not guarantee future results. This is research, not financial advice.
Robin Eriksson

Robin Eriksson

Founder of EdgeLab. Five years of discretionary losses taught me to test everything — now I publish the strategies that survive. About me →

Related: The Turtle Soup strategy, tested: Raschke's rules and the ICT version both fail on 16 years of futures · Linda Raschke's Holy Grail trading strategy, tested: as written, it almost never trades · The Williams %R strategy on the Nasdaq: 27 years, net of costs