Divergence Matrix Trend Following Strategy
Overview
The Divergence Matrix Trend Following Strategy is a quantitative trading strategy that combines trend, divergence, and moving average analysis. This strategy uses dual RSI indicators to judge market trend direction and matrix moving averages to generate entry signals. The matrix moving averages adjust position sizing based on the degree of price divergence. Overall, the advantage of this strategy is to confirm trading signals with multiple indicators, which can effectively avoid false breakouts. Meanwhile, the matrix mechanism can lock in higher returns.
Strategy Logic
The Divergence Matrix Trend Following Strategy consists of the following main parts:
-
Dual RSI for trend judging
Use fast RSI and slow RSI to determine market trend direction. When the fast RSI shows overbought or oversold levels, check the slow RSI for trend direction.
-
Matrix moving average for trading signals
Set up a group of matrix moving averages based on the entry price. When the price touches a moving average line, adjust the position accordingly. This allows more profits to be captured in trends.
-
Bi-directional trading
Default is bi-directional trading. Can choose to only go long.
The specific trading logic is:
-
Use fast RSI to spot temporary overbought/oversold levels in the market.
-
Use slow RSI to determine the mid-to-long term trend direction of the market.
-
When fast RSI shows extremes and slow RSI signals trend reversal, take positions based on the long/short trend by slow RSI.
-
After entering positions, set up a group of matrix moving averages. These matrix lines are based around the entry price, with interval size defined in the "Matrix Interval %" parameter.
-
When price touches a matrix line, adjust position size accordingly. For example, increase longs on upward breakouts, reduce shorts on downward breakdowns.
-
When price sees large adjustments, positions will be reset to initial levels.
The above describes the main trading logic of this strategy. The matrix mechanism allows more trend profits to be locked in.
Advantages
The Divergence Matrix Trend Following Strategy has the following advantages:
-
Dual RSI signals are more reliable. Fast RSI avoids false breakouts and slow RSI ensures the major trend is correct.
-
Matrix moving averages profit from trends. Adjusting position size based on price divergence allows sustained profits to be captured.
-
Supports bi-directional trading. Default is dual directional trading, but can also go long only. This adapts to more market environments.
-
Position reset mechanism controls risks. Resetting positions when price sees large adjustments allows timely stop losses.
-
Flexible parameter settings. Users can select optimal parameter combinations based on historical data, trading instruments etc.
-
Clean code structure. Clear separation of responsibilities makes the code easy to understand, optimize and extend.
In summary, the biggest edge of this strategy is to improve signal quality through multiple mechanisms while pursuing higher returns under controlled risks. This is a strategy balancing risk and reward.
Risks
The Divergence Matrix Trend Following Strategy also has some risks, mainly in the following areas:
-
Failure risk of dual RSI signals. When the market is range-bound, RSI often gives false signals. Manual intervention is needed to adjust parameters or suspend trading.
-
Improper matrix moving average risk. If matrix parameters are not set properly, position adjustments can be too aggressive, thus magnifying losses. Conservative parameter testing is a must.
-
Risk of over-leveraged positions. Excessive position size adjustments will also expand losses. The maximum position size parameter needs to be set prudently.
-
Trend reversal risk. If failing to close positions promptly when trend reverses, large losses may be incurred. This calls for monitoring longer-term trend indicators.
-
Limited optimization space risk. This strategy is already quite mature. Continued optimization potential is limited. Major upgrades may be needed if market regimes change drastically.
Assessing and optimizing the strategy is key to mitigating these risks - adjusting parameters, monitoring longer-term indicators etc, can alleviate risks to some extent.
Enhancement Opportunities
There is room for further enhancement of the Divergence Matrix Trend Following Strategy:
-
Optimize dual RSI parameters. Test more parameter combinations and select RSI periods with highest accuracy.
-
Customizable matrix lines. Allow users to parameterize matrix settings based on different instruments to better suit their characteristics.
-
Add stop loss mechanisms. For example, set up exit lines to stop out positions if price breaks those lines.
-
Add more scientific position sizing rules. Manage position size adjustments in a more gradual fashion to prevent over-leveraging.
-
Incorporate other indicators. Introduce additional indicators like MACD, KD etc. to improve signal accuracy.
-
Optimize code structure. Further improve extensibility, maintainability and execution efficiency of the code.
Conclusion
The Divergence Matrix Trend Following Strategy is a sophisticated quantitative trading strategy combining multiple mechanisms - using dual RSI for trend direction and matrix lines to profit from trends. Compared to single-indicator strategies, it provides more stable and efficient trading signals. With parameter tuning and optimization extensions, this strategy can adapt to more market conditions and regimes, making it highly versatile. Overall, this strategy strikes a good balance between risk and return, and deserves active application and continued enhancement by investors.
- 1

