エルゴティック・モメント・ディレクション・コンバージェンス・トレーディング・ストラテジー

作者: リン・ハーンチャオチャン,日付: 2024-02-02 10:51:11
タグ:

img

概要

この戦略の名前はErgotic Momentum Direction Convergence Trading Strategy.これはウィリアム・ブラウの著書"モメンタム,ディレクション,ディバージェンス"に記載されている技術指標に基づいて設計された定量的な取引戦略である.この戦略は,株の価格モメンタム指標を計算し,市場のトレンド方向を決定し,価格と指標の間のディバージェンスを見つけ,取引機会をスポットするために,モメンタム,ディレクション,ディバージェンスという3つの重要な側面に焦点を当てている.

戦略の論理

この戦略の基本指標は,Ergotic TSIであり,その計算式は以下のとおりです.

Val1 = 100 * EMA(EMA(EMA(price change, r), s), u)   

Val2 = EMA(EMA(EMA(absolute value of price change, r), s), u))  

Ergotic TSI = If Val2 != 0, Val1/Val2, else 0

r,s,u は平滑パラメータである.この指標は,モメントオシレーター指標に属する価格変化の絶対値に対する価格変化の比率を反映する.次に,EGOTIC TSIの EMA移動平均を信号線として計算する. TSIが信号線を越えたときに長行し,信号線を下回ったときに短行する.

利点分析

この戦略の主な利点は以下の通りです.

  1. 価格変動の傾向を把握する強い能力
  2. 価格変動を適切にフィルタリングする
  3. 相対的に良い差異特性
  4. フレキシブルなパラメータ設定で,スムージングを調整する

リスク分析

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

  1. トレンド逆転点では誤った信号が発生する可能性があります.
  2. 不適切なパラメータ設定は,取引機会を逃すか,誤った信号を増やす可能性があります.
  3. パラメータは,異なる製品と取引環境に適するように適切に調整する必要があります パラメータを最適化し,確認のために他の指標を組み合わせ,ストップ・ロスを設定することでリスクを制御できます.

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

この戦略は,次の側面で最適化できます.

  1. オープン,クローズ,ミッド価格など,さまざまな価格インプットをテストします.
  2. 最適なパラメータ組み合わせを見つけるために,r,s,uパラメータ値を調整
  3. 信号をさらに確認するために他の指標やフィルターを追加する
  4. ストップ・ロストポイントと出口メカニズムを設定する

結論

この戦略は,勢力の変化,トレンド判断,ダイバージェンスの特徴の考慮を統合する. 効率的にトレンド機会を把握することができる. パラメータ最適化,信号フィルタリング,リスク制御方法により,良い戦略パフォーマンスを達成することができる. 全体的に,戦略は合理的に設計され,さらなる研究と実践に価値がある.


/*backtest
start: 2023-01-26 00:00:00
end: 2024-02-01 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version = 2
////////////////////////////////////////////////////////////
//  Copyright by HPotter v1.0 13/12/2016
// r - Length of first EMA smoothing of 1 day momentum        4
// s - Length of second EMA smoothing of 1 day smoothing      8    
// u- Length of third EMA smoothing of 1 day momentum         6  
// Length of EMA signal line                                  3
// Source of Ergotic TSI                                      Close
//
// This is one of the techniques described by William Blau in his book "Momentum,
// Direction and Divergence" (1995). If you like to learn more, we advise you to 
// read this book. His book focuses on three key aspects of trading: momentum, 
// direction and divergence. Blau, who was an electrical engineer before becoming 
// a trader, thoroughly examines the relationship between price and momentum in 
// step-by-step examples. From this grounding, he then looks at the deficiencies 
// in other oscillators and introduces some innovative techniques, including a 
// fresh twist on Stochastics. On directional issues, he analyzes the intricacies 
// of ADX and offers a unique approach to help define trending and non-trending periods. 
//
// You can use in the xPrice any series: Open, High, Low, Close, HL2, HLC3, OHLC4 and ect...
// You can change long to short in the Input Settings
// Please, use it only for learning or paper trading. Do not for real trading.
////////////////////////////////////////////////////////////
strategy(title="Ergotic TSI Strategy Backtest")
r = input(4, minval=1)
s = input(8, minval=1)
u = input(6, minval=1)
SmthLen = input(3, minval=1)
reverse = input(false, title="Trade reverse")
hline(0, color=blue, linestyle=line)
xPrice = close
xPrice1 = xPrice - xPrice[1]
xPrice2 = abs(xPrice - xPrice[1])
xSMA_R = ema(ema(ema(xPrice1,r), s),u)
xSMA_aR = ema(ema(ema(xPrice2, r), s),u)
Val1 = 100 * xSMA_R
Val2 = xSMA_aR
xTSI = iff (Val2 != 0, Val1 / Val2, 0)
xEMA_TSI = ema(xTSI, SmthLen)
pos = iff(xTSI > xEMA_TSI, 1,
	   iff(xTSI < xEMA_TSI, -1, nz(pos[1], 0))) 
possig = iff(reverse and pos == 1, -1,
          iff(reverse and pos == -1, 1, pos))	   
if (possig == 1) 
    strategy.entry("Long", strategy.long)
if (possig == -1)
    strategy.entry("Short", strategy.short)	   	    
barcolor(possig == -1 ? red: possig == 1 ? green : blue )
plot(xTSI, color=green, title="Ergotic TSI")
plot(xEMA_TSI, color=red, title="SigLin")

もっと