Trend-Following Backtester · Guide · Assets 한국어
Assets
Apple (AAPL) backtest
Over forty years of daily bars, spanning several crashes and recoveries — enough history to see how a strategy behaves when things break.
Results by strategy
2 of 10 beat buy and hold (CAGR 18.6%, drawdown -82.2%). Sorted by CAGR.
| Strategy · parameters | CAGR | Max drawdown | Sharpe | Calmar | Total return | Trades | Time in market |
|---|---|---|---|---|---|---|---|
| Donchian channel breakout entryN=15, exitN=49 |
21.4% | -71.0% | 0.73 | 0.30 | 7080.0x | 141 | 78% |
| MACD fast=41, slow=122, signal=16 |
18.7% | -53.8% | 0.74 | 0.35 | 2539.6x | 294 | 53% |
| Supertrend period=26, mult=3.4 |
18.1% | -55.7% | 0.72 | 0.33 | 2038.6x | 280 | 57% |
| Keltner channel breakout emaPeriod=154, atrPeriod=8, mult=1.3 |
17.8% | -81.8% | 0.70 | 0.22 | 1782.0x | 169 | 61% |
| Bollinger band breakout n=135, k=1.5 |
17.3% | -70.6% | 0.72 | 0.25 | 1497.5x | 87 | 49% |
| Parabolic SAR step=0.005, maxStep=0.04 |
17.2% | -63.7% | 0.69 | 0.27 | 1420.3x | 308 | 57% |
| EMA crossover fast=4, slow=135 |
17.1% | -84.2% | 0.67 | 0.20 | 1382.2x | 209 | 64% |
| SMA crossover fast=12, slow=43 |
15.8% | -70.7% | 0.63 | 0.22 | 829.2x | 288 | 58% |
| ADX / DI directional period=97, threshold=5 |
14.0% | -82.3% | 0.60 | 0.17 | 406.5x | 293 | 55% |
| ROC momentum n=53, threshold=0.06 |
13.6% | -62.9% | 0.60 | 0.22 | 346.4x | 549 | 49% |
| Buy & hold | 18.6% | -82.2% | 0.61 | 0.23 | 2479.8x | 1 | 100% |
The rules, strategy by strategy
Donchian channel breakout
A new high means a trend starting; a new low means it’s over (turtle-trading style).
- Buy Buy on a breakout above the highest high of the last 15 days
- Sell Sell when price breaks below the lowest low of the last 49 days
- CAGR
- 21.4%
- Max drawdown
- -71.0%
- Sharpe
- 0.73
- Trades
- 141
- Time in market
- 78%
- Win rate
- 51%
MACD
Looks at the gap (MACD) between a short and long average crossing its own signal line.
- Buy Buy when the MACD line (41/122) crosses above its 16-day signal line
- Sell Sell when the MACD line crosses back below the signal line
- CAGR
- 18.7%
- Max drawdown
- -53.8%
- Sharpe
- 0.74
- Trades
- 294
- Time in market
- 53%
- Win rate
- 51%
Supertrend
Trades the direction of a volatility-based trend line that trails below/above price.
- Buy Buy when price moves above the trend line (flips up) — 26-day volatility, 3.4× band
- Sell Sell when price drops below the trend line (flips down)
- CAGR
- 18.1%
- Max drawdown
- -55.7%
- Sharpe
- 0.72
- Trades
- 280
- Time in market
- 57%
- Win rate
- 51%
Keltner channel breakout
Breaking above the channel top (average plus a multiple of volatility) signals an upside breakout.
- Buy Buy when the close breaks above the 154-day average + 1.3× volatility (Keltner top)
- Sell Sell when the close falls back to the 154-day average
- CAGR
- 17.8%
- Max drawdown
- -81.8%
- Sharpe
- 0.70
- Trades
- 169
- Time in market
- 61%
- Win rate
- 52%
Bollinger band breakout
Breaking above the upper band (average plus a multiple of volatility) signals a strong move up.
- Buy Buy when the close breaks above the upper band of the 135-day average (1.5× volatility)
- Sell Sell when the close falls back to the 135-day middle average
- CAGR
- 17.3%
- Max drawdown
- -70.6%
- Sharpe
- 0.72
- Trades
- 87
- Time in market
- 49%
- Win rate
- 52%
Parabolic SAR
Trades around the Parabolic SAR dots that accelerate toward price.
- Buy Buy when price rises above the SAR dots
- Sell Sell when price falls below the SAR dots
- CAGR
- 17.2%
- Max drawdown
- -63.7%
- Sharpe
- 0.69
- Trades
- 308
- Time in market
- 57%
- Win rate
- 51%
EMA crossover
Uses two exponential averages (more weight on recent prices) and trades their crossover.
- Buy Buy when the 4-day EMA crosses above the 135-day EMA
- Sell Sell when the 4-day EMA falls below the 135-day EMA
- CAGR
- 17.1%
- Max drawdown
- -84.2%
- Sharpe
- 0.67
- Trades
- 209
- Time in market
- 64%
- Win rate
- 51%
SMA crossover
When the short average rises above the long average, it reads that as an uptrend starting.
- Buy Buy when the 12-day average price crosses above the 43-day average
- Sell Sell (to cash) when the 12-day average falls below the 43-day average
- CAGR
- 15.8%
- Max drawdown
- -70.7%
- Sharpe
- 0.63
- Trades
- 288
- Time in market
- 58%
- Win rate
- 51%
ADX / DI directional
Looks at both the direction and the strength of the trend; holds only in a strong uptrend.
- Buy Buy when up-direction (+DI) beats down-direction (−DI) and trend strength (ADX, 97-day) is ≥ 5
- Sell Sell when direction flips or the trend weakens (ADX < 5)
- CAGR
- 14.0%
- Max drawdown
- -82.3%
- Sharpe
- 0.60
- Trades
- 293
- Time in market
- 55%
- Win rate
- 51%
ROC momentum
Rides the trend when recent return (momentum) over a window is above a threshold.
- Buy Buy when the last 53-day return is greater than 6%
- Sell Sell when the 53-day return drops to 6% or below
- CAGR
- 13.6%
- Max drawdown
- -62.9%
- Sharpe
- 0.60
- Trades
- 549
- Time in market
- 49%
- Win rate
- 50%