Which lookback works best for a momentum strategy on crypto: 10, 20, 50 or 90 bars?
Of the 4 values of the lookback compared, 50 returned the most for the Momentum (trend following) rule: +67.9%, against -58.7% at 20, on a 10-coin basket from August 2024 through November 2026, after fees and funding. 2 of the 4 values made money.
Data through December 1, 2026 on Hyperliquid perpetuals, net of fees, slippage and funding
Full test: Momentum (trend following)
Which settings mattered most?
The test ran Momentum (trend following) at every combination of Lookback (bars) and Entry band (%) on the basket. Each square is one combination: choose one to see its numbers.
Each square shows a Sharpe ratio. Colour follows the number: red below zero, green above it. The outlined square is the default setting.
| Lookback (bars)across: Entry band (%) | 0 | 2 | 5 | 10 |
|---|---|---|---|---|
| 10 | ||||
| 20 | ||||
| 50 | ||||
| 90 |
Lookback (bars) 20, Entry band (%) 0 (the default setting)
- Sharpe
- -0.80
- Return
- -58.7%
- Worst drawdown
- 64.6%
- Win rate
- 28.4%
- Round trips
- 4,331
- Fees
- 23.2%
- Funding paid
- 4.3%
What are the numbers behind the answer?
The table lists every run of Momentum (trend following) that the answer reads, from 2024-08-15 to 2026-12-01.
Of the 4 "Lookback (bars)" options compared, a setting of 50 had the highest Sharpe, and 2 made money. With "Lookback (bars)" set to 10, 20, 50 and 90, the Momentum (trend following) rule on the 10-coin basket returned -39.4% (Sharpe -0.39) at 10, -58.7% (Sharpe -0.80) at 20, +67.9% (Sharpe 0.77) at 50 and +37.0% (Sharpe 0.55) at 90, on the 4-hour chart, long and short, on Hyperliquid perpetuals from August 2024 through November 2026, net of fees, slippage and funding. That is with "Entry band (%)" at its default, 0; a "Lookback (bars)" of 50 also had the highest Sharpe at 2 of the 4 values of "Entry band (%)" tested, and the default settings rank 16 of the 16 tested.
Lookback (bars): the options compared
| Run | Sharpe at 10 | Sharpe at 20 | Sharpe at 50 | Sharpe at 90 | Return at 10 | Return at 20 | Return at 50 | Return at 90 |
|---|---|---|---|---|---|---|---|---|
| Entry band (%) 0 | -0.39 | -0.80 | 0.77 | 0.55 | -39.4% | -58.7% | +67.9% | +37.0% |
| Entry band (%) 2 | 0.15 | -0.62 | 0.92 | 0.89 | -3.3% | -51.5% | +91.3% | +87.0% |
| Entry band (%) 5 | -0.14 | -0.23 | 0.80 | 0.85 | -23.1% | -30.5% | +72.3% | +79.6% |
| Entry band (%) 10 | 0.04 | 0.55 | 0.72 | 0.98 | -8.8% | +35.6% | +57.9% | +103.5% |
The highlighted rows are the runs the answer reads. No run is left out for losing money.
Where did it hold up best?
Among the runs that can be opened from this page, Momentum (trend following), the basket, 4-hour chart, long and short, Lookback (bars) 90, Entry band (%) 10 had the highest Sharpe of those that made money.
Momentum (trend following), the basket, 4-hour chart, long and short, Lookback (bars) 90, Entry band (%) 10. A starting point from this test, not a recommendation.
At $1,000, this strategy’s worst historical dip was about $332. Free account, your own Hyperliquid keys. Keel only trades.
Configuration
Globals(target_timeframe="4h")
Universe(mode="manual", symbols=["BTC", "ETH", "HYPE", "ZEC", "SOL", "NEAR", "XRP", "PUMP", "LIT", "ENA"], market="perp", resolved=["BTC", "ETH", "HYPE", "ZEC", "SOL", "NEAR", "XRP", "PUMP", "LIT", "ENA"], resolved_at="2026-07-06T00:00:00Z")
Execution(rebalance="buffered", buffer_threshold=0.25, buffer_mode="relative", rebalance_method="to_edge")
Pipeline([
PriceDataLoader(),
Store("ohlcv"),
ROC(period=90),
Store("roc"),
{
"long_in": [Load("roc"), AboveThresholdFilter(threshold=10.0), Store("long_in")],
"short_in": [Load("roc"), BelowThresholdFilter(threshold=-10.0), Store("short_in")],
},
{"fast": [Load("long_in")], "slow": [Load("short_in")]},
Crossover(),
ThresholdCross(upper=0.5, lower=-0.5, mode="symmetric"),
Store("entries"),
TradeManager(entries="entries", prices="ohlcv"),
{
"long_exit": [{"a": [IsLong()], "b": [Load("short_in")]}, MaskAnd(), Exit()],
"short_exit": [{"a": [IsShort()], "b": [Load("long_in")]}, MaskAnd(), Exit()],
},
Exposure(),
EqualWeightSizer(target_leverage=1.0, max_weight=0.1),
], name="momentum")
Ask your assistant to run this
The result on this page was computed with Keel. With the Keel connector, an assistant such as Claude or ChatGPT can run a variation of this test (another coin, timeframe or setting) on the same Hyperliquid perpetuals data.
Change the coin, the timeframe or a setting in the prompt before sending it.
For assistants: The tables on this page are served as JSON at https://usekeel.io/strategies/questions/which-momentum-lookback-works-best-on-crypto/data.json. The Keel connector at https://mcp.usekeel.io/mcp runs backtests on the same data: keel_strategy_compose saves a strategy from its source, which the Code view on this page shows, and keel_backtest_run runs it. The steps to add the connector are at https://usekeel.io/agents.
How does it compare with holding?
The chart draws Momentum (trend following), the basket, 4-hour chart, long and short against holding the same coins over the same weeks.
How was this tested?
The test of Momentum (trend following) ran on Hyperliquid perpetual futures from 2024-08-15 to 2026-12-01, net of fees, slippage and funding.
Momentum (trend following)
- Entry
- Buy when the close is above the close 20 bars ago (20-bar return above 0 %). Short when it is below.
- Exit
- Close the long when the 20-bar return turns negative, and the short when it turns positive; in the long/short test that flips the trade.
- Market
- Hyperliquid perpetual futures
- Window
- 2024-08-15 to 2026-12-01
- Costs
- 4.5bp fee + 4.5bp slippage per trade (9bp round-trip); funding included
- The buttons open
- Momentum (trend following), the basket, 4-hour chart, long and short, Lookback (bars) 90, Entry band (%) 10
- Its coins
- The 10 Hyperliquid perps with the most traded dollar volume in the 90 days to 2026-12-01, pinned: the same 10 coins are used for the whole test. The list was picked on the last day of the test window, with hindsight, so it favours coins that were heavily traded at the end. HYPE, ZEC, PUMP and LIT were listed after the window starts: each trades from its first bar, and before that its tenth of the account stays in cash.
- Its sizing
- Each of the ten coins trades its own signal and opens each trade at 1/10 of the account. While a trade is open, if its share of the account drifts more than 25% from that tenth, it is trimmed or topped up back to the edge of that range. No stop.
- How the coins were picked
- The 10 coins of the basket are the Hyperliquid perps with the most traded volume in the 90 days to December 1, 2026. They were picked on the last day of the test, with hindsight, so the list favours coins that were heavily traded at the end.
Every number on this page comes from Keel backtests on Hyperliquid perpetual futures, net of fees, slippage and funding. These are historical results for one window. They do not predict the next one, and none of this is investment advice. How these backtests were produced has the method, and the guide to crypto backtesting covers fees, funding, slippage, look-ahead and overfitting.
What changes for my coins and settings?
The test of Momentum (trend following) used one window, one set of coins and one set of settings, and each of those is something you can change in your own draft.
- This is one window, from August 2024 through November 2026. Another period can give another answer.
- The basket is pinned to 10 coins picked by traded volume. It does not follow new listings.
- Other coins
- Fork the strategy and change its coins, then backtest it again.
- Another timeframe
- Change the timeframe in the editor and run the same test on it.
- Other settings
- Change the settings in the editor and backtest your version with fees, slippage and funding.
- From today
- Paper trade your version on live Hyperliquid prices with simulated money, with fees and funding charged.
Momentum (trend following), the basket, 4-hour chart, long and short, Lookback (bars) 90, Entry band (%) 10. A starting point from this test, not a recommendation.
At $1,000, this strategy’s worst historical dip was about $332. Free account, your own Hyperliquid keys. Keel only trades.
Paper trade it from today: Opens Momentum (trend following), the basket, daily chart, long only on the paper step: simulated money on live Hyperliquid prices, no real money. The free plan runs 1 paper strategy at a time.
How do I run it myself?
Running Momentum (trend following), the basket, 4-hour chart, long and short, Lookback (bars) 90, Entry band (%) 10 yourself takes three steps in Keel, and you can stop after any of them.
Fork it
Open this strategy in Keel as your own draft. Change the coins, the timeframe or the settings, and backtest your version with fees, slippage and funding before you trust it.
Paper trade it
Run it forward on live Hyperliquid prices with simulated money, with fees and funding charged. You need no wallet for this, and no money is at risk, so you can see whether your version trades the way its backtest did.
How paper trading worksRun it from your own Hyperliquid account
Connect the wallet you use on Hyperliquid and approve an agent wallet: a separate key that can place trades for you but can never withdraw or transfer funds. Your money stays in your own account. Keel runs the strategy on its servers and it decides after each candle closes, so nothing has to stay open on your computer. One strategy runs per account and trades all of it, and Keel shows the amount it needs before you go live. Pause it or revoke the agent wallet whenever you like; that never moves your money.
How a Keel trading bot works
Momentum (trend following), the basket, 4-hour chart, long and short, Lookback (bars) 90, Entry band (%) 10. A starting point from this test, not a recommendation.
At $1,000, this strategy’s worst historical dip was about $332. Free account, your own Hyperliquid keys. Keel only trades.
Building, backtesting and paper trading are free to start, and the free plan can also run a strategy live. The pricing page has the fees and limits.
What else do readers ask?
Which coins were in the test?
The basket is 10 coins: BTC, ETH, HYPE, ZEC, SOL, NEAR, XRP, PUMP, LIT and ENA. Each trades its own signal with an equal share of the account.
What period does the test cover?
The test ran from August 2024 through November 2026 on Hyperliquid perpetuals.