In this post, we will not be going into details of the logic behind grid trading, but more on the intuition of building a viable grid strategy. You can read the following to find out more on what a grid strategy looks like: __A Primer on grid trading strategy__

Grid trading profits from volatility around a certain mean, and is part of a wider mean reversion family of strategies.

Assumptions of profitable grid trading:

The market that we are trading will retrace back to the mean

Benefits of grid trading:

Straightforward to implement (as a system) and understand

No chain losses - Stacks close in profit

Conditions needed for profitable grid trading:

Ranging markets

Not monopolistic in nature - eg Low liquidity crypto where it is controlled by a few big players

Each successive entry is executed at a better price than it's predecessor. eg a new buy entry will always be lower than the previous buy entry.

There are variations to how a grid system is formulated.

Range between entries:

**Uniform**- Each entry is uniformly entered at a given number of basis point from the previous entry**Dynamic**- Each entry is entered based on some formula or technical indication that the price will potentially move in the direction of the trade in some foreseeable known time. A minimum distance or time between trade is usually enforced to prevent successive trades to be entered in a small range or a short period of time.

Multiplier of lot size for successive trades:

The higher the multiplier, the lesser the retracement needed to hit breakeven. This would also mean higher drawdowns if the trade is not going in the right direction

The lower the multiplier, the slower the retracement back to breakeven. This may cause the stack to enter a new trading cycle, pushing the account into deeper drawdowns.

With these factors in mind, our goal is to minimize drawdown. The exit conditions for a grid strategy ensure that each trade will always close with a profit. We will need to know what it means for us to open each successive trade, the potential drawdown if the trade does not go in our favor, and the potential retracement needed to exit the position if it exceeds the risk threshold.

Here's a simple breakdown of a hypothetical **SELL **grid. We assume to take a sell entry for every dollar increase.

**Price **- the entry price of a level in the grid

**Lot size **- the lot size we are taking for that position. In this scenario, we are using a 1.5 multiplier or the 'fibonnaci' multiplier

**Sum Product** - Calculates what is the total sum product of all preceding levels and the current level

**Breakeven price** - This is the breakeven price for all existing levels. It is calculated by dividing the sum product by the existing total lot size

**Retracement needed** - This is the % retracement from the "best" entry against the "worst" entry

**Retracement Delta** - change in retracement for each successive level

Price | Lotsize | SumProduct | Breakeven price | Retracement needed | Retracement Delta |

1 | 1 | 1.00 | 1.00 | ||

2 | 2 | 4.00 | 1.67 | 33.33% | |

3 | 3 | 9.00 | 2.33 | 33.33% | 0.00% |

4 | 5 | 20.00 | 3.09 | 30.30% | -3.03% |

5 | 8 | 40.00 | 3.89 | 27.63% | -2.67% |

6 | 13 | 78.00 | 4.75 | 25.00% | -2.63% |

7 | 21 | 147.00 | 5.64 | 22.64% | -2.36% |

8 | 34 | 272.00 | 6.56 | 20.53% | -2.12% |

9 | 55 | 495.00 | 7.51 | 18.66% | -1.86% |

10 | 89 | 890.00 | 8.47 | 17.03% | -1.63% |

11 | 144 | 1,584.00 | 9.44 | 15.60% | -1.43% |

12 | 233 | 2,796.00 | 10.42 | 14.35% | -1.25% |

13 | 377 | 4,901.00 | 11.41 | 13.27% | -1.09% |

14 | 610 | 8,540.00 | 12.40 | 12.31% | -0.95% |

15 | 987 | 14,805.00 | 13.39 | 11.48% | -0.84% |

16 | 1597 | 25,552.00 | 14.39 | 10.74% | -0.74% |

17 | 2584 | 43,928.00 | 15.39 | 10.08% | -0.65% |

18 | 4181 | 75,258.00 | 16.39 | 9.50% | -0.58% |

19 | 6765 | 128,535.00 | 17.38 | 8.98% | -0.52% |

As we can see, the higher the level, the lower the retracement needed to hit breakeven. As we get to the higher levels, the delta change will tend to a certain value and any successive levels will contribute to drawdown and do little to resolve the entire stack at breakeven. In these scenarios, these levels will form the upper limit and a decision can be made to cut the entire stack to prevent further drawdowns.

We can also proxy the ease of retracement with the time needed to close the stack, or to get out of the position.

Given this hypothetical scenario, we can proxy risk by looking at the price levels that we enter, and provide a general condition that risk exponentially decreases for buys as prices go lower, and vice versa for sells.

If we were to plot the retracement needed versus the breakeven price, we would be able to model what would be a "safe" price to enter for a particular instrument. Given a large sample size of trials, we can start entering trades only when we reach the 10th level to minimize the risk that we are taking. Again, the grid strategy is essentially a mean reversion strategy, and by modeling the grid strategy on a particular instrument's dataset, we can quickly identify the level that will provide us with the least (potential) drawdown.

One thing that we will take note of is the frequency of trades at the "optimal" level and the need to consider that in our loss function. There is no hard and fast rule for the minimum number of trades that we need to take, and it is largely up to the trader or client to figure out what that number would be.

We put this experiment to the test on Metatrader and see how the initial strategy performs.

Initial Deposit: $10 000

Period: 2020 - 2023

Symbol: EURUSD

Multiplier: 1.5

We got about 32% returns in 4 years, averaging bout 8% a year, with a max drawdown of ~**30%. **The max drawdown presented by Metatrader is inaccurate as the number represents the highest closed trade DD.

The average time spent in trades while in a drawdown was 6.37 days which gives us much room to improve. Ideally, we would want to sit on DD not more than a day.

Based on this data set, the aggregated profits starts on the 7th level at 0.17. Given a large number of trials, the 1st 6th levels do not yield any profits for the trader. It's worth taking these trades to account for the lack of frequency and generate volume transaction if there is an incentive to do so. By dropping the 1st 6th trades, we can improve the performance by about 25%.

TLDR

We attempted to optimise a traditional grid strategy by looking at how it trades against a particular instrument. We have also devised a way to model which levels would be meaningful for us to enter to minimise drawdowns and time in trade. In the next post, we will explore ways cut down on the time needed to identify these levels by fine-tuning our first entry.