윌리엄스 VIX 수리 전략


생성 날짜: 2023-09-28 15:29:48 마지막으로 수정됨: 2023-09-28 15:29:48
복사: 0 클릭수: 1585
avatar of ChaoZhang ChaoZhang
1
집중하다
1621
수행원

개요

이 전략은 윌리엄스 VIX 수리 공식을 통해 스토카스틱 RSI와 다공평 균형 지표와 결합하여 VIX 시장의 변동률에 대한 예측을 실현하기 위해 고안되었습니다. 숨겨진 다공평을 포착하여 시장의 바닥을 위치시키고 시장의 전환점을 정확하게 파악합니다.

전략 원칙

이 전략은 주로 윌리엄스 VIX 수리 공식과 스토카스틱 RSI와 RSI 지표의 조합을 기반으로 한다.

먼저, 윌리엄스 VIX 수리 공식을 통해 현재 주기의 VIX 값을 계산한다. 이 공식은 최고 가격과 최저 가격의 비율을 계산하여 시장의 변동율과 공포 지수를 측정한다. 여기에 브린 밴드의 상하 궤도를 설정하고, VIX 값이 상하 궤도보다 높으면 시장의 변동성이 증가하고, 투자자는 공포를 나타냅니다. 하하 궤도보다 낮으면 시장의 안정성을 나타냅니다.

두 번째로, 전략은 스토카스틱 RSI와 RSI 지표의 조합을 사용합니다. RSI는 빈도를 판단하는 데 사용되며, 스토크 RSI는 K선과 D선을 결합하여 RSI 지표의 전환점을 판단합니다.

마지막으로, 전략은 두 가지를 통합하여, 스토흐 RSI의 오버 바이 신호를 판매 근거로, 부린 반도 아래의 VIX 값을 구매 근거로 사용하여 시장의 역전점을 포착합니다.

우위 분석

이 전략의 가장 큰 장점은 두 가지 다른 지표의 장점을 동시에 사용할 수 있다는 것입니다.

윌리엄스 VIX 수리 공식은 시장의 공포 정서를 효과적으로 반영할 수 있으며, 브린 밴드의 상하의 궤도 동적 조정은 다른 주기에 적응할 수 있다. 스토카스틱 RSI 지표는 K, D 선의 교차를 통해 RSI 역점에 대한 판단을 구현하여 잘못된 판단을 방지한다.

이 둘을 결합하여, 시장의 반전점을 더 정확하게 위치시킬 수 있으며, 시장 공포 지수가 판매 신호를 방출하는 동시에, 스토흐 RSI를 사용하여 구체적인 진입점 지점을 판단할 수 있으며, 오해를 피할 수 있다.

위험 분석

이 전략에는 위험도 있습니다.

  1. 윌리엄스 VIX 수리 공식은 시장의 공포 정서를 완전히 반영하지 못하며, 부린 띠 파라미터를 잘못 설정하면 잘못된 신호가 발생할 수 있다.

  2. Stoch RSI 역전 신호 역시 오류가 있을 수 있으며, 다른 지표의 조합으로 검증해야 한다.

  3. 이 전략은 매우 보수적이어서, 빠른 속도로 움직이지 않으면 기회를 놓칠 수 있다.

  4. 전략적 인 철수는 더 큰 가능성이 있으며, 신중하게 위치 관리를 설정해야 합니다.

이것은 우리가 이 전략을 사용할 때, 합리적으로 매개 변수를 설정하고, 다른 지표와 함께 검증하는 것을 요구하며, 위험을 회피하기 위해 포지션 규모를 통제하는 것을 요구합니다.

최적화 방향

이 전략은 다음과 같은 부분에서 최적화 될 수 있습니다.

  1. 윌리엄스 VIX 공식의 파라미터를 최적화하여 시장의 공포도를 더 정확하게 반영할 수 있습니다. 평평선 시스템과 같은 지표를 조합하는 것을 고려할 수 있습니다.

  2. 스토치 RSI의 파라미터를 최적화하여 K, D 선의 주기 조합을 더 잘 찾아서 역전 정확도를 향상시킨다.

  3. 포지션 관리 메커니즘을 추가합니다. 예를 들어, 스톱로스 스톱을 설정하거나, 회수율/이익률 동력에 따라 포지션을 조정합니다.

  4. MACD, KD 등과 결합하여 다중 지표 검증을 구현하여 잘못된 판단의 위험을 줄일 수 있습니다.

  5. 기계 학습 알고리즘을 추가하고, 빅데이터 트레이닝 모델을 활용하여, 자동으로 매개 변수를 최적화하고, 전략의 안정성을 향상시킵니다.

위와 같은 몇 가지 최적화를 통해 전략의 실전 효과와 안정성을 크게 향상시킬 수 있다.

요약하다

윌리엄스 VIX 수리 전략은 시장의 공포와 안정적인 전환을 포착하고, 특정 진입 시기를 판단하기 위해 스토흐 RSI를 사용하여 시장의 바닥에 대한 효과적인 지지를 실현합니다. 전략의 장점은 지표 조합을 사용하는 데 있지만, 또한 위험이 있습니다. 우리는 매개 변수 최적화와 다중 지표 검증을 통해 전략 효과를 강화하여 지표 시장 역전의 효과적인 도구로 만들 수 있습니다.

