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.
2024-08-15 → 2026-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
Factories
Globals(target_timeframe="1d", bar_offset="12h")Universe(mode="top_volume", top_n=20, market="perp", resolved=[], resolved_at="")Execution(rebalance="every_bar")ema_cross = Pipeline([ { "fast": [EWMA(window=10)], "slow": [EWMA(window=30)], }, Crossover(fast_key="fast", slow_key="slow"),], name="ema_cross")Pipeline([ PriceDataLoader(timeframe="15min"), TargetTimeframeResampler(), Store("ohlcv_1d"), { "entries": [ Pipeline([ { "const": [ConstantForecast(value=1.0)], "gates": [ Pipeline([ { "trend_up": [ema_cross, AboveThresholdFilter(threshold=0.0)], "momentum_agrees": [ROC(period=14), AboveThresholdFilter(threshold=0.0)], "funding_ok": [FundingDataLoader(use_cache=True), SignalResampler(target_timeframe="1d", method="mean"), BelowThresholdFilter(threshold=0.0000625, inclusive=True)], }, MaskAnd(), ], name="gates"), ], }, ApplyMask(score_signal="const", filter_signal="gates"), Store("bot_entry"), ], name="entries"), ], "exit_flip": [ema_cross, NegateTransform(), ThresholdCross(upper=0.0, lower=-3.0), Clip(lower=0.0, upper=1.0), Store("bot_exit_flip")], }, { "flip": [Load("bot_exit_flip")], "trail": [Load("bot_entry"), TrailingStopExit(entry_slot="bot_entry", ohlcv_slot="ohlcv_1d", atr_multiplier=2.5, atr_period=14)], }, MaskOr(), Store("bot_exit"), PositionStateMachine(entry_slot="bot_entry", exit_slot="bot_exit"), EqualWeightSizer(target_leverage=1.0, max_weight=0.2),], name="ai_trend_bot_crypto")Explore the settings
precomputed · updates instantlyAdjust a setting to see the exact backtested result — including the ones that lost money.
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
| Settings | Sharpe | Return | Worst DD | Trades |
|---|---|---|---|---|
| Momentum 14 · Universe 20 · trail 2.5default | 1.09 | 148.2% | −48.4% | 1,937 |
| Momentum 14 · Universe 20 · trail 2 | 0.93 | 101.3% | −47.3% | 1,819 |
| Momentum 14 · Universe 20 · trail 3 | 0.96 | 114.3% | −47.8% | 2,043 |
| Momentum 30 · Universe 20 · trail 2.5 | 1.08 | 144.4% | −47.7% | 1,765 |
| Momentum 14 · Universe 10 · trail 2.5 | 0.69 | 49.7% | −46.4% | 951 |
The data
Monthly returns
| Month | Return |
|---|---|
| 2024-08 | 0.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 allocation | Days held | % of time held | Asset |
|---|---|---|---|
| 0.1221 | 310 | 44.99 | BNB |
| 0.1164 | 308 | 44.7 | BTC |
| 0.1465 | 297 | 43.11 | HYPE |
| 0.1103 | 276 | 40.06 | ETH |
| 0.1064 | 251 | 36.43 | LINK |
| 0.1062 | 250 | 36.28 | SOL |
| 0.1034 | 249 | 36.14 | DOGE |
| 0.1095 | 242 | 35.12 | NEAR |
| 0.1051 | 242 | 35.12 | SUI |
| 0.1091 | 209 | 30.33 | XRP |
| 0.141 | 201 | 29.17 | VVV |
| 0.1202 | 179 | 25.98 | FARTCOIN |
| 0.0855 | 173 | 25.11 | kBONK |
| 0.0893 | 170 | 24.67 | kPEPE |
| 0.0975 | 135 | 19.59 | WLD |
| 0.148 | 97 | 14.08 | ZEC |
| 0.1596 | 69 | 10.01 | XPL |
| 0.119 | 66 | 9.58 | PUMP |
| 0.1744 | 55 | 7.98 | LIT |
| 0 | 0 | 0 | GRAM |
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.