ウィリアムズVIX修復戦略


作成日: 2023-09-28 15:29:48 最終変更日: 2023-09-28 15:29:48
コピー: 0 クリック数: 1585
1
フォロー
1621
フォロワー

概要

この戦略は,ウィリアムズVIX修正公式を使用して,ストキャスティックRSIと多空平衡指標を組み合わせて,VIX市場の変動率の予測を実現することを目的としています.隠された多頭差をキャプチャすることによって,市場の底部を位置付け,市場の逆転点の正確な位置を確保します.

戦略原則

この戦略は,主にウィリアムズVIX修正公式と,ストキャスティックRSIとRSI指標の組み合わせに基づいています.

まず,ウィリアムズVIX修復公式を使って,現在の周期のVIX値を計算する.この公式は,最高価格と最低価格の比を計算して,市場の波動率とパニック指数を測定する.ここでは,ブリン帯の上下軌道が設定されている.VIX値が上軌道より高いときは,市場の波動が増加し,投資家はパニックに陥る.下軌道より低いときは,市場の安定性を示す.

第二に,戦略は,RSIとRSI指数との組み合わせを使用しています. RSIは空白状態を判断するために使用され,Stoch RSIは,K線とD線を組み合わせて,RSI指数の反転点の判断を実現します.

最後に,ストックRSIのオーバーバイシグナルを売り基として,ブリン帯の下線より低いVIX値を買い基として,市場逆転のポイントをキャプチャするために,両策を統合する.

優位分析

この戦略の最大の利点は,2つの異なる指標の利点を同時に利用できるという点です.

ウィリアムズVIX修正公式は,市場のパニック感情を効果的に反映することができ,ブリン帯の上下軌道動態の調整は,異なる周期に自律的に適応することができます.ストキャスティックRSI指標は,KとD線の交差によってRSI逆転点の判断を実現し,誤判を回避します.

この2つの組み合わせは,市場の逆転点をより正確に位置づけることができ,市場パニック指数が売り込みシグナルを放つと同時に,Stoch RSIを使用して特定の入場点の位置を判断することができ,誤りを避ける.

リスク分析

この戦略にはいくつかのリスクがあります.

  1. Williams VIX修正公式は,市場のパニック感情を完全に反映できず,ブリン帯のパラメータを不適切に設定すると,誤った信号が生成される可能性がある.

  2. Stoch RSI反転シグナルも間違える可能性があり,他の指標と組み合わせて検証する必要があります.

  3. 戦略は保守的なもので,迅速な動きを把握できなければ,チャンスを逃す可能性がある.

  4. 戦略的な撤収が大きく,慎重にポジション管理を設定する必要があります.

これは,この戦略を使用する際のパラメータを合理的に設定し,他の指標で検証し,リスクを回避するためにポジションの規模を制御する必要があります.

最適化の方向

この戦略は,以下の観点から最適化できる:

  1. ウィリアムズVIX公式のパラメータを最適化して,市場パニックの程度をより正確に反映できるようにする.均線システムなどの指標を組み合わせることを考慮することができる.

  2. ストッチ RSIのパラメータを最適化し,より適切なK・D線周期組合せを探し,反転精度を向上させる.

  3. ポジション管理メカニズムを追加する.例えば,ストップ・ストップを設定する,または,撤回率/率の動向に応じてポジションを調整する.

  4. MACD,KDなどの他の指標と組み合わせて,多指標検証を実現し,誤判のリスクを軽減します.

  5. 機械学習のアルゴリズムを増やし,ビッグデータからトレーニングモデルを活用し,パラメータを自動的に最適化し,戦略の安定性を向上させる.

この戦略の実戦効果と安定性を大幅に向上させることができる.

要約する

ウィリアムズVIX修復戦略は,市場のパニックと安定的な転換を捕捉し,Stoch 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")