Trend-Following Backtester · Guide · Assets 한국어
Assets
Samsung Electronics backtest
Korea's largest listed company. It cycles over multi-year semiconductor swings, which is a useful stress test for long-horizon trend strategies.
Results by strategy
0 of 10 beat buy and hold (CAGR 14.2%, drawdown -64.8%). Sorted by CAGR.
| Strategy · parameters | CAGR | Max drawdown | Sharpe | Calmar | Total return | Trades | Time in market |
|---|---|---|---|---|---|---|---|
| Donchian channel breakout entryN=24, exitN=68 |
13.2% | -50.9% | 0.56 | 0.26 | 27.2x | 63 | 74% |
| SMA crossover fast=24, slow=89 |
12.2% | -42.5% | 0.57 | 0.29 | 21.3x | 75 | 58% |
| EMA crossover fast=33, slow=36 |
11.8% | -45.6% | 0.55 | 0.26 | 19.3x | 104 | 57% |
| MACD fast=28, slow=85, signal=48 |
11.3% | -37.6% | 0.55 | 0.30 | 17.2x | 142 | 52% |
| Supertrend period=32, mult=4.5 |
10.5% | -53.3% | 0.53 | 0.20 | 14.2x | 104 | 54% |
| Parabolic SAR step=0.005, maxStep=0.02 |
8.2% | -64.3% | 0.44 | 0.13 | 8.2x | 134 | 55% |
| Bollinger band breakout n=45, k=1.4 |
7.3% | -44.4% | 0.42 | 0.16 | 6.5x | 164 | 42% |
| ROC momentum n=49, threshold=-0.08 |
7.2% | -66.9% | 0.38 | 0.11 | 6.3x | 290 | 81% |
| Keltner channel breakout emaPeriod=57, atrPeriod=10, mult=3.6 |
6.0% | -40.1% | 0.39 | 0.15 | 4.7x | 80 | 30% |
| ADX / DI directional period=34, threshold=23 |
5.9% | -40.2% | 0.47 | 0.15 | 4.6x | 20 | 9% |
| Buy & hold | 14.2% | -64.8% | 0.55 | 0.22 | 33.9x | 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 24 days
- Sell Sell when price breaks below the lowest low of the last 68 days
- CAGR
- 13.2%
- Max drawdown
- -50.9%
- Sharpe
- 0.56
- Trades
- 63
- Time in market
- 74%
- 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 24-day average price crosses above the 89-day average
- Sell Sell (to cash) when the 24-day average falls below the 89-day average
- CAGR
- 12.2%
- Max drawdown
- -42.5%
- Sharpe
- 0.57
- Trades
- 75
- Time in market
- 58%
- Win rate
- 52%
EMA crossover
Uses two exponential averages (more weight on recent prices) and trades their crossover.
- Buy Buy when the 33-day EMA crosses above the 36-day EMA
- Sell Sell when the 33-day EMA falls below the 36-day EMA
- CAGR
- 11.8%
- Max drawdown
- -45.6%
- Sharpe
- 0.55
- Trades
- 104
- 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 (28/85) crosses above its 48-day signal line
- Sell Sell when the MACD line crosses back below the signal line
- CAGR
- 11.3%
- Max drawdown
- -37.6%
- Sharpe
- 0.55
- Trades
- 142
- Time in market
- 52%
- 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) — 32-day volatility, 4.5× band
- Sell Sell when price drops below the trend line (flips down)
- CAGR
- 10.5%
- Max drawdown
- -53.3%
- Sharpe
- 0.53
- Trades
- 104
- Time in market
- 54%
- 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
- 8.2%
- Max drawdown
- -64.3%
- Sharpe
- 0.44
- Trades
- 134
- Time in market
- 55%
- Win rate
- 50%
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 45-day average (1.4× volatility)
- Sell Sell when the close falls back to the 45-day middle average
- CAGR
- 7.3%
- Max drawdown
- -44.4%
- Sharpe
- 0.42
- Trades
- 164
- Time in market
- 42%
- Win rate
- 50%
ROC momentum
Rides the trend when recent return (momentum) over a window is above a threshold.
- Buy Buy when the last 49-day return is greater than -8%
- Sell Sell when the 49-day return drops to -8% or below
- CAGR
- 7.2%
- Max drawdown
- -66.9%
- Sharpe
- 0.38
- Trades
- 290
- Time in market
- 81%
- Win rate
- 49%
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 57-day average + 3.6× volatility (Keltner top)
- Sell Sell when the close falls back to the 57-day average
- CAGR
- 6.0%
- Max drawdown
- -40.1%
- Sharpe
- 0.39
- Trades
- 80
- Time in market
- 30%
- 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, 34-day) is ≥ 23
- Sell Sell when direction flips or the trend weakens (ADX < 23)
- CAGR
- 5.9%
- Max drawdown
- -40.2%
- Sharpe
- 0.47
- Trades
- 20
- Time in market
- 9%
- Win rate
- 51%