マルチファクターモメンタムと反転の組み合わせ戦略


作成日: 2023-10-23 15:11:20 最終変更日: 2023-10-23 15:11:20
コピー: 0 クリック数: 700
1
フォロー
1617
フォロワー

マルチファクターモメンタムと反転の組み合わせ戦略

概要

この戦略は,動態指標CMOと逆転指標Stochasticの組み合わせを使用して,異なる市場環境下での取引機会を探索するために多要素モデルを実現します.

原則分析

この戦略は以下の2つの子戦略で構成されています.

  1. 123 逆転戦略

    • 9日制ストキャスティックで 超買いと超売りを判断する
    • ストキャスティックが50を下回った場合,
    • ストキャスティックが50以上で2日連続で下落した場合は,空白します.
  2. CMOの絶対価値戦略

    • CMOの絶対値を計算する
    • CMOは,絶対値が70を超えると,超買い状態であると判断し,空白をします.
    • CMOは,絶対値が20未満の場合は,過剰に売れていると考えて,多めに働く.

最後に,2つの子戦略信号が一致した場合,取引信号を発する.

この戦略は,動量指数CMOと反転指数Stochasticの優位性を充分利用しています. CMOはトレンドをよりよく識別し,Stochasticは短期的な反転の機会を見つけることができます. 両方を使用すると,異なる段階で取引機会を掘り下げることができます.

優位分析

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

  1. 多要素モデル,動量と反転を組み合わせて,異なる市場環境に適応する

  2. CMOはトレンドを把握し,ストキャスティックは逆転を正確に判断する

  3. 2つのシグナルが一致するときにのみ取引し,誤ったシグナルを避け,利益の確率を高めます.

  4. パラメータの最適化スペースは広く,異なる品種と周期に合わせて調整できます

  5. 長期・短期指標の組み合わせにより,より多くの取引機会が見つかる

  6. 規則はシンプルでわかりやすく,理解しやすい実装で,アルゴリズム取引に適しています.

リスク分析

この戦略には以下のリスクがあります.

  1. 子策が誤信号を発する確率は存在し,パラメータを最適化する必要があります.

  2. 突発的な出来事により,トレンドが逆転し,大きな損失が生じます.

  3. 取引の頻度が高く,取引コストが考慮すべき要因である

  4. 子戦略は遅延指標であり,時間遅れの問題があります.

  5. 異なる品種に合わせてパラメータを調整する必要があり,パラメータ最適化の要求は高い

対策として

  1. オプティマイザー子策略パラメータ,誤信号の確率を下げる

  2. 単一損失をコントロールする

  3. ポジション開設条件を調整し,取引頻度を下げる

  4. リアルタイムで tick データを活用して遅滞を減らす

  5. 機械学習によるパラメータの自動最適化

最適化の方向

この戦略は,以下の点で最適化できます.

  1. 波動率,量,など,より多くの要因を導入し,体系的な多要素モデルを形成

  2. 市場状況に応じてパラメータを調整するダイナミックパラメータ最適化メカニズムを構築

  3. ポジション開設論理の最適化,確率と指数平滑の導入などの方法

  4. 短期間の長期ポジションをカバーし,二重目的を達成する

  5. ディープ・ラーニングを活用し,非線形取引のルールを作成する

  6. パラメータなしのモデルを探索し,人工選択パラメータによる偏差を回避する

  7. 高周波データとニュースイベントを組み合わせて,信号の遅延を減らす

要約する

この戦略は,動量指数CMOと逆転指数Stochasticを使用することにより,多因子モデルを実現し,横断型市場でより多くの取引機会を掘り起こします.単一の指標と比較して,多因子組合せは,より複雑な市場環境に対応できます.同時に,この戦略のパラメータ最適化のスペースは広く,規則はシンプルで,アルゴリズム取引開発に適しています.しかし,リスク管理にも注意する必要があります.パラメータ選択とモデル最適化に対する要求は高くなります.全体的に言えば,多因子動量逆転戦略は,参照および拡張可能な体系化された取引考え方です.

ストラテジーソースコード
/*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 )