Skip to content
All library documents

Dynamic Grid Rebalancing for Bybit Inverse Contracts

Article Strategy library · Author: @cqz

Summary

This document describes a dynamic grid approach for Bybit inverse contracts, configured for a coin-margined BTC/USD market. Rather than placing orders at fixed grid levels, it sets a target coin allocation that varies linearly with price between configured bounds. The allocation is clamped outside that range. For each side, the strategy estimates a small price move, calculates the coin amount needed to move the account toward its target allocation, and enforces a minimum order size.

When a fill changes the account balance, the strategy derives a new order price by solving for the price at which the resulting allocation meets the target; it selects a positive solution and constrains the result to the allocation range. Orders are submitted as post-only limits. The document also shows account and position retrieval, order handling, reset controls, and reporting that compares strategy asset changes with a spot benchmark. It provides implementation details but no measured performance or complete validation evidence. Exchange API behavior, inverse-contract accounting, fees, funding, execution risk, and the chosen bounds and allocation settings can all affect results.

Key ideas

  • The target coin allocation changes linearly with price and is limited by configured price bounds.
  • Order quantities are calculated from current account value and the target allocation after a small assumed price move.
  • After a fill, a quadratic calculation estimates the next grid price for the updated account state.
  • Minimum order sizing and post-only limit orders constrain order placement.
  • The document reports strategy and spot asset changes but supplies no performance evaluation.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.