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=49 |
20.5% | -72.6% | 0.73 | 0.28 | 5141.8x | 113 | 70% |
| MACD fast=17, slow=124, signal=39 |
18.6% | -52.9% | 0.73 | 0.35 | 2441.6x | 297 | 53% |
| Supertrend period=21, mult=3.3 |
18.2% | -56.6% | 0.72 | 0.32 | 2073.4x | 295 | 57% |
| EMA crossover fast=3, slow=137 |
17.9% | -78.2% | 0.69 | 0.23 | 1859.4x | 227 | 64% |
| Bollinger band breakout n=127, k=1.5 |
17.2% | -68.8% | 0.72 | 0.25 | 1454.6x | 93 | 49% |
| Parabolic SAR step=0.005, maxStep=0.04 |
17.2% | -63.7% | 0.68 | 0.27 | 1409.5x | 309 | 57% |
| SMA crossover fast=6, slow=81 |
16.9% | -74.1% | 0.66 | 0.23 | 1289.6x | 255 | 62% |
| Keltner channel breakout emaPeriod=110, atrPeriod=28, mult=3.5 |
16.2% | -60.0% | 0.71 | 0.27 | 979.7x | 113 | 47% |
| ROC momentum n=39, threshold=-0.04 |
16.1% | -83.2% | 0.62 | 0.19 | 930.4x | 561 | 70% |
| ADX / DI directional period=93, threshold=5 |
14.0% | -81.1% | 0.60 | 0.17 | 407.9x | 305 | 55% |
| Buy & hold | 18.8% | -82.2% | 0.62 | 0.23 | 2605.1x | 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 49 days
- CAGR
- 20.5%
- Max drawdown
- -72.6%
- Sharpe
- 0.73
- Trades
- 113
- Time in market
- 70%
- Win rate
- 52%
MACD
Looks at the gap (MACD) between a short and long average crossing its own signal line.
- Buy Buy when the MACD line (17/124) crosses above its 39-day signal line
- Sell Sell when the MACD line crosses back below the signal line
- CAGR
- 18.6%
- Max drawdown
- -52.9%
- Sharpe
- 0.73
- Trades
- 297
- 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) — 21-day volatility, 3.3× band
- Sell Sell when price drops below the trend line (flips down)
- CAGR
- 18.2%
- Max drawdown
- -56.6%
- Sharpe
- 0.72
- Trades
- 295
- 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 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%
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 127-day average (1.5× volatility)
- Sell Sell when the close falls back to the 127-day middle average
- CAGR
- 17.2%
- Max drawdown
- -68.8%
- Sharpe
- 0.72
- Trades
- 93
- 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.68
- Trades
- 309
- Time in market
- 57%
- 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 81-day average
- Sell Sell (to cash) when the 6-day average falls below the 81-day average
- CAGR
- 16.9%
- Max drawdown
- -74.1%
- Sharpe
- 0.66
- Trades
- 255
- Time in market
- 62%
- 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 110-day average + 3.5× volatility (Keltner top)
- Sell Sell when the close falls back to the 110-day average
- CAGR
- 16.2%
- Max drawdown
- -60.0%
- Sharpe
- 0.71
- Trades
- 113
- Time in market
- 47%
- Win rate
- 52%
ROC momentum
Rides the trend when recent return (momentum) over a window is above a threshold.
- Buy Buy when the last 39-day return is greater than -4%
- Sell Sell when the 39-day return drops to -4% or below
- CAGR
- 16.1%
- Max drawdown
- -83.2%
- Sharpe
- 0.62
- Trades
- 561
- Time in market
- 70%
- Win rate
- 50%
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, 93-day) is ≥ 5
- Sell Sell when direction flips or the trend weakens (ADX < 5)
- CAGR
- 14.0%
- Max drawdown
- -81.1%
- Sharpe
- 0.60
- Trades
- 305
- Time in market
- 55%
- Win rate
- 51%