Adaptive Volatility Momentum Tracking Strategy: A Composite Trading System Based on VixFix and RSI
FMZQuant

FMZQuant @fmzquant

Joined:
Apr 25, 2024

Adaptive Volatility Momentum Tracking Strategy: A Composite Trading System Based on VixFix and RSI

Publish Date: Jul 21
2 1

Overview
The Adaptive Volatility Momentum Tracking Strategy is a comprehensive quantitative trading system that ingeniously combines three core technical indicators: Williams Vix Fix (WVF) volatility analysis, Relative Strength Index (RSI) momentum filtering, and Hull Moving Average (HMA) trend confirmation. This strategy is brilliantly designed to identify market volatility peaks as potential reversal signals, while utilizing momentum indicators and trend filters to improve signal quality, ultimately protecting profits and controlling risk through an ATR-based trailing stop system. This multi-layered signal confirmation mechanism significantly enhances the reliability of trading decisions, making it particularly suitable for application in highly volatile market environments.

Strategy Principles
The working principle of the strategy is based on the synergistic action of the following key components:

  1. Williams Vix Fix (WVF) Volatility Analysis: This indicator quantifies market volatility through the formula ((highest(close, pd) - low) / highest(close, pd)) * 100. When the WVF value breaks through the upper band (mean plus a multiple of standard deviation) or exceeds the historical percentile high point, it indicates panic selling or overbought/oversold conditions in the market, signaling a potential reversal.

  2. SI Momentum Filtering: The strategy uses different RSI thresholds to distinguish between long and short signals. Long entry requires RSI greater than 35, while short entry requires RSI below 20. This asymmetric design reflects adaptation to the bullish bias in cryptocurrency markets.

  3. HMA Trend Confirmation: The Hull Moving Average (HMA) serves as a trend filter, requiring that the trading direction aligns with the position and slope of the HMA. This ensures trades follow the main trend rather than counter-trend operations.

  4. ATR-Based Trailing Stop Mechanism: The strategy employs a dual protection mechanism, including ATR-based hard stops (to prevent excessive losses in a single trade) and dynamic trailing stops (activated after reaching a minimum profit threshold). Long and short positions have different tracking parameters, reflecting risk characteristics in different market environments.

The specific trading logic is as follows:

  • Long Entry: Triggered when the VixFix indicator shows a volatility peak, RSI is greater than 35, and price is above the HMA.
  • Short Entry: Requires VixFix to show a volatility peak, RSI below 20, price below HMA with negative HMA slope, RSI below its 21-period EMA, price below 100-period EMA, and at least 10 candles since the last short signal.

Strategy Advantages
Through in-depth analysis of the code implementation, this strategy demonstrates the following significant advantages:

  1. Volatility Sensitivity: Using the WVF indicator effectively captures periods of market panic or severe volatility, which are often opportunities for price reversal.

  2. Asymmetric Signal Design: The strategy applies different confirmation criteria for long and short directions, demonstrating a deep understanding of market characteristics. In particular, stricter conditions are imposed on short trades (lower RSI threshold, multiple confirmations, and time filtering), which effectively improves the risk-reward ratio of short trades.

  3. Adaptive Stop-Loss Mechanism: The dynamic trailing stop system automatically adjusts stop-loss positions based on market volatility (ATR), both locking in profits and giving prices sufficient breathing room.

  4. High Risk-Reward Efficiency: Especially for short trades, despite a lower win rate (30%), the average profit is 3.48 times the average loss, making them still significantly valuable in the overall strategy.

  5. Parameter Transparency: The parameters in the code are clearly set, easy to understand and adjust, facilitating further optimization of the strategy and adaptation to different market environments.

