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-09-29, the default settings earned a Sharpe of 1.15 — +213.4% total return with a 50.2% worst drawdown across 1,141 trades in 244 positions, net of fees, slippage, and funding.
2024-08-15 → 2026-09-29 · net of fees, slippage, and funding · price-only Sharpe 1.28 · these are the default settings, not a hand-picked best case.
At $1,000, this strategy’s worst historical dip was about $502. 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 −50.2% — 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=["BNB", "BTC", "DOGE", "ETH", "FARTCOIN", "GRAM", "HYPE", "LINK", "LIT", "NEAR", "PUMP", "SOL", "SUI", "VVV", "WLD", "XPL", "XRP", "ZEC", "kBONK", "kPEPE"], resolved_at="2026-07-06T20:20:32.738649+00:00")Execution(rebalance="on_change")ema_cross = Pipeline([ { "fast": [EWMA(window=10)], "slow": [EWMA(window=30)], }, Crossover(fast_key="fast", slow_key="slow"),], name="ema_cross")Pipeline([ PriceDataLoader(), 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), 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, mode="long_only"), Store("bot_exit_flip")], }, TradeManager(entries="bot_entry", prices="ohlcv_1d"), { "trend_flip": [Load("bot_exit_flip"), AboveThresholdFilter(threshold=1.0, inclusive=True), Exit()], "atr_trail": [TrailingStop(atr=2.5, period=14)], }, Exposure(), 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.
Complete 12-cell public cross-product on explicit resolved universes.
At $1,000, these settings' worst historical dip was about $502. You land in the editor with this exact setup. Free account, your own keys.
Compare all 12 settings
| Settings | Sharpe | Return | Worst DD | Trades |
|---|---|---|---|---|
| EMA 10/30 · Momentum 14 · ATR 2 | 1.18 | 216.1% | −50.5% | 1,181 |
| EMA 10/30 · Momentum 14 · ATR 2.5default | 1.15 | 213.4% | −50.2% | 1,141 |
| EMA 10/30 · Momentum 14 · ATR 3 | 1.19 | 236.0% | −48.8% | 1,054 |
| EMA 10/30 · Momentum 30 · ATR 2 | 0.95 | 131.6% | −50.4% | 883 |
| EMA 10/30 · Momentum 30 · ATR 2.5 | 1.24 | 255.6% | −49.0% | 996 |
| EMA 10/30 · Momentum 30 · ATR 3 | 1.16 | 224.5% | −46.2% | 944 |
| EMA 20/50 · Momentum 14 · ATR 2 | 0.91 | 116.2% | −61.5% | 989 |
| EMA 20/50 · Momentum 14 · ATR 2.5 | 0.87 | 108.4% | −65.2% | 985 |
| EMA 20/50 · Momentum 14 · ATR 3 | 0.96 | 137.6% | −60.8% | 861 |
| EMA 20/50 · Momentum 30 · ATR 2 | 0.63 | 51.0% | −69.0% | 687 |
| EMA 20/50 · Momentum 30 · ATR 2.5 | 0.87 | 105.7% | −65.7% | 745 |
| EMA 20/50 · Momentum 30 · ATR 3 | 0.87 | 108.8% | −64.0% | 714 |
The data
Monthly returns
| Month | Return |
|---|---|
| 2024-08 | 0.0% |
| 2024-09 | +23.1% |
| 2024-10 | +1.1% |
| 2024-11 | +66.5% |
| 2024-12 | -22.7% |
| 2025-01 | -1.8% |
| 2025-02 | -17.4% |
| 2025-03 | -7.1% |
| 2025-04 | +46.0% |
| 2025-05 | +2.7% |
| 2025-06 | -8.0% |
| 2025-07 | +19.9% |
| 2025-08 | -4.9% |
| 2025-09 | +13.3% |
| 2025-10 | -24.8% |
| 2025-11 | -0.7% |
| 2025-12 | -0.3% |
| 2026-01 | -11.5% |
| 2026-02 | +1.9% |
| 2026-03 | -2.6% |
| 2026-04 | +16.3% |
| 2026-05 | +35.1% |
| 2026-06 | -16.6% |
| 2026-07 | -1.0% |
| 2026-08 | +32.3% |
| 2026-09 | +29.9% |
Which assets it traded
| Avg allocation | Days held | % of time held | Asset |
|---|---|---|---|
| 0.1176 | 377 | 48.65 | BNB |
| 0.1113 | 370 | 47.74 | BTC |
| 0.1084 | 358 | 46.19 | ETH |
| 0.1361 | 353 | 45.55 | HYPE |
| 0.1046 | 341 | 44 | LINK |
| 0.1034 | 319 | 41.16 | SOL |
| 0.1053 | 293 | 37.81 | NEAR |
| 0.1042 | 286 | 36.9 | SUI |
| 0.0984 | 283 | 36.52 | DOGE |
| 0.1006 | 252 | 32.52 | XRP |
| 0.1271 | 249 | 32.13 | VVV |
| 0.1151 | 222 | 28.65 | FARTCOIN |
| 0.0913 | 219 | 28.26 | kPEPE |
| 0.081 | 190 | 24.52 | kBONK |
| 0.09 | 186 | 24 | WLD |
| 0.1255 | 175 | 22.58 | ZEC |
| 0.1138 | 132 | 17.03 | PUMP |
| 0.1277 | 128 | 16.52 | LIT |
| 0.1355 | 103 | 13.29 | XPL |
| 0.0502 | 11 | 1.42 | GRAM |
What this is: a historical backtest on real Hyperliquid market data, net of fees, slippage, and funding. Its worst historical drawdown was 50.2% — 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.