Fund equal base quantities
The grid uses equally spaced buy prices that include both endpoints. If every level buys quantity q, the required budget is q multiplied by the sum of all level prices and by (1 + entry fee rate). Solving that equation gives one common base quantity for the full grid. Higher levels therefore consume larger quote amounts. This allocation differs from an equal-budget ladder, which buys more units at lower prices. Compare the two models only after checking which quantity convention you intend to use.
Mark the filled inventory
The scenario assumes price approaches the grid from above. A level is treated as filled when the chosen low is at or below its buy price. For those fills, subtract price times quantity plus entry fee from cash and add the common quantity to inventory. Final modeled equity equals remaining cash plus acquired units multiplied by the final marking price. Profit or loss is that value minus the original budget. The final marking price should not be below the scenario's stated low.
Recognize what the stress path omits
No grid sells occur in this model, even if the final price has recovered. The result therefore isolates accumulated inventory and capital use rather than estimating a complete grid bot's revenue. It does not simulate the time spent at each level, available depth, queue priority or partial fills. Marked inventory is also not equivalent to realized exit proceeds: selling can incur fees and slippage. Use several lows and final prices to inspect exposure outside the intended range before evaluating any separate selling or replenishment logic.