Strategy Risks
Despite its sophisticated design, the strategy still has the following potential risks:

  1. Parameter Sensitivity: The strategy relies on multiple key parameters (such as RSI thresholds, ATR multipliers, etc.), small changes in which may significantly impact strategy performance. Robustness testing is recommended to ensure parameter effectiveness across different market environments.

  2. False Breakout Risk: In low-volatility or ranging markets, VixFix may generate false signals. The solution is to introduce additional market structure analysis or volume confirmation.

  3. Stop-Loss Gap Risk: In extreme market conditions or low-liquidity environments, prices may jump past set stop-loss positions, resulting in actual losses exceeding expectations. It is recommended to use limit stop orders rather than market stop orders and consider adding options hedging strategies.

  4. Over-Optimization Risk: The high performance shown in backtesting results may partly stem from overfitting to historical data. Walk-Forward Analysis is recommended to verify the forward-looking validity of the strategy.

  5. Long-Short Performance Imbalance: The significant difference in performance between long and short trades indicates that the strategy may be overly sensitive to certain market characteristics. Consider using different parameter sets for long and short directions, or selectively disabling short trades in specific market environments.

Optimization Directions
Based on code analysis, the following directions can be considered to further optimize the strategy:

  1. Adaptive Parameter System: Introduce parameter adaptation mechanisms based on market volatility or trend strength, allowing key parameters such as RSI thresholds and trailing stop distances to dynamically adjust according to market conditions. This will improve the strategy's adaptability across different market environments.

  2. Multi-Timeframe Analysis: Integrate market trend information from higher timeframes, such as using the 4-hour or daily HMA direction as an additional filter condition, to avoid counter-trend trading.

  3. Volume Confirmation: Add volume anomaly detection to entry conditions to ensure price movements are supported by sufficient market participation, thereby reducing false breakout risk.

  4. Sentiment Indicator Integration: Consider integrating market sentiment indicators (such as funding rates, changes in open interest, etc.) to provide additional market sentiment perspectives, especially for improving the quality of short trades.

  5. Machine Learning Optimization: Use machine learning techniques (such as decision trees or random forests) to identify optimal parameter combinations and potentially discover hidden patterns or trading rules.

  6. Event Filters: Implement event filters based on economic calendars, pausing trading before and after important economic data releases or central bank policy announcements to avoid abnormal volatility risks caused by news events.

Summary
The Adaptive Volatility Momentum Tracking Strategy is a well-designed quantitative trading system that creates a multi-dimensional trading decision framework by cleverly combining volatility analysis, momentum indicators, and trend filtering. The strategy pays special attention to risk management, adopting differentiated long-short trading conditions and dynamic stop-loss mechanisms, demonstrating a profound understanding of market characteristics.

The backtesting results of the strategy show impressive performance, particularly with short trades which, despite a lower win rate, have a superior risk-reward ratio making them a valuable component of the overall strategy. This design embodies the core concept of quantitative trading: not pursuing high win rates in individual trades, but seeking long-term stable positive expectancy.

However, no trading strategy should be viewed as a "black box." The best application of this strategy is to integrate it into a broader risk management framework, combined with fundamental analysis, market sentiment assessment, and appropriate capital management. Through continuous monitoring and adjustment, this strategy has the potential to provide robust trading signals across various market environments.

As market conditions change, continuous optimization and parameter adjustment will be key to maintaining the effectiveness of the strategy. In particular, development toward adaptive parameter systems and multi-timeframe analysis may further improve the strategy's robustness and adaptability.

Strategy source code

/*backtest
start: 2024-07-08 00:00:00
end: 2025-07-04 08:00:00
period: 1h
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"ETH_USDT"}]
*/

//@version=6
strategy("CM_VixFix_RSI_HMA200_TrailStop_vFinal", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=100)

// === INPUTS ===
hmaLen = input.int(200, title="HMA Length")
rsiLen = input.int(14, title="RSI Length")
rsiLongTrigger = input.int(35, title="RSI Long Trigger Level")
rsiShortTrigger = input.int(20, title="RSI Short Trigger Level")

atrLen = input.int(14, title="ATR Length")
atr = ta.atr(atrLen)

// === Long Trailing Parameters
trailTriggerL = input.float(2.5, title="Long Trail Trigger (xATR)")
trailOffsetL  = input.float(1.75, title="Long Trail Offset (xATR)")
hardStopL     = input.float(2.5, title="Long Hard Stop (xATR)")

