Skip to content

Research notes

Grid bot vs rebalancing bot: follow the inventory

Trace two spot bot rules through the same invented price path, then compare inventory, target weights, turnover and the records needed to validate each order.

Ivory steps with beads connect by a paper ribbon to a ceramic cradle holding two spheres, with a lime bead.
Illustration for research notes; examples in this article are educational.

A grid bot trades at preset price levels inside a chosen range. A rebalancing bot trades to restore target portfolio weights when its schedule or drift rule permits. Both may sell after rises and buy after falls, but they size and stop trades differently. Compare their inventory rules, costs and failure cases before comparing returns.

Two bots can submit a sell at the same moment for different reasons. One has reached its next ladder rung; the other holds more of an asset than its allocation allows. The useful comparison is what each account should own after that sale and what would authorize the next order.

Which variable controls the next order?

A conventional fixed spot grid starts with a pair, price boundaries, intermediate levels and order sizes. In Bybit's documented Spot Grid implementation, a purchase can place a sale at the next grid above, and a completed sale can replace a buy below. Repeated movement between levels can therefore generate repeated transactions.

A portfolio rebalancer starts with target market-value weights. Binance's bot guide describes selling an asset whose portfolio share has increased and buying others to restore the chosen allocation. Its reference point is a proportion of the portfolio, rather than a particular token price.

DecisionFixed spot gridPortfolio rebalancer
What is specified first?Pair, range, levels and order sizeIncluded assets and target weights
What authorizes a trade?An eligible grid order fillsThe observation and drift policy permits an adjustment
What determines quantity?The grid's sizing rule and available inventoryThe value difference between current and desired holdings
What counts as completion?A fill and its replacement order are reconciledActual holdings reach the intended allocation within tolerance

Providers can add trailing ranges, variable sizing or other controls, so inspect the actual rule set. These labels describe families of strategies.

Rebalancing also needs an observation clock. OKX's Smart Portfolio documentation describes scheduled and proportion-deviation modes, with additional implementation conditions. The separate calendar versus threshold rebalancing guide explains how observation timing changes decisions even when target weights stay the same.

Follow one price path with two sets of holdings

This original hypothetical example uses an invented UNIT/USDT spot pair. Both accounts start with 10 UNIT at a price of 100 USDT and another 1,000 USDT, giving each 2,000 USDT of equity. USDT is the accounting unit; no equivalence with US dollars is assumed. The 50/50 starting split illustrates mechanics, not an allocation recommendation.

The grid's levels are 80, 90, 100, 110 and 120 USDT. Every filled order trades exactly one UNIT. Initially, buys wait at 80 and 90; sells wait at 110 and 120. No order waits at 100. A filled sell places a buy one level lower; a filled buy places a sell one level higher. The range stays fixed.

The rebalancer instead restores 50% UNIT and 50% USDT at every observation after launch. It has no drift band in this simplified policy. It recalculates from its own updated holdings each time. This is an illustrative rule, rather than a specification for any provider's product.

The shared path is 100, 110, 120, 110, 100, 90, then 100 USDT, with no intervening reversals. Assume every listed grid order fills completely at its limit and every rebalancing adjustment executes at the observed price. Ignore fees, spread, slippage, rounding, initial acquisition costs and external transfers. A price touch in live trading would not establish these fills.

ObservationUNIT priceGrid UNIT heldGrid USDT heldRebalancer trade in USDTRebalancer UNIT held
Start100101,000None10.000000
First rise11091,110Sell 50.009.545455
Second rise12081,230Sell 47.739.147727
First decline11091,120Buy 45.749.563533
Back to launch price100101,020Buy 47.8210.041710
Further decline9011930Buy 50.2110.599582
Final recovery100101,030Sell 53.0010.069603

Displayed values are rounded; calculations carry full precision between observations. The grid trades one UNIT at every step, with direction determined by its live order. The rebalancer's quoted trade amount changes at every step because its total equity and existing quantities change.

The first sale reveals the difference

At 110, both accounts are worth 2,100 USDT before trading. The grid sells one UNIT for 110 USDT. It then owns nine UNIT worth 990 USDT and 1,110 USDT in quote assets. Its UNIT weight is 990 / 2,100 = 47.14%. The grid followed its price rule even though it moved below the original 50% token weight.

The rebalancer computes a target UNIT value of 0.50 × 2,100 = 1,050 USDT. Its existing tokens are worth 1,100 USDT, so it sells only 50 USDT, or 50 / 110 = 0.454545 UNIT. It finishes with 9.545455 UNIT and 1,050 USDT, restoring 50/50.

After the second rise, the grid holds eight UNIT worth 960 USDT against total equity of 2,190 USDT. Its token weight has fallen to 43.84%. The rebalancer still finishes its adjustment at 50%, holding approximately 9.147727 UNIT and 1,097.727273 USDT.

