モメント・リバース・コンボ・戦略

作者: リン・ハーンチャオチャン,日付: 2023年10月23日 15:11:20
タグ:

img

概要

この戦略は,モメント指標CMOとリバース指標ストカスティックを組み合わせて,異なる市場環境における取引機会を発見するための多要素モデルを構築します.

論理分析

この戦略は2つのサブ戦略で構成されています.

  1. 123 逆転戦略

    • 9 日ストキャスティックを使用して,過剰購入および過剰販売レベルを識別します.

    • 閉じる価格が2日連続で上昇し,ストカスティックは50未満である場合,ロングに行く

    • 収束価格が2日連続で下がり,ストカスティックは50を超えるとショート

  2. CMO 絶対価値戦略

    • CMO の絶対値を計算する

    • 70以上のCMOは過買い,ショートに行くことを示しています

    • 20未満のCMOは過剰販売を示し,ロング

最後に,2つのサブ戦略が一致するときに取引信号が生成されます.

この戦略は,モメント指標CMOと逆転指標ストーカスティックの強みを完全に利用している.CMOはトレンド識別に優れているが,ストーカスティックは短期的な逆転を捉えるのに有用である.この組み合わせにより,モデルは異なる市場段階の機会を明らかにすることができる.

利点分析

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

  1. 多要素モデルが異なる市場環境に適応する

  2. CMOは強いトレンド検出能力を有し,ストカスティックは逆転点を正確に位置付け

  3. 偽信号を回避し,収益性を向上させるため,2つの信号が合意した場合にのみ取引する

  4. 大規模なパラメータ調節スペースは,異なる製品とタイムフレームに最適化することができます

  5. 長期指標と短期指標を組み合わせることで より多くの機会が発見されます

  6. シンプルで明瞭なルール 分かりやすく自動化され アルゴ取引に適しています

リスク分析

この戦略には次のリスクもあります

  1. 副戦略からの誤った信号の可能性があり,パラメータは最適化する必要があります

  2. 突然 の 傾向 の 逆転 は 大 損失 を 引き起こす こと が あり ます

  3. 取引頻度が高いため,取引コストを考慮する必要があります

  4. 遅延が原因になる

  5. パラメータ調整は,異なる製品で挑戦的です

解決策:

  1. 誤った信号を減らすためにサブ戦略パラメータを最適化

  2. ストップ・ロスを使って,取引ごとに損失を制限する.

  3. 取引頻度を下げるよう入力規則を調整する

  4. 遅延を最小限にするために,タックデータを使用する

  5. 自動パラメータチューニングに機械学習を適用する

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

戦略は以下の点で改善できる:

  1. システム的な多要素モデルのために 変動とボリュームのようなより多くの要因を導入する

  2. 市場体制に適応するダイナミックパラメータ最適化メカニズムを構築する

  3. 確率と指数式スムーズ化などを使ってエントリーロジックを最適化します

  4. 長期ポジションを短期取引でヘッジし,二重目標を達成する

  5. ディープラーニングで非線形取引ルールを構築するためにより多くの機能を抽出します

  6. パラメータのないモデルを探求し,人間の偏見を避ける

  7. 遅延を減らすために高周波データとニュースイベントを組み込む

結論

この戦略は,トレンドおよび横向市場における取引機会のための多要素モデルを構築するために,モメンタムインジケーターCMOとリバーサルインジケーターストーカスティックを使用している.シングルファクターモデルと比較して,多要素アプローチは複雑な市場環境により適している.一方,大きなパラメータチューニングスペースと簡単なルールは,最適化と自動化を容易にして,アルゴ取引開発に適している.しかし,リスク管理は極めて重要であり,パラメータ選択とモデル最適化に対する高い要求が必要である.全体として,モメンタムリバーサルコンボ戦略は,参照と探求に値する体系的な取引アイデアを提供します.


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

//@version=4
////////////////////////////////////////////////////////////
//  Copyright by HPotter v1.0 17/09/2019
// This is combo strategies for get a cumulative signal. 
//
// First strategy
// This System was created from the Book "How I Tripled My Money In The 
// Futures Market" by Ulf Jensen, Page 183. This is reverse type of strategies.
// The strategy buys at market, if close price is higher than the previous close 
// during 2 days and the meaning of 9-days Stochastic Slow Oscillator is lower than 50. 
// The strategy sells at market, if close price is lower than the previous close price 
// during 2 days and the meaning of 9-days Stochastic Fast Oscillator is higher than 50.
//
// Second strategy
//    This indicator plots the absolute value of CMO. CMO 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.
//
// WARNING:
// - For purpose educate only
// - This script to change bars colors.
////////////////////////////////////////////////////////////
Reversal123(Length, KSmoothing, DLength, Level) =>
    vFast = sma(stoch(close, high, low, Length), KSmoothing) 
    vSlow = sma(vFast, DLength)
    pos = 0.0
    pos := iff(close[2] < close[1] and close > close[1] and vFast < vSlow and vFast > Level, 1,
	         iff(close[2] > close[1] and close < close[1] and vFast > vSlow and vFast < Level, -1, nz(pos[1], 0))) 
	pos

CMOabs(Length, TopBand, LowBand) =>
    pos = 0
    xMom = abs(close - close[1])
    xSMA_mom = sma(xMom, Length)
    xMomLength = close - close[Length]
    nRes = abs(100 * (xMomLength / (xSMA_mom * Length)))
    pos := iff(nRes > TopBand, -1,
    	     iff(nRes < LowBand, 1, nz(pos[1], 0))) 
    pos

strategy(title="Combo Backtest 123 Reversal & CMOabs", shorttitle="Combo", overlay = true)
Length = input(14, minval=1)
KSmoothing = input(1, minval=1)
DLength = input(3, minval=1)
Level = input(50, minval=1)
//-------------------------
LengthCMO = input(9, minval=1)
TopBand = input(70, minval=1)
LowBand = input(20, maxval=0)
reverse = input(false, title="Trade reverse")
posReversal123 = Reversal123(Length, KSmoothing, DLength, Level)
posCMOabs = CMOabs(LengthCMO, TopBand, LowBand)
pos = iff(posReversal123 == 1 and posCMOabs == 1 , 1,
	   iff(posReversal123 == -1 and posCMOabs == -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 )

もっと