Trend-Following Backtester · Guide · backtest 한국어

equity · BR

Ultrapar Participacoes S.A. backtest

10 trend-following strategies were compared on the full daily history of Ultrapar Participacoes S.A.. 7 beat buy-and-hold CAGR; Keltner 채널 돌파 ranks first by Sharpe, matching the main backtester. The return/drawdown alternative is Keltner 채널 돌파 (CAGR 6.0%, MDD -20.8%).

Data 2002-12-11 ~ 2026-07-31daily bars 5,905 (23.6 years)Costs 0.5%Venue BMFBOVESPAMonthly snapshot 2026-07-31

Results by strategy

7 of 10 beat buy and hold (CAGR -38.6%, drawdown -100.0%).

Sharpe leader (same as main): Keltner 채널 돌파 — CAGR 6.0%, MDD -20.8%, Sharpe 0.57, 19% exposure.

CAGR reference leader: ROC 모멘텀 — CAGR 7.1%, MDD -62.7%, exposure 37%.

Return/drawdown alternative: Keltner 채널 돌파 — CAGR is 44.6%p higher than buy and hold, while drawdown improves by 79.2%p (CAGR 6.0%, MDD -20.8%, exposure 19%).

The alternative must retain 75% of buy-and-hold CAGR, improve drawdown by at least 20% and 5 percentage points, and stay below 95% exposure; the ranking weights return retention 60% and drawdown improvement 40%.

Strategy · parametersCAGRMDDSharpeCalmarTotalTradesExposure
Keltner 채널 돌파
emaPeriod=25, atrPeriod=22, mult=3.4
6.0%-20.8%0.570.293.9x2719%
볼린저 밴드 돌파
n=71, k=3.3
5.5%-32.9%0.470.173.6x1615%
SMA 크로스오버
fast=34, slow=43
6.6%-57.2%0.410.114.5x10542%
EMA 크로스오버
fast=17, slow=32
5.5%-73.0%0.370.083.6x9951%
MACD
fast=22, slow=32, signal=17
6.1%-43.0%0.370.144.1x16752%
Donchian 채널 돌파
entryN=7, exitN=41
-38.2%-100.0%0.34-0.380.0x7786%
ROC 모멘텀
n=157, threshold=0.08
7.1%-62.7%0.330.115.0x11137%
Supertrend
period=25, mult=3.7
-41.3%-100.0%0.20-0.410.0x7155%
ADX / DI 방향성
period=30, threshold=22
-42.6%-100.0%0.11-0.430.0x3129%
Parabolic SAR
step=0.005, maxStep=0.34
-43.4%-100.0%0.08-0.430.0x11546%
Buy and hold-38.6%-100.0%0.34-0.390.0x1100%
0.000001 0.00001 0.0001 0.001 0.01 0.1 1x 2003 2006 2009 2012 2015 2018 2021 2024 ROC 모멘텀Keltner 채널 돌파Buy and hold
Keltner 채널 돌파 (Sharpe leader), ROC 모멘텀 (CAGR reference), Buy and hold.
0% -25% -50% -75% -100% 2003 2006 2009 2012 2015 2018 2021 2024 Buy and holdROC 모멘텀Keltner 채널 돌파
Keltner 채널 돌파 maximum drawdown -20.8% (2020-01-23 → 2021-08-06), recovered after 1,391 days.

Rules of the top strategy

Breaking above the channel top (average plus a multiple of volatility) signals an upside breakout.

Method and caveats

Past performance does not guarantee future returns. Parameters were selected on the same full-history sample using sharpe over 40 trials per strategy, so results contain in-sample bias. 0.5% trading costs are included; taxes, slippage and rejected orders are not.
Re-run the same setupAll asset reports

Read next