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=32, exitN=50 |
20.4% | -72.6% | 0.72 | 0.28 | 4733.4x | 111 | 70% |
| Supertrend period=25, mult=3.4 |
18.2% | -55.9% | 0.72 | 0.33 | 2064.2x | 279 | 57% |
| EMA crossover fast=5, slow=149 |
17.9% | -85.8% | 0.69 | 0.21 | 1819.2x | 183 | 64% |
| Parabolic SAR step=0.005, maxStep=0.04 |
17.5% | -63.7% | 0.69 | 0.27 | 1539.7x | 307 | 57% |
| MACD fast=35, slow=67, signal=24 |
16.8% | -61.5% | 0.68 | 0.27 | 1185.6x | 307 | 53% |
| Bollinger band breakout n=38, k=1.5 |
16.4% | -64.8% | 0.72 | 0.25 | 1038.3x | 301 | 45% |
| ROC momentum n=53, threshold=-0.03 |
16.2% | -83.2% | 0.63 | 0.19 | 942.2x | 525 | 68% |
| SMA crossover fast=11, slow=34 |
15.6% | -55.9% | 0.63 | 0.28 | 731.8x | 355 | 58% |
| Keltner channel breakout emaPeriod=42, atrPeriod=19, mult=3.2 |
12.0% | -55.9% | 0.63 | 0.22 | 179.7x | 171 | 34% |
| ADX / DI directional period=46, threshold=14 |
11.1% | -46.9% | 0.59 | 0.24 | 122.2x | 181 | 30% |
| Buy & hold | 18.8% | -82.2% | 0.62 | 0.23 | 2582.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 32 days
- Sell Sell when price breaks below the lowest low of the last 50 days
- CAGR
- 20.4%
- Max drawdown
- -72.6%
- Sharpe
- 0.72
- Trades
- 111
- 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) — 25-day volatility, 3.4× band
- Sell Sell when price drops below the trend line (flips down)
- CAGR
- 18.2%
- Max drawdown
- -55.9%
- Sharpe
- 0.72
- Trades
- 279
- 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 5-day EMA crosses above the 149-day EMA
- Sell Sell when the 5-day EMA falls below the 149-day EMA
- CAGR
- 17.9%
- Max drawdown
- -85.8%
- Sharpe
- 0.69
- Trades
- 183
- Time in market
- 64%
- 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.5%
- Max drawdown
- -63.7%
- Sharpe
- 0.69
- Trades
- 307
- 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 (35/67) crosses above its 24-day signal line
- Sell Sell when the MACD line crosses back below the signal line
- CAGR
- 16.8%
- Max drawdown
- -61.5%
- Sharpe
- 0.68
- Trades
- 307
- Time in market
- 53%
- 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 38-day average (1.5× volatility)
- Sell Sell when the close falls back to the 38-day middle average
- CAGR
- 16.4%
- Max drawdown
- -64.8%
- Sharpe
- 0.72
- Trades
- 301
- Time in market
- 45%
- 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 -3%
- Sell Sell when the 53-day return drops to -3% or below
- CAGR
- 16.2%
- Max drawdown
- -83.2%
- Sharpe
- 0.63
- Trades
- 525
- Time in market
- 68%
- Win rate
- 50%
SMA crossover
When the short average rises above the long average, it reads that as an uptrend starting.
- Buy Buy when the 11-day average price crosses above the 34-day average
- Sell Sell (to cash) when the 11-day average falls below the 34-day average
- CAGR
- 15.6%
- Max drawdown
- -55.9%
- Sharpe
- 0.63
- Trades
- 355
- Time in market
- 58%
- 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 42-day average + 3.2× volatility (Keltner top)
- Sell Sell when the close falls back to the 42-day average
- CAGR
- 12.0%
- Max drawdown
- -55.9%
- Sharpe
- 0.63
- Trades
- 171
- Time in market
- 34%
- Win rate
- 52%
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, 46-day) is ≥ 14
- Sell Sell when direction flips or the trend weakens (ADX < 14)
- CAGR
- 11.1%
- Max drawdown
- -46.9%
- Sharpe
- 0.59
- Trades
- 181
- Time in market
- 30%
- Win rate
- 52%