윌리엄스 VIX 수정 전략

저자:차오장, 날짜: 2023-09-28 15:29:48
태그:

전반적인 설명

이 전략은 스토카스틱 RSI 및 RSI 지표와 결합한 윌리엄스 Vix Fix 공식을 사용하여 VIX의 시장 변동성을 예측하는 것을 목표로합니다. 시장 바닥을 파악하고 역전 지점을 정확하게 식별하기 위해 숨겨진 상승적 오차를 포착합니다.

전략 논리

이 전략은 주로 윌리엄스 비크스 픽스 공식과 스토카스틱 RSI & RSI 지표의 조합을 기반으로합니다.

첫째, 현재 기간의 VIX 값은 가장 높은 가격과 가장 낮은 가격의 비율을 측정하여 윌리엄스 비크스 고정 공식에 의해 계산됩니다. 이는 시장 변동성과 공황 수준을 나타냅니다. 상부 및 하부 볼링거 대역이 여기에 설정됩니다. VIX 값이 상위 대역보다 높을 때 시장 변동과 투자자 공황이 증가한다는 것을 나타냅니다. 하위 대역보다 낮을 때 안정적인 시장을 나타냅니다.

둘째, 전략은 스토카스틱 RSI와 RSI 지표의 조합을 채택합니다. RSI는 긴 / 짧은 포지션을 결정하는 데 사용되며, Stoch RSI는 K & D 라인을 결합하여 RSI의 반전 지점을 식별합니다.

마지막으로, 전략은 매매의 기초로 스톡 RSI의 과잉 매수 신호와 구매의 기초로 낮은 볼링거 밴드보다 낮은 VIX 값을 모두 통합하여 시장 반전 지점을 포착합니다.

이점 분석

이 전략의 가장 큰 장점은 두 가지 다른 지표의 강점을 조합하여 활용할 수 있다는 것입니다.

윌리엄스 비크스 픽스 공식은 시장 공황 감정을 효과적으로 반영 할 수 있습니다. 볼링거 밴드의 동적 조정은 다른 주기에 적응 할 수 있습니다. 스토카스틱 RSI는 잘못된 신호를 피하면서 K & D 라인의 교차를 통해 RSI 반전 지점을 식별합니다.

이 두 가지 결합은 시장 반전 지점을 더 정확하게 찾을 수 있습니다. 잘못된 입력을 피하기 위해 특정 입구 지점을 결정하기 위해 스톡 RSI를 활용하면서 시장 공황 지수가 신호를 발표 할 때 판매 신호를 생성합니다.

위험 분석

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

  1. 윌리엄스 비크스 픽스 공식은 시장의 공황 감정을 완전히 반영 할 수 없습니다. 볼링거 밴드의 부적절한 매개 변수는 잘못된 신호를 생성 할 수 있습니다.

  2. 스톡 RSI의 반전 신호는 또한 잘못된 것일 수 있으며 다른 지표와 검증되어야합니다.

  3. 이 전략은 상대적으로 보수적이며 빠르게 변화하는 시장을 적시에 추적하지 못하면 기회를 놓칠 수 있습니다.

  4. 이 전략은 더 큰 마감률을 가질 수 있어 신중한 포지션 크기를 필요로 합니다.

우리는 이 전략을 사용할 때 위험을 줄이기 위해 합리적으로 매개 변수를 설정하고 다른 지표와 확인하고 지점 크기를 제어해야합니다.

최적화 방향

이 전략을 최적화하는 몇 가지 방법:

  1. 시장 공황 수준을 더 정확하게 반영하기 위해 윌리엄스 비크스 공식의 매개 변수를 최적화하십시오. 이동 평균의 조합을 고려 할 수 있습니다.

  2. 더 높은 반전 정확성을 위해 K & D 기간의 더 나은 조합을 찾기 위해 스톡 RSI의 매개 변수를 최적화하십시오.

  3. 포지션 사이즈 메커니즘을 추가합니다. Stop Loss/Take Profit, 또는 Drawdown/Profit 비율에 기반한 동적 포지션 조정.

  4. MACD, KD와 같은 다른 지표를 통합하여 멀티 지표 검증을 실현하고 잘못된 신호를 줄이십시오.

  5. 머신러닝 알고리즘을 추가하고 빅데이터를 사용하여 모델을 훈련시키고 자동으로 매개 변수를 최적화하여 안정성을 향상시킵니다.

위의 최적화를 통해 전략의 성능과 안정성이 크게 향상될 수 있습니다.

결론

윌리엄스 비크스 픽스 전략은 시장 공황과 안정성 전환을 포착하고 특정 입구 지점을 결정하고 효과적으로 시장 바닥을 파악하기 위해 스톡 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")

    


더 많은