
この戦略は,ブリン帯と日内強度指数に基づく平均値回帰戦略である.これは,価格がブリン帯を突破して下線を走るのを利用し,取引量指数日内強度指数と組み合わせて,入場タイミングを判断する.戦略の優位性は,価格の平均回帰特性を利用して,量能指数と組み合わせてフィルター信号を利用する.しかし,また,回転が大きくなり,利益が長くなるというリスクもある.
この戦略は,ブリン帯の中軌道,上軌道,下軌道を最初に計算する. 中軌道は,閉店価格のシンプル移動平均または指数移動平均である. 上下軌は,標準差を計算して,中軌道上の下減標準差の2倍を加算して構築する. 価格が下軌を突破したときに平均値の戻りをする機会として,多ポジションを取る. 価格が上軌を突破したときに,価格が平均値から過剰に偏っているとして,空のポジションを取る.
策略は,判断の補助指標として,日中の強度指数を導入した.この指数は,価格情報と取引量情報を組み合わせている.指数が正値であるときは,買力の強化を表示し,多ポジションの信号として.指数が負値であるときは,売り力の強化を表示し,空ポジションの信号として.
ポジション開設の面で,戦略は,価格がブリン帯を突破して下落すると同時に,日内強度指数の判断指標を必要とします.ストップの面で,戦略は時間をかけてストップし,一定の周期を超えた後に利益を得られなければ,ストップを退出することを選択します.
この策略の最大の利点は,価格の平均回帰特性を利用して利益を得ることである.価格が大きな偏差が発生すると,統計法則に従って,価格が平均軸に回帰する確率は大きい.これは,策略の動作のための理論的基礎を提供している.
もう一つの優点は,取引量指数日間の強度指数が策略に加えられ,価格信号をフィルターするということです.取引量が価格信号の有効性を証明します.これは,いくつかの価格の激しい揺れで取引量不足の場合,誤った信号を生じることを避けます.
この策略は,価格が平均に戻る確率のイベントに依存して利益を得るが,市場の価格のランダムな動きも,ストップロスが引き出され,損失を招く可能性がある.これは平均回帰策が一般的に直面するリスクである.
もう一つの主要なリスクは,価格が平均値に戻ることは,それ自体が長い周期的なプロセスであることです.投資家の場合,資金はしばらくの間閉じ込められることがあります.この時間のリスクは,投資家が他のより良い投資機会を失う可能性があります.
この戦略は以下の点で最適化できます.
ブリン帯のパラメータ,調整周期,標準差指標を最適化して,異なる市場の変動環境に適応する
滑らかさを高めるために,線形加重移動平均などの他の移動平均を試してみましょう.
取引量指標の他のタイプを試し,よりよい取引量確認信号を探してください.
ストップ・ストップ・ストップの策略を組み込み,単一のオーダーの最大損失を制御します.
この戦略は全体として典型的な平均回帰戦略である。確率イベントに依存して利益を得ているが,リスクも同様に明らかである。パラメータ調整,指標最適化によってより良い結果を得ることが可能である。しかし,投資家にとって,この戦略の正しい属性を把握することがも鍵である。
/*backtest
start: 2024-01-20 00:00:00
end: 2024-02-19 00:00:00
period: 2h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=4
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// Bollinger Bands Strategy with Intraday Intensity Index
// by SparkyFlary
//For Educational Purposes
//Results can differ on different markets and can fail at any time. Profit is not guaranteed.
strategy(title="Bollinger Bands Strategy with Intraday Intensity Index", shorttitle="Bollinger Bands Strategy", overlay=true)
BBlength = input(20, title="Bollinger Bands length")
BBmaType = input("SMA", title="Bollinger Bands MA type", type=input.string, options=["SMA", "EMA"])
BBprice = input(close, title="source")
timeStop = input(10, title="Time-based stop length")
BBmult = input(2.0, title="Bollinger Bands Standard Deviation")
withIII = input(true, title="with Intraday Intensity Index?")
IIIlength = input(21, title="Intraday Intensity Index length")
//function for choosing moving averages
f_ma(type, src, len) =>
float result = 0
if type == "SMA"
result := sma(src, len)
if type == "EMA"
result := ema(src, len)
result
//Intraday Intensity Index
k1 = (2 * close - high - low) * volume
k2 = high != low ? high - low : 1
i = k1 / k2
iSum = sum(i, IIIlength)
//Bollinger Bands
BBbasis = f_ma(BBmaType, BBprice, BBlength)
BBdev = BBmult * stdev(BBprice, BBlength)
BBupper = BBbasis + BBdev
BBlower = BBbasis - BBdev
plot(BBupper, title="Bollinger Bands Upper Line")
plot(BBlower, title="Bollinger Bands Lower Line")
plot(BBbasis, title="Bollinger Bands Mid line", color=color.maroon)
//Strategy
buy = close[1]<BBlower[1] and close>BBlower and (withIII ? iSum>0 : 1)
sell = close>BBbasis or buy[timeStop] or (strategy.openprofit>0 and buy==0 and buy[1]==0 and buy[2]==0 and buy[3]==0)
short = close[1]>BBupper[1] and close<BBupper and (withIII ? iSum<0 : 1)
cover = close<BBbasis or short[timeStop] or (strategy.openprofit>0 and short==0 and short[1]==0 and short[2]==0 and short[3]==0)
strategy.entry(id="enter long", long=true, when=buy)
strategy.close(id="enter long", comment="exit long", when=sell)
strategy.entry(id="enter short", long=false, when=short)
strategy.close(id="enter short", comment="exit short", when=cover)