モメントアービトラージ戦略 バックテスト分析

作者: リン・ハーンチャオチャン,日付: 2023年10月25日 11時10分59秒
タグ:

img

I. 戦略名

この戦略の主要な特徴を踏まえ,私はそれを"モメンタム仲裁戦略"と呼んでいます.

戦略の概要

この戦略は,チャンド・モメントム・オシレーターを計算し,上値と下値を設定することで取引信号を生成し,利益のための仲介機会を形成します.

戦略の論理

このコードは最初にパラメータ Length,TopBandおよびLowBandを設定し,ここでLengthはモメント計算のための日数を表現し,TopBandとLowBandは上下の値を表します.

xSMA_mom と呼ばれる xMom の移動平均を計算します.

累積モメンタムを計算します. xMomLength.

次に,動量振動器 nRes を計算し,これは xMomLength を xSMA_mom で割って,その後を 100 で増幅した Length で掛けます

nRes と 限界値 の 比較 を 基に,長方向 や 短方向 を 決定 し pos に 保存 する.

最後に,リバース・トレードが有効か否かによって pos を調整し,取引信号 possig を生成し,ロング/ショートエントリを作成します.

IV 戦略の強み

  1. 動向指標を用いて潜在的なトレンドターニングポイントを特定し,トレンドキャッチを有利にします.

  2. 明確なロング/ショート・シグナルを 値フィルタリングと組み合わせて 間違った取引を避ける.

  3. 逆転の取引の論理を適用して逆転の機会を得る.

  4. 調節可能なパラメータ空間が大きく,異なる製品と時間枠に最適化できます.

  5. 視覚化されたパラメータは直感的で,取引の論理を理解しやすい.

V. 戦略リスク

  1. 他の技術指標によって形成された機会を逃す可能性があります.

  2. モメントム・ブレイクは必ずしもトレンドの逆転を意味するものではなく,誤った判断の危険性がある.

  3. リバース・トレーディングは 利益をもたらす可能性はあるが 損失も増やす可能性がある.

  4. パラメータの最適化が不適切である場合,取引が過剰になるか,最良のエントリーポイントが欠けている可能性があります.

  5. 突発的な出来事によって引き起こされる 短期的な動力歪みを フィルタリングする必要があります.

リスクは,シグナル信頼性を確認するために,トレンドと変動などの他の指標を組み合わせ,取引頻度を下げるパラメータを調整し,ストップロスを適切に緩和することで制御できます.

戦略の最適化の方向性

  1. 信号の精度を向上させるために他の技術指標フィルターを追加する.

閉じる価格が移動平均値よりも高いか 波動が正常範囲内か確認します

  1. 製品特性に応じてパラメータを最適化します

より不安定な商品では,通常の限界範囲を緩め,取引頻度を下げる.

  1. 複数のタイムフレームを最適化する

日中超短期間の取引では短い期間の長さを使用します.中長期のトレンドのために週数または月数チャートに基づいてパラメータを調整します.

  1. 底部離散条件を設定する

購入シグナルでは,偽の逆転信号を避けるために,価格が前の底値以上であるように要求します.

結論

この戦略は,主にモメントインディケーターを通じて短期的なトレンド逆転を特定し,トレード信号を生成するためのパラメータフィルタリング,トレンドのバランスフォローおよび逆転のキャプチャを行う.リスクは制御可能である.マルチタイムフレーム最適化と他の技術指標の組み合わせによるさらなる研究と適用は戦略のパフォーマンスを向上させる.


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

//@version=2
////////////////////////////////////////////////////////////
//  Copyright by HPotter v1.0 07/02/2017
//    This indicator plots Chande Momentum Oscillator. This indicator was 
//    developed by Tushar Chande. A scientist, an inventor, and a respected 
//    trading system developer, Mr. Chande developed the CMO to capture what 
//    he calls "pure momentum". For more definitive information on the CMO and 
//    other indicators we recommend the book The New Technical Trader by Tushar 
//    Chande and Stanley Kroll.
//    The CMO is closely related to, yet unique from, other momentum oriented 
//    indicators such as Relative Strength Index, Stochastic, Rate-of-Change, 
//    etc. It is most closely related to Welles Wilder`s RSI, yet it differs 
//    in several ways:
//        - It uses data for both up days and down days in the numerator, thereby 
//          directly measuring momentum;
//        - The calculations are applied on unsmoothed data. Therefore, short-term 
//          extreme movements in price are not hidden. Once calculated, smoothing 
//          can be applied to the CMO, if desired;
//        - The scale is bounded between +100 and -100, thereby allowing you to 
//          clearly see changes in net momentum using the 0 level. The bounded scale 
//          also allows you to conveniently compare values across different securities.
////////////////////////////////////////////////////////////
strategy(title="CMO (Chande Momentum Oscillator)", shorttitle="CMO")
Length = input(9, minval=1)
TopBand = input(70, minval=1)
LowBand = input(-70, maxval=-1)
reverse = input(false, title="Trade reverse")
// hline(0, color=gray, linestyle=dashed)
// hline(TopBand, color=red, linestyle=line)
// hline(LowBand, color=green, linestyle=line)
xMom = abs(close - close[1])
xSMA_mom = sma(xMom, Length)
xMomLength = close - close[Length]
nRes = 100 * (xMomLength / (xSMA_mom * Length))
pos = iff(nRes > TopBand, 1,
	   iff(nRes <= LowBand, -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(nRes, color=blue, title="CMO")

もっと