About GRID backtesing results

I was backtesting some grid bots. For example, from 2023 to 2025, I’m getting over 200% net profit. However, when I test with the same settings for the period from 2021 to 2025, the ROI is less than 100%.

When I roughly calculate the results for 2021 to 2025, they seem correct. For example:

A $600 investment with 41 grid levels means $14 per trade.
Assuming a 1.89% grid spacing, each trade generates:
$14 × (1.89/100) = $0.26 per sell transaction .

From 2023 to 2025:

Approximately 1,394 transactions.
Total profit: 1,394 × $0.26 = $362.
Backtest result: $1,718 profit, which seems inconsistent.

From 2021 to 2025:

Approximately 2,042 transactions.
Total profit: 2,042 × $0.26 = $530.
Backtest result: $544 profit, which is roughly accurate.

After running the backtests, I exited and opened some live bots based on back tests, but now when i test results with long time period those back tests appeared showed me correct results. Can you please review and provide a solution?

  1. Gainium app

  2. Gainium app


Thank you for reporting this, Suresh!

We have received your detailed explanation and links to the backtest results. This appears to be an inconsistency in how the backtesting results are calculated or displayed for different time ranges. Our team will investigate this further to identify any discrepancies and ensure accurate reporting.

We will provide you with an update shortly. In the meantime, if you have any additional information to share, feel free to let us know.

The difference is in initial balances. For 21-25 period. Start price of the backtest is more than max grid price. Therefore backtest started fron quote balance only, and all orders are buy. In this case your calculation is correct: 0.26$ profit per transaction.
In period 23-25, backtest started with initial price 6.6, therefore backtest assume that all base was bought at price 6.6, all orders in initial grid is sell only, each unique sell transaction calculates profit not between corresponding buy and sell, but from initial price, which is 6.6. So it has more profit in it (from 10$). You can check the transactions list in the backtest result.
To make the results comparable, you may need to set start price.

2 Likes