ウィリアムズVIX 修正戦略

作者: リン・ハーンチャオチャン, 日時: 2023-09-28 15:29:48
タグ:

概要

この戦略は,ストカスティックRSIおよびRSI指標と組み合わせたウィリアムズVIX固定式を使用して,VIXの市場の変動を予測することを目的としています. 隠された上昇差異を捕捉し,市場の底部を特定し,逆転点を正確に特定します.

戦略の論理

この戦略は主にウィリアムズ・ヴィックス・フィックス公式とストカスティックRSI&RSI指標の組み合わせに基づいています.

まず,当期のVIX値は,市場変動とパニックレベルを表す最高価格と最低価格の比率を測定することによってウィリアムズ・ヴィックス・フィックス式で計算される.上位および下位ボリンジャー帯はここに設定され,VIX値が上位帯よりも高くなったとき,それは市場の変動と投資家のパニックの増加を示唆する.下位帯よりも低いとき,それは安定した市場を表す.

第二に,戦略はストカスティックRSIとRSI指標の組み合わせを採用する.RSIはロング/ショートポジションを決定するために使用され,STOCH RSIはK&Dラインを組み合わせてRSIの逆転点を特定する.STOCH RSIがオーバーボートゾーンから落ちるとセールシグナルが生成される.

最後に,この戦略は,STOCHのRSIの過剰購入信号を販売のベースと,市場逆転点を捕捉するために,ボリンガーバンドの下位より低いVIX値を購入のベースとして両方を統合します.

利点分析

この戦略の最大の利点は,2つの異なる指標の強みを組み合わせて利用できるということです

ウィリアムズ・ヴィックス・フィックス式は,市場のパニック感情を効果的に反映することができる.ボリンガー帯のダイナミック調整は,異なるサイクルに適応することができる.ストカスティックRSIは,誤った信号を避けるため,K&D線のクロスオーバーを通じてRSI逆転点を特定する.

この2つを組み合わせると,市場の逆転点をより正確に位置付けることができます. 市場パニックインデックスがシグナルをリリースするときに,誤ったエントリを避けるために特定のエントリーポイントを決定するためにストックRSIを使用しながら,販売信号を生成します.

リスク分析

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

  1. ウィリアムズ・ヴィックス・フィックス式は,市場のパニック感情を完全に反映できない.ボリンガー帯の不適切なパラメータは,間違った信号を生む可能性があります.

  2. ストックRSIの逆転信号も誤りがあり,他の指標で確認する必要がある.

  3. この戦略は比較的保守的で,急激に動いている市場をタイムリーに追跡できない場合,機会を逃す可能性があります.

  4. この戦略は,より大きな引き下げを伴う可能性があるため,慎重にポジションサイズを調整する必要があります.

この戦略を利用する際にリスクを軽減するために 合理的にパラメータを設定し 他の指標と確認し ポジションサイズを制御する必要があります

オプティマイゼーションの方向性

この戦略を最適化する方法:

  1. ウィリアムズ・ヴィックス公式のパラメータを最適化し,市場のパニックレベルをより正確に反映します.移動平均の組み合わせを検討することができます.

  2. ストックRSIのパラメータを最適化して,より高い逆転精度を得るため,K&D期間のより良い組み合わせを見つけます.

  3. ストップ・ロース/テイク・プロフィート,またはドラウダウン/プロフィート比に基づく動的ポジション調整などのポジションサイズメカニズムを追加します.

  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")

    


もっと