Grid Science · Philosophy
What is Grid Science?
Discover the philosophy and thinking behind Hydra Vision. No position is opened without purpose — every action is deliberate and strategically planned.
We are deeply passionate about grid trading and all of its intricacies, nuances and possibilities. In this article we look back at how we started, the thinking, approach and data-led evolution of capabilities.
To ground ourselves we developed a method, Grid Science, replacing guesswork and personal opinion with empirical evidence, testable hypotheses, and reproducible experiments when building, debugging, testing and trading.
For over six years we engineered an automated trading infrastructure geared specifically around grid trading. Being a data-led organisation, we architected Hydra Vision to read, store (and persist), interpret, and dynamically adapt to the right data at the right time, most of which is not native to MT5.
Note. The name Hydra Vision was born out of this early work we carried out. Hydra being the multi-headed monster from Greek mythology, and Vision for an all-seeing system.
It is our observation that MT5 is not well suited to handle or report on grid trading, as can be seen in the low-quality and minimal data in the backtest reports. The available data is more aligned to single-position reporting, and most of the collected data is less useful when trying to understand grid performance and potential optimisation.
By way of a simple example, Grid Density is the measurement of how compacted the grid is, measured as open positions/(total grid span/minimum step size) as a %. This critical reading determines grid health, re-entry gating, de-risking approach and much more. When measured and reported over many grid cycles we can start to better understand the effectiveness of our configured strategy and explain behaviours.
Our method required an operating framework structuring our approach, one we could stand by every day.
The high level framework
No position is opened without purpose. Every action taken must be intentional and strategically planned for.
- Trading (setfile) configurations must be data-led and defensible
- Every prospective position must be pre-evaluated for risk and overall contribution to the grid
- Decision logic should always have risk-on and risk-off reasoning available to it (best case <--> worst case)
- All positions in the grid (open and previously closed) must have awareness of each other. Understanding the path the grid has traded protects grid integrity
- The system should be capable of real-time optimisation and adaptability
With a framework in place we could start to really look at the structural weaknesses (and strengths) of traditional (fixed price) grids and progressive trading risks (the strategy of increasing the volume of subsequent positions, with the intention of improved recovery).
The challenges of traditional grids
Grid trading is a complex multi-position (sometimes bi-directional) trading strategy. Treating it as a single averaged entity begins to expose the weakness.
The main challenge we identified was not the grid itself. Using the concept to navigate market swings is sound. The failure is in the naivety of the mechanical, unrelated and predictable process governing when, how and why new positions are opened (and indeed closed).
In amongst the numerous challenges, grid trading is notorious for being an unsustainable system over the medium to long term, particularly when there is no manual intervention or stop losses. Applying the concept of maximum risk of say 3% per trade using a stop loss would result in very few grids surviving much beyond a few steps. Enabling a grid replaces the requirement for a stop loss, using average price recovery as both the stop loss and the profit mechanism.
This often leads to a disproportionate risk-reward ratio, by whichever measurement is chosen. Deep, long-running grids lock up margin and equity, and potentially leak overnight swap, with only a small single profit to show for it at the end. And during all this there are the negative psychological, emotional and financial impacts on the trader.
To counter this, grids often deploy a progressive volume strategy, such as martingale (volume doubles on each subsequent position). This approach produces a more favourable volume-weighted average price (VWAP) of the grid, resulting in a shallower retracement requirement for full closure. This solves the time side of the equation while skewing the pressure to risk-on. There is still only one way out of a grid trade... the market must hit the single calculated VWAP. The alternative is to set a maximum drawdown loss and accept that loss if the moment arrives. A tough pill to swallow when the profit path is small.
Both volume doubling and grid averaging in general rely a lot on hope when used incorrectly or too liberally. We should never hope in trading, be purposeful about the strategy and approach, and have a plan for all outcomes.
Fixed prices (steps) of grid positions provide structure and certainty, catching the small retraces/bounces of the markets. This works well until there is an explosive market move against the grid direction. The first consequence is many new positions open, and for no reason other than that's what is required. Risk increases (exponentially in the case when martingale volume is being used), and if the market does not whipsaw back, the grid can remain extended with a large volume exposure and few options to recover.
And finally, the one-trick pony syndrome. Usually these grids have a single purpose, to capture the swings of the market, closing the basket of positions for a single profit. That's potentially many positions, high drawdown, and a long duration, for a single profit.
We started solving by designing and developing the right engines
We began by designing around a comprehensive risk-management model to mitigate the negative impacts of progressive trading we observed in our earlier investigations.
We accepted that we would build around not being right about direction all the time, and to be prepared for as many scenarios as possible to survive adverse conditions.
And so for the first couple of years we focused on the how and when, through trial and error across hundreds of iterations and live trading, building up our repository with valuable performance data collected by our tooling.
PCL — Profit Closes Loss
This was our first engine, replacing the single-minded grid basket volume weighted average methodology.
PCL answers how, and has taken centre stage as our core engine. Simply put, PCL utilises the profit from one position to remove the loss of another targeted position. By way of example, the most extreme position in a grid will be in profit when the market retraces, whilst other grid positions remain in loss. Pairing this profit position with a single candidate from the loss basket provides PCL with two positions to average. When the market hits the pairs target price, the result is two positions being closed (de-risking the grid) and a small target profit being generated (the reward).
The targeting was the part that got more challenging, and finding the right approach required us to build a VWAP simulator, allowing us to optimise different pairing strategies.
PCL has upgraded the single-minded grid averaging approach to incorporate intra-grid micro-profit-taking, risk recovery, grid curation and strategy support all in a single dynamic rules-based system.
In contrast to whole grid averaging, where the grid average is both the single close and the de-risk event, PCL separates the concerns of risk and profit, as they require different approaches.
In strong trending markets where de-risking is required, the amount of profit required and the positions to target are different to those in a ranging market. PCL understands this difference, and can dynamically switch modes as required, while still supporting the overall trading strategy and grid integrity.
This results in the feasibility of dynamic position 'spacing', known as the step, and diversified volume strategies. Both of these variables can run with many more options, as the single-mindedness has been replaced. When pairing two positions as opposed to all positions, price spacing can be more dynamic. Likewise volume need not be overly aggressive.
A few years in and PCL had an advanced data capability which we call PCL Diagnostics. This fed into the lab, accelerating our learning and further optimisations on the engine.
PCL is now a curator, with specific targeting capabilities. We can shape (curate) grids, allowing alternative and hybrid trading strategies that can also incorporate trailing stop losses. Grids are now no longer a one-trick pony.
And to truly realise the potential of PCL we needed our second engine.
SE3 — SmartEntry v3
SE3 answers when, and started out life as a signals module. The challenges arrived when the data from PCL showed that different grid regimes required a dynamic re-entry capability, more than what signals alone could provide.
A coupling with PCL was needed, a deeper data shared model. Analysis demonstrated that SE3 needed to own some of the responsibility for PCL's performance. If the re-entries were poor, PCL had to work so much harder, at times being forced into making sub-optimal decisions. SE3 got an upgrade, and now shares the same underlying operating model as PCL. And by this we mean, how risk is measured, the intention of the strategy, the prevailing market regime and so on.
With shared operating models available, all the grid's key performance metrics improved and we got clear visibility into decisioning behaviour and repercussions of configuration changes. We expanded the SE3 data repository, exposing the real performance of SE3, which when viewed alongside PCL Diagnostics data, allowed for co-ordinated adaptability. For example instead of SE3 simply asking, 'Is this the right price to be entering?' it could now adapt by asking 'Is this the right time to think about asking?' It's a subtle but important shift.
This adaptability upgrade of SE3 started the roadmap towards a truly multi-asset-capable system.
We had by this stage overburdened SE3 and PCL with data processing requirements, and so to relieve them of this function we started work on a dedicated data engine.
GS - GridSense
The growing constraints and complexity placed on SE3 and PCL led us to consolidate data capabilities into a third engine, fulfilling the why mandate.
PCL and SE3 collect and process an enormous volume of data, constantly recalculating and shifting the internal decisioning of the system. The repercussion of this was twofold. Gaining a 10,000 ft view of what is happening became difficult, and then exposing this data through exporters and emit functions was sub-optimal.
Enabling SE3 and PCL to hand off data processing logic provided a real-time analytical capability that was previously a manual stitching job. Designed for backtest performance analysis, to replace the built-in MT5 report, GS now also feeds into the live trading analysis repositories. Decisioning and optimisation just got the upgrade they deserved.
So the flow is SE3 and PCL capture every decision they make with reasons, hand these off to GS where they can be efficiently processed, exported to downstream consumers, and selectively re-ingested back into SE3 and PCL for re-use.
And that is how Grid Science was born
When we look back on the evolution of Hydra Vision, it is clear to us that none of what we have today would have been possible without the detailed science-like approach we took to designing our systems. Yes, it took longer, it was hugely frustrating at times, the complexity of the data plumbing caused many architectural challenges, but the rewards are the rich ecosystem of products that we see today.
From a simple idea, was born a deeply integrated platform, all built on the backbone of Grid Science.
See Grid Science at work. Everything you need to configure, test and understand Hydra Vision is in the free trial.
Start 14-day trial