전략 소스 코드
/*backtest
start: 2022-09-21 00:00:00
end: 2023-09-27 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=4
//Divergence and Hidden Divergence correlating with the Money Flow Index

strategy("Vix FIX / StochRSI Strategy", pyramiding=9, initial_capital=10000, default_qty_type=strategy.percent_of_equity,overlay=false)

///////////// Stochastic Slow
Stochlength = input(14, minval=1, title="lookback length of Stochastic")
StochOverBought = input(80, title="Stochastic overbought condition")
StochOverSold = input(20, title="Stochastic oversold condition")
smoothK = input(3, title="smoothing of Stochastic %K ")
smoothD = input(3, title="moving average of Stochastic %K")
k = sma(stoch(close, high, low, Stochlength), smoothK)
d = sma(k, smoothD)

 
///////////// RSI 
RSIlength = input( 14, minval=1 , title="lookback length of RSI")
RSIOverBought = input( 70  , title="RSI overbought condition")
RSIOverSold = input( 30  , title="RSI oversold condition")
RSIprice = close
vrsi = rsi(RSIprice, RSIlength)

///////////// Double strategy: RSI strategy + Stochastic strategy

pd = input(22, title="LookBack Period Standard Deviation High")
bbl = input(20, title="Bolinger Band Length")
mult = input(2.0    , minval=1, maxval=5, title="Bollinger Band Standard Devaition Up")
lb = input(50  , title="Look Back Period Percentile High")
ph = input(.85, title="Highest Percentile - 0.90=90%, 0.95=95%, 0.99=99%")
new = input(false, title="-------Text Plots Below Use Original Criteria-------" )
sbc = input(false, title="Show Text Plot if WVF WAS True and IS Now False")
sbcc = input(false, title="Show Text Plot if WVF IS True")
new2 = input(false, title="-------Text Plots Below Use FILTERED Criteria-------" )
sbcFilt = input(true, title="Show Text Plot For Filtered Entry")
sbcAggr = input(true, title="Show Text Plot For AGGRESSIVE Filtered Entry")
ltLB = input(40, minval=25, maxval=99, title="Long-Term Look Back Current Bar Has To Close Below This Value OR Medium Term--Default=40")
mtLB = input(14, minval=10, maxval=20, title="Medium-Term Look Back Current Bar Has To Close Below This Value OR Long Term--Default=14")
str = input(3, minval=1, maxval=9, title="Entry Price Action Strength--Close > X Bars Back---Default=3")
//Alerts Instructions and Options Below...Inputs Tab
new4 = input(false, title="-------------------------Turn On/Off ALERTS Below---------------------" )
new5 = input(false, title="----To Activate Alerts You HAVE To Check The Boxes Below For Any Alert Criteria You Want----")
sa1 = input(false, title="Show Alert WVF = True?")
sa2 = input(false, title="Show Alert WVF Was True Now False?")
sa3 = input(false, title="Show Alert WVF Filtered?")
sa4 = input(false, title="Show Alert WVF AGGRESSIVE Filter?")

//Williams Vix Fix Formula
wvf = ((highest(close, pd)-low)/(highest(close, pd)))*100
sDev = mult * stdev(wvf, bbl)
midLine = sma(wvf, bbl)
lowerBand = midLine - sDev
upperBand = midLine + sDev
rangeHigh = (highest(wvf, lb)) * ph

//Filtered Bar Criteria
upRange = low > low[1] and close > high[1]
upRange_Aggr = close > close[1] and close > open[1]
//Filtered Criteria
filtered = ((wvf[1] >= upperBand[1] or wvf[1] >= rangeHigh[1]) and (wvf < upperBand and wvf < rangeHigh))
filtered_Aggr = (wvf[1] >= upperBand[1] or wvf[1] >= rangeHigh[1]) and not (wvf < upperBand and wvf < rangeHigh)

//Alerts Criteria
alert1 = wvf >= upperBand or wvf >= rangeHigh ? 1 : 0
alert2 = (wvf[1] >= upperBand[1] or wvf[1] >= rangeHigh[1]) and (wvf < upperBand and wvf < rangeHigh) ? 1 : 0
alert3 = upRange and close > close[str] and (close < close[ltLB] or close < close[mtLB]) and filtered ? 1 : 0
alert4 = upRange_Aggr and close > close[str] and (close < close[ltLB] or close < close[mtLB]) and filtered_Aggr ? 1 : 0

//Coloring Criteria of Williams Vix Fix
col = wvf >= upperBand or wvf >= rangeHigh ? lime : gray

isOverBought = (crossover(k,d) and k > StochOverBought) ? 1 : 0
isOverBoughtv2 = k > StochOverBought ? 1 : 0
filteredAlert = alert3 ? 1 : 0
aggressiveAlert = alert4 ? 1 : 0

plot(isOverBought, "Overbought / Crossover", style=line, color=red) 
plot(filteredAlert, "Filtered Alert", style=line, color=fuchsia) 
plot(aggressiveAlert, "Aggressive Alert", style=line, color=orange)

if (filteredAlert or aggressiveAlert)
    strategy.entry("Long", strategy.long)

if (isOverBought)
    strategy.close("Long")