Grid Trading Simulator: Automated Range-Bound Strategy Returns
Simulate grid trading returns, understand grid PnL calculations, optimize grid spacing, and evaluate backtesting results on Bitcoin and other volatile assets.
Grid trading automates the process of buying low and selling high within a defined price range, capturing profits from price oscillations. Understanding the mathematics behind grid strategies enables realistic performance expectations and optimization.
My friend Priya (different Priya β I know a lot of Priyas) runs a crypto trading bot. She set up a grid on ETH in May 2023 between $1,800 and $2,200, 20 levels, and let it run for three months. Every time the price bounced between resistance and support, her bot scooped up profit. "I made more money sleeping than I did during my day job," she said. Until August, when ETH broke out above $2,200 and the grid went fully short β no more fills, just sitting there holding cash while the market ran away. She'd earned about 12% in three months, then missed another 30% of upside. "Grids are amazing in range-bound markets," she told me. "They're terrible in trends." She's not wrong.
Photo by Art Rachen on Unsplash
Grid PnL Formula
Grid profit is death by a thousand cuts β lots of tiny wins that add up:
Total PnL = Ξ£ (Grid Profit Γ Number of Fills per Grid)
Say you've got 10 grid levels spaced 1% apart. Each fill captures roughly 1% minus fees. At 0.1% per side, net is about 0.80% per completed cycle.
If price bounces through the grid 50 times in a month and each level averages 5 fills: 10 levels Γ 5 fills Γ 0.80% Γ position size = your profit. A grind, not a moonshot.
Tuning Your Grid
Grid spacing is a trade-off. Tight spacing = more fills but smaller profits each time. Wide spacing = bigger wins but you sit around waiting for them.
The sweet spot depends on what you're trading. Bitcoin's daily volatility runs 2-3%, so spacing of 0.5-1.0% keeps your bot busy. Less volatile stuff needs tighter spacing just to trigger fills.
Too tight and fees eat your lunch. Too wide and you miss oscillations. The optimal is where these two costs balance out.
Picking Your Range
Too narrow and the price busts out β you're holding all cash or all coins, making nothing. Too wide and most of your capital sits idle while only a sliver of the grid works.
The trick is to pick a range where the asset actually trades most of the time. Support and resistance levels from technical analysis help. Priya's $1,800-$2,200 ETH range worked beautifully for three months β until it didn't.
Neutral or Directional?
Neutral grids start 50/50 β half cash, half asset. They love sideways chop and don't care which way the wind blows.
Trend grids lean one way. Bullish grid starts heavy in coins. If the trend's your friend, you capture both oscillation profits and directional gains. If you're wrong, you get hit twice.
Priya ran neutral. When ETH broke out, she regretted not having a bullish bias. But hindsight's 20/20.
BTC Backtesting
In 2021's wild range between $30K and $60K, well-tuned grids allegedly returned 20-50% annualized. That's real money for a passive bot.
But imagine running a grid from $10K to $30K while Bitcoin rocketed to $69K. Your grid would've fully sold out at $30K, then watched the real rally from the sidelines. You'd have made money β but you'd be furious about what you missed.
The Hidden Cost
Grids have a built-in opportunity cost. When markets trend hard, you lag simple buy-and-hold. BTC up 50% in a straight line? Your grid might capture 20% from bounces. The 30% gap is your "impermanent loss" β the price of stability.
If you know the market's ranging, grid all day. If you think a breakout's coming, maybe don't. Either way, know what you're signing up for β and maybe don't fall asleep on the job like Priya's bot did.