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 15.2%, drawdown -64.8%). Sorted by CAGR.
| Strategy · parameters | CAGR | Max drawdown | Sharpe | Calmar | Total return | Trades | Time in market |
|---|---|---|---|---|---|---|---|
| SMA crossover fast=21, slow=45 |
14.1% | -40.1% | 0.63 | 0.35 | 34.0x | 144 | 56% |
| MACD fast=43, slow=127, signal=36 |
13.9% | -39.0% | 0.64 | 0.36 | 32.2x | 114 | 52% |
| Donchian channel breakout entryN=29, exitN=58 |
12.7% | -55.1% | 0.56 | 0.23 | 24.5x | 70 | 68% |
| EMA crossover fast=56, slow=83 |
12.2% | -44.9% | 0.56 | 0.27 | 21.5x | 55 | 61% |
| Bollinger band breakout n=203, k=1.5 |
11.5% | -44.1% | 0.58 | 0.26 | 18.3x | 33 | 45% |
| Supertrend period=21, mult=5 |
9.1% | -59.2% | 0.48 | 0.15 | 10.2x | 88 | 50% |
| Keltner channel breakout emaPeriod=136, atrPeriod=47, mult=4 |
9.1% | -39.6% | 0.51 | 0.23 | 10.2x | 48 | 40% |
| Parabolic SAR step=0.005, maxStep=0.02 |
8.2% | -64.3% | 0.43 | 0.13 | 8.2x | 134 | 55% |
| ROC momentum n=105, threshold=0.09 |
6.0% | -50.1% | 0.37 | 0.12 | 4.7x | 259 | 41% |
| ADX / DI directional period=34, threshold=20 |
5.5% | -43.6% | 0.43 | 0.13 | 4.2x | 36 | 12% |
| Buy & hold | 15.2% | -64.8% | 0.57 | 0.23 | 43.9x | 1 | 100% |
The rules, strategy by strategy
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 45-day average
- Sell Sell (to cash) when the 21-day average falls below the 45-day average
- CAGR
- 14.1%
- Max drawdown
- -40.1%
- Sharpe
- 0.63
- Trades
- 144
- Time in market
- 56%
- 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 (43/127) crosses above its 36-day signal line
- Sell Sell when the MACD line crosses back below the signal line
- CAGR
- 13.9%
- Max drawdown
- -39.0%
- Sharpe
- 0.64
- Trades
- 114
- Time in market
- 52%
- 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 29 days
- Sell Sell when price breaks below the lowest low of the last 58 days
- CAGR
- 12.7%
- Max drawdown
- -55.1%
- Sharpe
- 0.56
- Trades
- 70
- Time in market
- 68%
- Win rate
- 51%
EMA crossover
Uses two exponential averages (more weight on recent prices) and trades their crossover.
- Buy Buy when the 56-day EMA crosses above the 83-day EMA
- Sell Sell when the 56-day EMA falls below the 83-day EMA
- CAGR
- 12.2%
- Max drawdown
- -44.9%
- Sharpe
- 0.56
- Trades
- 55
- Time in market
- 61%
- 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 203-day average (1.5× volatility)
- Sell Sell when the close falls back to the 203-day middle average
- CAGR
- 11.5%
- Max drawdown
- -44.1%
- Sharpe
- 0.58
- Trades
- 33
- Time in market
- 45%
- 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) — 21-day volatility, 5× band
- Sell Sell when price drops below the trend line (flips down)
- CAGR
- 9.1%
- Max drawdown
- -59.2%
- Sharpe
- 0.48
- Trades
- 88
- Time in market
- 50%
- 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 136-day average + 4× volatility (Keltner top)
- Sell Sell when the close falls back to the 136-day average
- CAGR
- 9.1%
- Max drawdown
- -39.6%
- Sharpe
- 0.51
- Trades
- 48
- Time in market
- 40%
- 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
- 8.2%
- Max drawdown
- -64.3%
- Sharpe
- 0.43
- Trades
- 134
- Time in market
- 55%
- Win rate
- 50%
ROC momentum
Rides the trend when recent return (momentum) over a window is above a threshold.
- Buy Buy when the last 105-day return is greater than 9%
- Sell Sell when the 105-day return drops to 9% or below
- CAGR
- 6.0%
- Max drawdown
- -50.1%
- Sharpe
- 0.37
- Trades
- 259
- Time in market
- 41%
- 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, 34-day) is ≥ 20
- Sell Sell when direction flips or the trend weakens (ADX < 20)
- CAGR
- 5.5%
- Max drawdown
- -43.6%
- Sharpe
- 0.43
- Trades
- 36
- Time in market
- 12%
- Win rate
- 51%