<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: botrader</title>
    <description>The latest articles on DEV Community by botrader (@grid_lab_5973957c976a69d7).</description>
    <link>https://dev.to/grid_lab_5973957c976a69d7</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4259296%2Ff2c5d8dc-41fb-4683-acbf-ec587bb5e358.png</url>
      <title>DEV Community: botrader</title>
      <link>https://dev.to/grid_lab_5973957c976a69d7</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/grid_lab_5973957c976a69d7"/>
    <language>en</language>
    <item>
      <title>What a grid bot backtest usually leaves out: fees, funding and liquidation</title>
      <dc:creator>botrader</dc:creator>
      <pubDate>Sun, 22 Nov 2026 20:42:09 +0000</pubDate>
      <link>https://dev.to/grid_lab_5973957c976a69d7/what-a-grid-bot-backtest-usually-leaves-out-fees-funding-and-liquidation-11c2</link>
      <guid>https://dev.to/grid_lab_5973957c976a69d7/what-a-grid-bot-backtest-usually-leaves-out-fees-funding-and-liquidation-11c2</guid>
      <description>&lt;p&gt;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.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Fees are paid on every fill, not every round trip
&lt;/h2&gt;

&lt;p&gt;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 quickly. The free calculator shows profit per grid after fees: &lt;a href="https://botrader.net/grid-bot-calculator?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=kit1" rel="noopener noreferrer"&gt;grid bot calculator&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Price leaving the range is the real risk
&lt;/h2&gt;

&lt;p&gt;Inside the range a neutral grid collects small amounts. Outside it, the bot holds the whole inventory on one side, and the open loss can be many times the collected profit. A good backtest has to report that open loss, not just "grid profit".&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Futures add funding and liquidation
&lt;/h2&gt;

&lt;p&gt;Funding is paid or received on the position you hold, usually every 8 hours (some contracts settle every 4 or even 1 hour). Liquidation depends on leverage, maintenance margin and how much inventory the grid has built up, so it moves as the grid fills. I check it on every price update.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Fills aren't instant at the line
&lt;/h2&gt;

&lt;p&gt;On fast moves price can jump past several lines between updates. The simulator walks the price path inside each candle and fills each crossed line in order, with slippage.&lt;/p&gt;




&lt;p&gt;I put all of this into &lt;a href="https://botrader.net" rel="noopener noreferrer"&gt;Botrader&lt;/a&gt;, a grid-trading simulator that runs on live public market data with a virtual balance. It never asks for exchange keys and never places orders.&lt;/p&gt;

&lt;p&gt;If you've built your own grid backtests, I'm curious what else you model.&lt;/p&gt;

</description>
      <category>crypto</category>
      <category>python</category>
      <category>trading</category>
      <category>simulation</category>
    </item>
  </channel>
</rss>
