This strategy is a quantitative trading system based on the behavior of the Volatility Index (VIX) relative to its 10-day moving average. The strategy utilizes the deviation between VIX and its moving average as trading signals, combining technical analysis and statistical arbitrage concepts. The core idea is to capture extreme changes in market sentiment by trading when VIX shows significant deviations and waiting for mean reversion.
The strategy employs a bi-directional trading mechanism with both long and short dimensions: Long conditions require VIX’s low to be above its 10-day moving average, and the closing price must be at least 10% above the moving average. When both conditions are met, the system generates a buy signal at market close. Short conditions require VIX’s high to be below its 10-day moving average, and the closing price must be at least 10% below the moving average. When both conditions are met, the system generates a sell signal at market close. Exit rules are also based on VIX’s relationship with the moving average: long positions are closed when VIX trades below the previous day’s 10-day moving average intraday; short positions are closed when VIX trades above the previous day’s 10-day moving average intraday.
This strategy is a mean reversion strategy based on market volatility, using quantitative methods to capture extreme changes in market sentiment. The strategy has clear trading rules and risk control mechanisms but requires attention to how changing market environments affect strategy performance. Through continuous optimization and improvement, this strategy has the potential to maintain stable performance across different market conditions.
/*backtest start: 2019-12-23 08:00:00 end: 2024-12-09 08:00:00 period: 1d basePeriod: 1d exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}] */ // This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/ // © EdgeTools //@version=5 strategy("Connors VIX Reversal III invented by Dave Landry", overlay=true) // Inputs vixSymbol = input("swap", "VIX Symbol") lengthMA = input(10, title="Length of Moving Average") percentThreshold = input(10, title="Percentage Threshold") buyColor = input(color.rgb(0, 255, 0,90), title="Buy Signal Color") sellColor = input(color.rgb(255, 0, 0,90), title="Sell Signal Color") exitColor = input(color.rgb(0, 0, 255,90), title="Exit Signal Color") // Fetch VIX data vixClose = request.security(vixSymbol, "D", close) vixHigh = request.security(vixSymbol, "D", high) vixLow = request.security(vixSymbol, "D", low) // Calculate 10-day Moving Average of VIX vixMA = ta.sma(vixClose, lengthMA) // Calculate yesterday's 10-day Moving Average vixMA_yesterday = ta.sma(vixClose[1], lengthMA) // Buy Rules buyCondition1 = vixLow > vixMA buyCondition2 = vixClose > vixMA * (1 + percentThreshold / 100) buySignal = buyCondition1 and buyCondition2 // Sell Rules sellCondition1 = vixHigh < vixMA sellCondition2 = vixClose < vixMA * (1 - percentThreshold / 100) sellSignal = sellCondition1 and sellCondition2 // Exit Rules buyExit = vixLow < vixMA_yesterday sellExit = vixHigh > vixMA_yesterday // Plot Buy/Sell Signals bgcolor(buySignal ? buyColor : na) bgcolor(sellSignal ? sellColor : na) // Exit Signals bgcolor(buyExit ? exitColor : na) bgcolor(sellExit ? exitColor : na) // Strategy if (buySignal) strategy.entry("Buy", strategy.long) if (sellSignal) strategy.entry("Sell", strategy.short) if (buyExit) strategy.close("Buy") if (sellExit) strategy.close("Sell")