Skip to content
main site

Backtests

A backtest replays your exact grid or DCA settings over a past window of Hyperliquid prices, with fees, before you start a bot. Open advanced config / backtest on the grid or DCA setup panel, pick a window, and run it. The chart draws the window and marks simulated buys (B) and sells (S), sampling up to 400 fills; the results show in the panel when it finishes.

A backtest only shows results. It never ranks or suggests settings.

You can replay the last 7, 30, 90 or 180 days. Hyperliquid keeps about 5,000 candles per interval, so each window runs on the finest candles that cover it:

Window Candles
7 days 3 minute
30 days 15 minute
90 days 30 minute
180 days 1 hour

The candle that is still open is left out. If a pair hasn’t traded for the whole window, the replay starts where its history starts and the panel says so.

The chart draws the window with coarser candles (1 hour, 4 hour or daily) so the whole period fits on screen. The fills come from the finer candles above.

A candle only records its open, high, low and close, not the path the price took between them. The replay assumes the shortest path: open, low, high, close for an up candle, and open, high, low, close for a down candle. An order fills at its limit price only when that path trades through it. A price that only touches the limit doesn’t count as a fill, and a counter-order placed during a candle can only fill later in that path. Real fills inside a candle can differ.

The grid starts at the window’s first price with the same order prices and sizes the preview shows. The funding is what the preview asks for: USDC for the buy orders and the asset for the sell orders, valued at that first price. When a fill triggers a counter-order, the replay places it the way the running bot does. If fees and size rounding mean the account needs a little extra to place every counter-order, that extra is added to the starting position.

Fees use Hyperliquid’s base spot tier: 0.04% maker on every grid fill, plus Anello’s 0.02% fee on sells. Your own Hyperliquid tier may be lower.

Grid profit is realized profit or loss from selling, after fees. Total P&L also counts what the held asset and USDC are worth at the end of the window.

The schedule starts at the beginning of the window. Each purchase fills at the open of the candle containing its scheduled time and pays Hyperliquid’s base spot taker fee (0.07%). Spot buys carry no Anello fee.

Like the live bot, each purchase is sized so it can fill within 1% of the price. Unfilled or skipped purchases also leave USDC unspent, so spent can be below the budget. P&L is measured on the full budget, unspent USDC included.

  • Total P&L: the ending value of everything held, minus the starting position, at the end of the window.
  • Buy and hold: the same starting value put into the asset at the window’s first price, with no fees, for comparison.
  • Fees paid: every fee in the run. Open the … next to it to split Hyperliquid’s trading fees from Anello’s fee.
  • Max drawdown: the largest fall in account value from a previous high during the window.
  • Starting capital and ending capital (grid): the total USD value of the account at the start and at the end, with the asset valued at the price then.
  • Spent and ending capital (DCA): the USDC the purchases actually used, and what the asset bought is worth at the end. The gap between them is the P&L, since unspent USDC neither gains nor loses.
  • Starting position (grid): the USDC and the asset its orders need.
  • Ending position: the asset held at the end and its average cost. A grid that also holds USDC at the end shows that too.

A backtest shows how settings would have done on prices that already happened. Markets change, and a range that worked last month can sit outside the price next month. Use it to compare settings and spot obvious problems, not to predict returns.