// === Short Trailing Parameters
trailTriggerS = input.float(1.2, title="Short Trail Trigger (xATR)")
trailOffsetS  = input.float(1.0, title="Short Trail Offset (xATR)")
hardStopS     = input.float(3.0, title="Short Hard Stop (xATR)")
maxBarsShort  = input.int(10, title="Min Bars Between Short Signals")

// === VIX FIX Settings
pd = input.int(22, title="Lookback Period")
bbl = input.int(20, title="Bollinger Length")
mult = input.float(2.0, title="StdDev Multiplier")
lb = input.int(50, title="Percentile Lookback")
ph = input.float(0.97, title="Range High Percentile")

// === WVF VixFix
wvf = ((ta.highest(close, pd) - low) / ta.highest(close, pd)) * 100
rangeHigh = ta.percentile_nearest_rank(wvf, lb, ph)
upperBand = ta.sma(wvf, bbl) + ta.stdev(wvf, bbl) * mult
vixSpike = wvf >= upperBand or wvf >= rangeHigh

// === HMA & RSI & Filters
wma1 = ta.wma(close, hmaLen / 2)
wma2 = ta.wma(close, hmaLen)
diff = 2 * wma1 - wma2
hma = ta.wma(diff, math.round(math.sqrt(hmaLen)))
hmaSlope = hma - hma[5]
plot(hma, title="HMA", color=color.orange, linewidth=2)

rsi = ta.rsi(close, rsiLen)
rsiEMA = ta.ema(rsi, 21)
priceEMA = ta.ema(close, 100)

// === State Variables
var float entryL = na
var float peakL  = na
var bool  trailL = false

var float entryS = na
var float lowS   = na
var bool  trailS = false
var int   lastShortBar = na

// === LONG ENTRY ===
longCondition = vixSpike and rsi > rsiLongTrigger and close > hma

if (longCondition and strategy.position_size == 0)
    strategy.entry("Long", strategy.long)
    entryL := close
    trailL := false
    peakL := close

if (strategy.position_size > 0)
    peakL := math.max(peakL, high)
    if not trailL and close >= entryL + trailTriggerL * atr
        trailL := true
    if not trailL and close <= entryL - hardStopL * atr
        strategy.close("Long", comment="HardStopL")
    if trailL and close <= peakL - trailOffsetL * atr
        strategy.close("Long", comment="TrailStopL")

// === SHORT ENTRY ===
shortBase = vixSpike and rsi < rsiShortTrigger and close < hma and hmaSlope < 0
shortFilter = rsi < rsiEMA and close < priceEMA
canShort = na(lastShortBar) or (bar_index - lastShortBar > maxBarsShort)
shortCondition = shortBase and shortFilter and canShort

if (shortCondition and strategy.position_size == 0)
    strategy.entry("Short", strategy.short)
    entryS := close
    trailS := false
    lowS := close
    lastShortBar := bar_index

if (strategy.position_size < 0)
    lowS := math.min(lowS, low)
    if not trailS and close <= entryS - trailTriggerS * atr
        trailS := true
    if not trailS and close >= entryS + hardStopS * atr
        strategy.close("Short", comment="HardStopS")
    if trailS and close >= lowS + trailOffsetS * atr
        strategy.close("Short", comment="TrailStopS")
Enter fullscreen mode Exit fullscreen mode

Strategy parameters

The original address: Adaptive Volatility Momentum Tracking Strategy: A Composite Trading System Based on VixFix and RSI

Comments 1 total

  • Raxrb Kuech
    Raxrb KuechJul 22, 2025

    This strategy feels like it’s got anxiety radar built in—“Is the market freaking out? Let’s track it!” 😂 Love the combo of VIXFix and RSI—it’s like pairing a market mood ring with a momentum detector. Definitely trying this out… anything that helps me avoid jumping in right before the dump is a win in my book 😅

Add comment