What a grid bot backtest usually leaves out: fees, funding and liquidation
Most grid bot backtests count one thing: how many times price crossed a grid line. Multiply by profit per grid, done. That number is almost always too optimistic. Here's what it misses, and how I model it in a simulator. 1. Fees are paid on every fill, not every round trip A grid with a 0.3% step and 0.05% taker fee per side keeps only part of each step. With tighter grids the fee share grows…
Grid bot backtests often overlook key factors that significantly impact profitability. The most glaring omission is the consideration of fees and funding charges. These costs can dramatically reduce the apparent gains reported by a backtest.
Firstly, fees are incurred on every single trade execution rather than just on the final round trip. A grid trading with a narrow 0.3% step and 0.05% taker fee per side only captures a fraction of each trade. This fee burden compounds as the grid becomes tighter.
Secondly, when price moves outside the defined trading range, the bot is left holding a large position on one side only. This exposes it to substantial losses that can dwarf the accumulated profits. A robust backtest must disclose this open loss risk, not just report the "grid profit".
Thirdly, futures contracts introduce funding and liquidation costs that vary over time. Funding payments or charges typically occur every 8 hours, while liquidation can happen at any time dependent on leverage, maintenance margin and inventory levels. Accounting for these variables requires continuous monitoring during backtesting.
Finally, the execution of orders isn't instantaneous at the grid line. In turbulent markets, price can jump over several grid levels between updates. A realistic simulator walks through the price path within each candle and fills each crossed level sequentially, accounting for slippage costs.
By incorporating these real-world considerations into a grid bot backtest, the results will be far more representative of actual performance. The Botrader simulator provides a platform to model these complexities using live market data without needing exchange credentials to place orders.
Rewritten by urgent.news; may contain errors — check the original.
Source: dev.to