This does not make the grid's allocation incorrect. It shows that the allocation was never its control target. Changing grid order size would change its inventory trajectory. Changing the rebalancing target would change a different instruction.

Compare the whole account and trading activity

At the final price of 100, value both accounts using the same timestamp and unit of account:

MeasureFixed one-UNIT grid50/50 rebalancer
Final UNIT quantity1010.069603
Final USDT quantity1,0301,006.960335
Final equity in USDT2,030.002,013.92
Change from starting equity+30.00+13.92
Gross traded value in USDT630.00294.49
Final UNIT weight49.26%50.00%

For the grid, ending equity is 1,030 + 10 × 100 = 2,030 USDT. Its three sales total 330 USDT and three purchases cost 300 USDT. Quantity returns to ten UNIT while quote assets increase by 30 USDT. A no-trade account holding the original assets would finish at 2,000 USDT on this path.

For the rebalancer, the unrounded final holdings are approximately 10.069603349 UNIT and 1,006.960334883 USDT. Adding their values gives 2,013.920669766 USDT. Its adjustment at each observation preserves equity immediately before costs; subsequent price changes act on the quantities left by earlier decisions.

These outcomes belong to the selected reversal path and settings. They do not establish a repeatable ranking. The two accounts had equal starting capital but different exposures afterward. A sustained move, a different grid size or a less frequent rebalancing policy would change the comparison.

Gross traded value here sums the absolute UNIT purchase and sale notionals. An invented 0.10% charge on those unchanged fills would be 0.63 USDT for the grid and about 0.29 USDT for the rebalancer. This is a cost sensitivity, not a recursively simulated after-fee result: deducting fees can alter later rebalancing sizes. Apply the spread and fee hurdle method when evaluating repeated small trades against executable prices.

A completed-cycle counter is another measurement scope. Use the grid profit versus total return reconciliation to include unsold inventory before comparing a grid display with a portfolio's equity change.

Test the behavior when the price path stops cooperating

A persistent decline: The grid adds tokens at eligible lower levels and then reaches its boundary. Bybit's documented fixed-range implementation suspends new grid orders outside that range. Existing holdings still change in value. A retained 50% rebalancing target may continue directing quote assets into the falling token at later observations; restoring a weight does not assess whether that token remains appropriate to hold.

A persistent rise: Grid sales can reduce token exposure faster than a particular rebalancing rule, as the first two rises demonstrate. Both can lag an unchanged token holding during a continued rise. A price-level order and a target-weight correction express different amounts of participation in the next move.

An execution interruption: A partial grid fill does not authorize replacing a full unit as if the entire order completed. A partial rebalance does not establish the target allocation. Reconcile actual quantities, quote balances, fee currencies and live orders before calculating the next action. Otherwise either strategy can duplicate an adjustment or spend reserved funds twice.

Unexecutable sizes: Binance Spot's filter documentation defines price ticks, quantity steps and notional constraints. A theoretical grid rung or tiny rebalancing adjustment may violate a venue's applicable rules. Round under an explicit policy, then report the resulting holdings and residual allocation drift.

This comparison concerns unleveraged spot holdings. Before adapting it to contracts, read the spot versus perpetual trading comparison. Contract exposure and margin mechanics require a different ledger from owned tokens and quote assets.

Write an instruction you can validate

Choose the rule by the exposure you intend to maintain. A price ladder is a way to trade a specified range with a declared inventory budget. Target weights are a way to restore a declared allocation. Neither instruction chooses suitable assets or supplies a loss limit by itself.

Policy fieldGrid recordRebalancing record
Account boundaryPair, assigned tokens and quote budgetIncluded assets, accounts and reporting currency
Decision inputsFixed levels, size and replacement ruleTarget weights, observation clock and drift rule
Failure handlingPartial fills, missing orders and range exitStale prices, partial adjustments and failed legs
LimitsMaximum token inventory and committed quote assetsPermitted residual drift and adjustment budget
Evidence after a tradeFill receipt, new balance and live ladderFill receipt, new balance and actual weights

Replay at least a reversal, a persistent rise and a persistent decline. Carry each candidate's balances forward separately; compare inventory, sampled weights, costs and unresolved orders as well as ending equity. Include one deliberately missed fill to check recovery.

Before activating either rule, save a balance snapshot and predict its next order, its quantity and the holdings that should remain after a complete fill. Then repeat that prediction after one partial fill. If those instructions are ambiguous, the strategy is not yet specified well enough to automate.

Keep the context with the example.

Each worked example is illustrative, with its sources and assumptions in the article. Read our editorial standards for authorship, verification and corrections.