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
1 of 10 beat buy and hold (CAGR 18.8%, drawdown -82.2%). Sorted by CAGR.
| Strategy · parameters | CAGR | Max drawdown | Sharpe | Calmar | Total return | Trades | Time in market |
|---|---|---|---|---|---|---|---|
| Donchian channel breakout entryN=30, exitN=47 |
20.7% | -70.9% | 0.73 | 0.29 | 5568.4x | 117 | 70% |
| Supertrend period=19, mult=3.3 |
18.2% | -56.0% | 0.72 | 0.32 | 2124.8x | 293 | 57% |
| MACD fast=15, slow=93, signal=49 |
18.2% | -53.3% | 0.72 | 0.34 | 2100.6x | 301 | 53% |
| Keltner channel breakout emaPeriod=195, atrPeriod=8, mult=1 |
18.0% | -77.1% | 0.70 | 0.23 | 2007.3x | 165 | 62% |
| EMA crossover fast=3, slow=137 |
17.9% | -78.2% | 0.69 | 0.23 | 1921.8x | 227 | 64% |
| SMA crossover fast=6, slow=82 |
17.5% | -70.1% | 0.68 | 0.25 | 1638.9x | 257 | 62% |
| Parabolic SAR step=0.005, maxStep=0.04 |
17.2% | -63.7% | 0.69 | 0.27 | 1456.8x | 309 | 57% |
| Bollinger band breakout n=130, k=1.5 |
17.0% | -70.5% | 0.71 | 0.24 | 1339.7x | 93 | 49% |
| ROC momentum n=52, threshold=0.02 |
14.3% | -76.0% | 0.60 | 0.19 | 467.0x | 613 | 57% |
| ADX / DI directional period=88, threshold=7 |
13.7% | -77.8% | 0.60 | 0.18 | 356.2x | 265 | 51% |
| Buy & hold | 18.8% | -82.2% | 0.62 | 0.23 | 2692.5x | 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 30 days
- Sell Sell when price breaks below the lowest low of the last 47 days
- CAGR
- 20.7%
- Max drawdown
- -70.9%
- Sharpe
- 0.73
- Trades
- 117
- Time in market
- 70%
- Win rate
- 52%
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) — 19-day volatility, 3.3× band
- Sell Sell when price drops below the trend line (flips down)
- CAGR
- 18.2%
- Max drawdown
- -56.0%
- Sharpe
- 0.72
- Trades
- 293
- Time in market
- 57%
- 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 (15/93) crosses above its 49-day signal line
- Sell Sell when the MACD line crosses back below the signal line
- CAGR
- 18.2%
- Max drawdown
- -53.3%
- Sharpe
- 0.72
- Trades
- 301
- Time in market
- 53%
- 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 195-day average + 1× volatility (Keltner top)
- Sell Sell when the close falls back to the 195-day average
- CAGR
- 18.0%
- Max drawdown
- -77.1%
- Sharpe
- 0.70
- Trades
- 165
- Time in market
- 62%
- Win rate
- 52%
EMA crossover
Uses two exponential averages (more weight on recent prices) and trades their crossover.
- Buy Buy when the 3-day EMA crosses above the 137-day EMA
- Sell Sell when the 3-day EMA falls below the 137-day EMA
- CAGR
- 17.9%
- Max drawdown
- -78.2%
- Sharpe
- 0.69
- Trades
- 227
- 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 6-day average price crosses above the 82-day average
- Sell Sell (to cash) when the 6-day average falls below the 82-day average
- CAGR
- 17.5%
- Max drawdown
- -70.1%
- Sharpe
- 0.68
- Trades
- 257
- Time in market
- 62%
- Win rate
- 51%
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
- 309
- Time in market
- 57%
- Win rate
- 51%
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 130-day average (1.5× volatility)
- Sell Sell when the close falls back to the 130-day middle average
- CAGR
- 17.0%
- Max drawdown
- -70.5%
- Sharpe
- 0.71
- Trades
- 93
- Time in market
- 49%
- Win rate
- 52%
ROC momentum
Rides the trend when recent return (momentum) over a window is above a threshold.
- Buy Buy when the last 52-day return is greater than 2%
- Sell Sell when the 52-day return drops to 2% or below
- CAGR
- 14.3%
- Max drawdown
- -76.0%
- Sharpe
- 0.60
- Trades
- 613
- Time in market
- 57%
- Win rate
- 49%
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, 88-day) is ≥ 7
- Sell Sell when direction flips or the trend weakens (ADX < 7)
- CAGR
- 13.7%
- Max drawdown
- -77.8%
- Sharpe
- 0.60
- Trades
- 265
- Time in market
- 51%
- Win rate
- 51%