コモディティ・モメントムインデックス戦略

作者: リン・ハーンチャオチャン, 日付: 2023-11-28 16:27:55
タグ:

img

概要

商品選択指数 (CSI) 戦略は,市場の勢いを追跡する短期的取引戦略である.この戦略は,取引のための商品の傾向と変動性を計算することによって,強い勢いを有する商品を特定する.この戦略は,ウェルズ・ワイルダーが彼の著書"技術取引システムにおける新しい概念"で提案した.

戦略原則

この戦略の核心指標はCSI指数で,商品の動向と変動を考慮する.具体的計算方法は:

CSI = K × ATR × ((ADX + ADX の n 日移動平均値) /2)

Kがスケーリング因数である場合,ATRは市場変動を測定する平均の真の範囲を表し,ADXは市場の傾向を反映する平均の指数を表します.

各商品のCSIインデックス値を計算し,n日間の単純な移動平均値と比較することで,CSIが移動平均値よりも高くなったときに購入信号が生成され,CSIが移動平均値よりも低くなったときに販売信号が生成されます.

この戦略は,比較的高いCSIインデックスを持つ商品を選びます. これらの商品は,短期的により大きな利益の可能性を生む非常に強い傾向と変動を持っています.

利点分析

この戦略には以下の利点があります.

  1. 市場の勢いを把握し,商品の傾向と変動性を最大限に活用する.
  2. 取引シグナルをより信頼性のあるものにするために二重指標を使用します.
  3. アルゴリズム取引に適したシンプルで明確な取引規則
  4. 短期間の取引のために 特別に設計され 短期間の機会を 迅速に把握できます

リスク分析

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

  1. 過剰に技術指標に依存しているため,誤った信号が発生する可能性があります.
  2. 短時間操作に適している
  3. 過剰な変動はストップロスを引き起こす可能性があり,取引に損失をもたらします.
  4. ある程度のレバレッジに耐える必要があり,それにより資本リスクが高くなる.

リスクを制御するために,ストップ・ロスのポジションは合理的に設定され,単一のポジションのサイズが制御され,パラメータは異なる市場環境に適するように適切に調整されるべきです.

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

戦略は以下の側面で最適化できます.

  1. 最適なパラメータを見つけるために より多くのパラメータの組み合わせをテストします
  2. シグナルフィルタリングのための他の補助指標を追加する.
  3. 波動性逆転などの他の戦略と組み合わせてポートフォリオを形成します
  4. 機械学習を使って モデルを訓練し より信頼性の高い取引信号を生成します

結論

コモディティモメントインデックス戦略は,市場における強いトレンドと高い変動性を持つコモディティを捕獲することによって,シンプルで高速な短期取引を実現する.モメントを追跡するこの専門的なアプローチは,その信号を明確にしてアルゴリズム的に実装しやすくします.もちろん,リスク管理にも注意を払い,市場の状況の変化に適応するために改善とアップグレードを続けることが必要です.


/*backtest
start: 2023-10-28 00:00:00
end: 2023-11-27 00:00:00
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=3
////////////////////////////////////////////////////////////
//  Copyright by HPotter v1.0 20/03/2019
// The Commodity Selection Index ("CSI") is a momentum indicator. It was 
// developed by Welles Wilder and is presented in his book New Concepts in 
// Technical Trading Systems. The name of the index reflects its primary purpose. 
// That is, to help select commodities suitable for short-term trading.
// A high CSI rating indicates that the commodity has strong trending and volatility 
// characteristics. The trending characteristics are brought out by the Directional 
// Movement factor in the calculation--the volatility characteristic by the Average 
// True Range factor.
// Wilder's approach is to trade commodities with high CSI values (relative to other 
// commodities). Because these commodities are highly volatile, they have the potential 
// to make the "most money in the shortest period of time." High CSI values imply 
// trending characteristics which make it easier to trade the security.
// The Commodity Selection Index is designed for short-term traders who can handle 
// the risks associated with highly volatile markets.
//
// WARNING:
// - For purpose educate only
// - This script to change bars colors.
////////////////////////////////////////////////////////////
fADX(Len) =>
    up = change(high)
    down = -change(low)
    trur = rma(tr, Len)
    plus = fixnan(100 * rma(up > down and up > 0 ? up : 0, Len) / trur)
    minus = fixnan(100 * rma(down > up and down > 0 ? down : 0, Len) / trur)
    sum = plus + minus 
    100 * rma(abs(plus - minus) / (sum == 0 ? 1 : sum), Len)

strategy(title="Commodity Selection Index Backtest", shorttitle="CSI Backtest")
PointValue = input(50)
Margin = input(3000)
Commission = input(10)
Length = input(14)
reverse = input(false, title="Trade reverse")
K = 100 * ((PointValue / sqrt(Margin) / (150 + Commission)))
xATR = atr(Length)
xADX = fADX(Length)
nADXR = (xADX + xADX[Length]) * 0.5
xCSI = K * xATR * nADXR
xMACSI = sma(xCSI, Length)
pos = 0.0
pos := iff(xCSI < xMACSI, 1,
	   iff(xCSI > xMACSI, -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(xCSI, color=green, title="CSI")
plot(xMACSI, color=red, title="CSI SMA")

もっと