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
1 of 10 beat buy and hold (CAGR 15.1%, drawdown -64.8%). Sorted by CAGR.
| Strategy · parameters | CAGR | Max drawdown | Sharpe | Calmar | Total return | Trades | Time in market |
|---|---|---|---|---|---|---|---|
| SMA crossover fast=18, slow=43 |
15.1% | -38.6% | 0.66 | 0.39 | 43.2x | 159 | 56% |
| MACD fast=40, slow=156, signal=38 |
13.8% | -33.3% | 0.64 | 0.41 | 31.3x | 104 | 52% |
| Donchian channel breakout entryN=34, exitN=49 |
12.5% | -46.4% | 0.56 | 0.27 | 23.2x | 70 | 63% |
| Bollinger band breakout n=197, k=1.4 |
11.8% | -42.9% | 0.58 | 0.28 | 19.7x | 37 | 46% |
| EMA crossover fast=27, slow=44 |
10.9% | -47.8% | 0.52 | 0.23 | 15.8x | 106 | 57% |
| Supertrend period=40, mult=4.7 |
10.5% | -57.3% | 0.52 | 0.18 | 14.3x | 96 | 52% |
| Keltner channel breakout emaPeriod=151, atrPeriod=47, mult=3.7 |
9.5% | -42.5% | 0.52 | 0.22 | 11.2x | 50 | 42% |
| Parabolic SAR step=0.005, maxStep=0.02 |
8.0% | -64.3% | 0.43 | 0.13 | 7.9x | 135 | 55% |
| ROC momentum n=79, threshold=0.07 |
5.4% | -62.3% | 0.34 | 0.09 | 4.1x | 320 | 43% |
| ADX / DI directional period=44, threshold=25 |
5.0% | -26.0% | 0.44 | 0.19 | 3.7x | 10 | 6% |
| Buy & hold | 15.1% | -64.8% | 0.57 | 0.23 | 42.5x | 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 18-day average price crosses above the 43-day average
- Sell Sell (to cash) when the 18-day average falls below the 43-day average
- CAGR
- 15.1%
- Max drawdown
- -38.6%
- Sharpe
- 0.66
- Trades
- 159
- 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 (40/156) crosses above its 38-day signal line
- Sell Sell when the MACD line crosses back below the signal line
- CAGR
- 13.8%
- Max drawdown
- -33.3%
- Sharpe
- 0.64
- Trades
- 104
- 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 34 days
- Sell Sell when price breaks below the lowest low of the last 49 days
- CAGR
- 12.5%
- Max drawdown
- -46.4%
- Sharpe
- 0.56
- Trades
- 70
- Time in market
- 63%
- 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 197-day average (1.4× volatility)
- Sell Sell when the close falls back to the 197-day middle average
- CAGR
- 11.8%
- Max drawdown
- -42.9%
- Sharpe
- 0.58
- Trades
- 37
- Time in market
- 46%
- Win rate
- 52%
EMA crossover
Uses two exponential averages (more weight on recent prices) and trades their crossover.
- Buy Buy when the 27-day EMA crosses above the 44-day EMA
- Sell Sell when the 27-day EMA falls below the 44-day EMA
- CAGR
- 10.9%
- Max drawdown
- -47.8%
- Sharpe
- 0.52
- Trades
- 106
- Time in market
- 57%
- 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) — 40-day volatility, 4.7× band
- Sell Sell when price drops below the trend line (flips down)
- CAGR
- 10.5%
- Max drawdown
- -57.3%
- Sharpe
- 0.52
- Trades
- 96
- Time in market
- 52%
- 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 151-day average + 3.7× volatility (Keltner top)
- Sell Sell when the close falls back to the 151-day average
- CAGR
- 9.5%
- Max drawdown
- -42.5%
- Sharpe
- 0.52
- Trades
- 50
- Time in market
- 42%
- 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.0%
- Max drawdown
- -64.3%
- Sharpe
- 0.43
- Trades
- 135
- 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 79-day return is greater than 7%
- Sell Sell when the 79-day return drops to 7% or below
- CAGR
- 5.4%
- Max drawdown
- -62.3%
- Sharpe
- 0.34
- Trades
- 320
- Time in market
- 43%
- 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, 44-day) is ≥ 25
- Sell Sell when direction flips or the trend weakens (ADX < 25)
- CAGR
- 5.0%
- Max drawdown
- -26.0%
- Sharpe
- 0.44
- Trades
- 10
- Time in market
- 6%
- Win rate
- 52%