trend-followingmedium-high risk

AI Trading Bot Strategy (Trend Wrapper)

Does an AI trading bot actually work on crypto? Backtested on real Hyperliquid perps from 2024-08-15 to 2026-07-05, the default settings earned a Sharpe of 1.09 — +148.2% total return with a 48.4% worst drawdown across 1,937 trades, net of fees, slippage, and funding.

By Keel Research · Data as of 2026-07-05 · how this backtest was produced
EquityDrawdown
Sharpe
1.09
default settings
Total return
+148.2%
Worst drawdown
−48.4%
Trades
1,937

2024-08-152026-07-05 · net of fees, slippage, and funding · price-only Sharpe 1.21 · these are the default settings, not a hand-picked best case.

At $1,000, this strategy’s worst historical dip was about $484. Free account, your own Hyperliquid keys — Keel only trades.

How it works

How it works

This is the classic risk-managed trend bot, applied to the top-20 Hyperliquid perps. A coin qualifies as a long when its 10-day moving average is above its 30-day average, a two-week momentum reading agrees, and funding cost isn't extreme; otherwise its capital sits in cash. Qualifying coins are held equal-weight, and a position closes either when the trend flips or when price pulls back 2.5 ATRs from its high — a volatility-scaled trailing exit. The moving-average and momentum confirmations suppress false starts, while the trailing stop protects gains during big runs.

When it works best

Sustained directional moves across liquid majors — crypto's long, fat-tailed trends are exactly what this captures. When several majors trend together, the equal-weight book compounds hard and the trailing stop rides winners a long way.

When it struggles

Trend turns are the pain point: the exit lags by the cross-back, so every major reversal costs some give-back, and choppy ranges generate whipsaw entries that the confirmations reduce but don't eliminate. As a long-only book with no volatility target, it carries the full weight of crypto sell-offs — the maximum drawdown over the window was −48.4% — and it pays funding while crowded on the popular long side. This is a high-risk trend follower, honest about the drawdowns that come with it.

How it’s built

The exact strategy behind this backtest — no black box. Switch to code to see or copy the full definition.

Configuration

Globalsconfig
target_timeframe1dbar_offset12h
UniverseassetsTop by Volume · HL Perps · 20 assets
Executiontrading
rebalanceEvery Bar

Factories

ema_crossfactory
Pipeline9 steps
PriceDataLoaderData Loader
timeframe15min
TargetTimeframeResamplerData Transform
ohlcv_1dstore
Parallel2 branches
entries
Parallel2 branches
const
ConstantForecastForecast Mapper
value1
gates
Parallel3 branches
trend_up
ema_crosscall
AboveThresholdFilterSignal Transform
threshold0
momentum_agrees
ROCIndicator
period14
AboveThresholdFilterSignal Transform
threshold0
funding_ok
FundingDataLoaderData Loader
use_cachetrue
SignalResamplerSignal Transform
target_timeframe1dmethodmean
BelowThresholdFilterSignal Transform
threshold0.0000625inclusivetrue
MaskAndSignal Composer
ApplyMaskSignal Composer
score_signalconstfilter_signalgates
bot_entrystore
exit_flip
ema_crosscall
NegateTransformSignal Transform
ThresholdCrossSignal Transform
upper0lower-3
ClipSignal Transform
lower0upper1
bot_exit_flipstore
Parallel2 branches
flip
bot_exit_flipload
trail
bot_entryload
TrailingStopExitSignal Transform
entry_slotbot_entryohlcv_slotohlcv_1datr_multiplier2.5atr_period14
MaskOrSignal Composer
bot_exitstore
PositionStateMachinePosition Manager
entry_slotbot_entryexit_slotbot_exit
EqualWeightSizerPosition Sizer
target_leverage1max_weight0.2

Explore the settings

precomputed · updates instantly

Adjust a setting to see the exact backtested result — including the ones that lost money.

Momentum confirmation (bars)
Universe size (top by volume)
trail
Sharpe
1.09
Return
148.2%
Worst DD
−48.4%
Trades
1,937

At $1,000, these settings' worst historical dip was about $484. You land in the editor with this exact setup. Free account, your own keys.

Compare all 5 settings
SettingsSharpeReturnWorst DDTrades
Momentum 14 · Universe 20 · trail 2.5default1.09148.2%−48.4%1,937
Momentum 14 · Universe 20 · trail 20.93101.3%−47.3%1,819
Momentum 14 · Universe 20 · trail 30.96114.3%−47.8%2,043
Momentum 30 · Universe 20 · trail 2.51.08144.4%−47.7%1,765
Momentum 14 · Universe 10 · trail 2.50.6949.7%−46.4%951

The data

Monthly returns

MonthReturn
2024-080.0%
2024-09+22.9%
2024-10+1.2%
2024-11+73.6%
2024-12-21.4%
2025-01-4.6%
2025-02-15.3%
2025-03-6.9%
2025-04+51.6%
2025-05+1.1%
2025-06-6.3%
2025-07+19.9%
2025-08-5.3%
2025-09+15.8%
2025-10-25.3%
2025-11-0.3%
2025-12+0.3%
2026-01-11.0%
2026-02+4.6%
2026-03-4.3%
2026-04+15.0%
2026-05+43.3%
2026-06-9.3%
2026-07+3.6%

Which assets it traded

Avg allocationDays held% of time heldAsset
0.122131044.99BNB
0.116430844.7BTC
0.146529743.11HYPE
0.110327640.06ETH
0.106425136.43LINK
0.106225036.28SOL
0.103424936.14DOGE
0.109524235.12NEAR
0.105124235.12SUI
0.109120930.33XRP
0.14120129.17VVV
0.120217925.98FARTCOIN
0.085517325.11kBONK
0.089317024.67kPEPE
0.097513519.59WLD
0.1489714.08ZEC
0.15966910.01XPL
0.119669.58PUMP
0.1744557.98LIT
000GRAM

What this is: a historical backtest on real Hyperliquid market data, net of fees, slippage, and funding. Its worst historical drawdown was 48.4% — expect drawdowns of that order or worse. Past performance does not predict future results, and this is not investment advice. Size your account so a full drawdown is survivable.

Questions

Common questions

Does an AI trading bot actually work on crypto?

Over 2024-08-15 → 2026-07-05 on real Hyperliquid perps, the default settings earned a Sharpe of 1.09 with +148.2% total return and a 48.4% worst drawdown across 1,937 trades — net of fees, slippage, and funding. It is a high-drawdown strategy, so size it accordingly.

Best trend-following bot rules for Hyperliquid perps

You can adjust Fast / slow EMA (days), Momentum confirmation (bars), Universe size (top by volume). The config explorer on this page lets you compare every setting we tested — including the ones that underperformed — with the exact backtested result for each.

Related strategies