モメント トレンド トラッキング 戦略

作者: リン・ハーンチャオチャン,日付: 2024-01-04 15:28:06
タグ:

img

概要

モメント・トレンド・トラッキング・ストラテジー (Momentum Trend Tracking Strategy) は,トレンドを特定するために相対強度指数 (RSI),ストカスティック指数,モメント指数を使用する戦略である.複数の指標からの信号を良好なバックテスト結果と組み合わせ,中長期保有に適している.

戦略の論理

この戦略は,まずそれぞれ9期間のRSI,ストーカスティック,モメント指標を計算する.その後,ストーカスティックをRSIで掛け,モメントで割ってKNRPと呼ばれる組み合わせ指標を得ます.この指標は複数のサブインジケーターからの情報を同時に反映します.

その後,KNRPの2期移動平均が計算されます.この移動平均が前の値を超えたり下回ったときに取引信号が生成されます.つまり,平均が前期よりも大きいときロングになり,前期よりも小さいときショートになります.この信号はKNRP指標の短期トレンドを反映します.

利点分析

この戦略の最大の利点は,指標の設計が合理的で,複数の技術指標からの情報を効果的に組み合わせ,トレンド方向を正確に決定することです.単一の指標と比較して,誤った信号の可能性を軽減し,信号の信頼性を向上させます.

さらに,トレンドを決定する戦略の主な基盤は,KNRPの移動平均値であり,高値と低値を追求するリスクを避け,トレンド取引の概念に合致しています.また,パラメータはユーザーが自分のスタイルに応じて調整できるように柔軟です.

リスク分析

この戦略の主なリスクは,組み合わせ指標自体にある.組み合わせ方法が不適切であれば,異なる指標の間に衝突が発生する可能性があります.これは誤った信号を増やし,戦略のパフォーマンスに影響します.また,不適切なパラメータ設定も結果により大きな影響を与えます.

リスクを軽減するために,パラメータを最適化し,戦略指標と全体的なバックテスト結果に対する異なるパラメータ長さや組み合わせの影響をテストすることが推奨されます.また,パラメータ安定に対する長期市場状況の影響を注意する必要があります.

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

この戦略を最適化できる主な側面は以下の通りです.

  1. 傾向を決定するより効果的な方法を見つけるために,より多くの種類の技術指標の組み合わせをテストする

  2. 現在の市場状況に適した値を見つけるために指標パラメータを最適化

  3. ストップ・ロスト/リターン・テイク・ロジックを追加して,利益を固定し,損失を減らす

  4. 中長期戦略としてのパフォーマンスを評価するために,日日または週毎の長時間枠でのテスト

  5. ポジションを市場状況に基づいて調整するためのポジションサイズ化モジュールを追加する

概要

モメント・トレンド・トラッキング・ストラテジー (Momentum Trend Tracking Strategy) は,一般的に比較的安定した信頼性の高いトレンド・ストラテジーである.単一の指標が誤ったシグナルに弱いという問題を解決し,重量化された複数の指標を通じてトレンドを効果的に決定する.パラメータは柔軟で,技術指標トレーダーに適した大きな最適化スペースを有する.さらなる改善により,この戦略は持てる価値のある長期的定量戦略になる可能性がある.


/*backtest
start: 2022-12-28 00:00:00
end: 2024-01-03 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=4
////////////////////////////////////////////////////////////
//  Copyright by HPotter v1.0 27/07/2021
// To calculate the coordinates in which the kink of the line will cross, 
//the standard Forex instruments are used - Relative Strenght Index, Stochastic and Momentum.
//It is very easy to optimize them for the existing trading strategy: they all have very 
//flexible and easily customizable parameters. Signals to enter the market can be 2 situations:
//    Change of color of the indicator line from red to blue. At the same time, it is worth entering into the purchase;
//    Change of color of the indicator line from blue to red. In this case, it is worth entering for sale.
//The signals are extremely clear and can be used in practice even by beginners. The indicator 
//itself shows when to make deals: the user only has to accompany them and set the values 
//of Take Profit and Stop Loss. As a rule, the signal to complete trading is the approach of 
//the indicator level to the levels of the maximum or minimum of the previous time period.  
////////////////////////////////////////////////////////////
strategy(title="Kwan NRP Backtest", shorttitle="KNRP")
xPrice = open
Length_Momentum = input(9, minval=1)
Length_RSI = input(9, minval=1)
Length_Stoch = input(9, minval = 1)
Length_NRP = input(2, minval=1)
reverse = input(false, title="Trade reverse")
var xKNRP = array.new_float(1,na)
xMom = close / close[Length_Momentum] * 100
xRSI = rsi(xPrice, Length_RSI)
xStoch = stoch(xPrice, high, low, 9)
if xMom != 0 
    val=xStoch*xRSI/xMom
    array.push(xKNRP,val)  
    nz(na)
avr = 0.0    
if array.size(xKNRP) > Length_NRP
    for i = array.size(xKNRP)-Length_NRP to array.size(xKNRP)-1
	    avr+= array.get(xKNRP, i)
    nz(na)	    
avr := avr / Length_NRP	
clr = avr > avr[1] ? color.blue : color.red
pos = iff(avr > avr[1] , 1,
	   iff(avr < avr[1], -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)	 
if (possig == 0) 
    strategy.close_all()
barcolor(possig == -1 ? #b50404: possig == 1 ? #079605 : #0536b3 )
plot(avr, color=clr, title="RMI")

もっと