Urgent.News

What's breaking now, across hundreds of outlets.

Tech

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

Read the original at dev.to →

Report a problem with this story

More in Tech

CVE-2026-123039 Recovery: Webshells, Persistence and Post-Exploitation Evidence

CVE-2026-123039 Recovery: Webshells, Persistence and Post-Exploitation Evidence Installing a fixed Check Point build addresses CVE-2026-123039.

  • Local user can execute commands with root privileges via DynamicCLI daemon.
  • Exploitation requires local execution context like PHP2Shell on Mobile Access portals.
  • Update to R82.20 Take 14 or later to mitigate vulnerability risk.

Scraping App Store reviews across countries without proxies (and turning them into a sentiment dataset)

AI disclosure: This article was written with AI assistance (Claude). The code is condensed from a scraper I maintain, and every number in the output sections came from actually running the scripts…

  • Gather App Store reviews from four countries using JSON endpoints
  • Utilize customer-reviews RSS feed and iTunes Lookup API with Node.js fetch
  • Convert reviews into labeled JSONL dataset (positive/neutral/negative)

More from Sunday 22 November →