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 |
|---|---|---|---|---|---|---|---|
| MACD fast=41, slow=127, signal=38 |
14.1% | -39.0% | 0.65 | 0.36 | 34.3x | 112 | 52% |
| ROC momentum n=17, threshold=-0.15 |
13.5% | -53.0% | 0.54 | 0.25 | 29.5x | 68 | 97% |
| SMA crossover fast=21, slow=82 |
12.6% | -46.3% | 0.58 | 0.27 | 24.0x | 80 | 57% |
| Donchian channel breakout entryN=37, exitN=50 |
12.5% | -46.4% | 0.56 | 0.27 | 23.7x | 66 | 62% |
| Bollinger band breakout n=143, k=1.4 |
11.2% | -39.6% | 0.58 | 0.28 | 17.2x | 50 | 43% |
| EMA crossover fast=46, slow=103 |
10.2% | -45.3% | 0.49 | 0.23 | 13.6x | 56 | 61% |
| Keltner channel breakout emaPeriod=141, atrPeriod=50, mult=3.6 |
9.6% | -41.0% | 0.52 | 0.23 | 11.6x | 50 | 42% |
| Supertrend period=25, mult=4.6 |
9.3% | -52.1% | 0.49 | 0.18 | 10.9x | 102 | 52% |
| Parabolic SAR step=0.005, maxStep=0.02 |
7.1% | -64.3% | 0.40 | 0.11 | 6.3x | 136 | 55% |
| 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 | 35.1x | 1 | 100% |
The rules, strategy by strategy
MACD
Looks at the gap (MACD) between a short and long average crossing its own signal line.
- Buy Buy when the MACD line (41/127) crosses above its 38-day signal line
- Sell Sell when the MACD line crosses back below the signal line
- CAGR
- 14.1%
- Max drawdown
- -39.0%
- Sharpe
- 0.65
- Trades
- 112
- Time in market
- 52%
- Win rate
- 51%
ROC momentum
Rides the trend when recent return (momentum) over a window is above a threshold.
- Buy Buy when the last 17-day return is greater than -15%
- Sell Sell when the 17-day return drops to -15% or below
- CAGR
- 13.5%
- Max drawdown
- -53.0%
- Sharpe
- 0.54
- Trades
- 68
- Time in market
- 97%
- 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 21-day average price crosses above the 82-day average
- Sell Sell (to cash) when the 21-day average falls below the 82-day average
- CAGR
- 12.6%
- Max drawdown
- -46.3%
- Sharpe
- 0.58
- Trades
- 80
- Time in market
- 57%
- Win rate
- 51%
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 37 days
- Sell Sell when price breaks below the lowest low of the last 50 days
- CAGR
- 12.5%
- Max drawdown
- -46.4%
- Sharpe
- 0.56
- Trades
- 66
- Time in market
- 62%
- 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 143-day average (1.4× volatility)
- Sell Sell when the close falls back to the 143-day middle average
- CAGR
- 11.2%
- Max drawdown
- -39.6%
- Sharpe
- 0.58
- Trades
- 50
- Time in market
- 43%
- Win rate
- 52%
EMA crossover
Uses two exponential averages (more weight on recent prices) and trades their crossover.
- Buy Buy when the 46-day EMA crosses above the 103-day EMA
- Sell Sell when the 46-day EMA falls below the 103-day EMA
- CAGR
- 10.2%
- Max drawdown
- -45.3%
- Sharpe
- 0.49
- Trades
- 56
- Time in market
- 61%
- 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 141-day average + 3.6× volatility (Keltner top)
- Sell Sell when the close falls back to the 141-day average
- CAGR
- 9.6%
- Max drawdown
- -41.0%
- Sharpe
- 0.52
- Trades
- 50
- Time in market
- 42%
- 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, 4.6× band
- Sell Sell when price drops below the trend line (flips down)
- CAGR
- 9.3%
- Max drawdown
- -52.1%
- Sharpe
- 0.49
- Trades
- 102
- Time in market
- 52%
- 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
- 7.1%
- Max drawdown
- -64.3%
- Sharpe
- 0.40
- Trades
- 136
- Time in market
- 55%
- 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, 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%