多因子融合反転追跡戦略


作成日: 2023-09-15 14:31:15 最終変更日: 2023-12-01 14:59:14
コピー: 0 クリック数: 636
1
フォロー
1617
フォロワー

戦略概要

多因子融合逆転追跡戦略は,価格逆転の形状と超買い超売り指標を統合することによって,入場と出場の意思決定信号を生成する.この戦略は,市場構造の高低点を判断する複数の要因を総合的に使用し,逆転点位で取引信号を生成し,中短線価格の逆転の機会を捕捉する.

戦略原則

この戦略は2つのモジュールから構成されています.

1,123 回転形状モジュール

  • 2日目の価格創出高が3日目に下落すると,潜在的短期高点として考えられ,空白する.

  • 2日目の低価格創出が3日目の反発に起これば,潜在的短期低点として考え,多めに行う.

RSI リバースエンジニアリングモジュール

  • RSIの超買超売ラインを動的に調整することで,反転点の判断を行う.

  • RSIが調整された超買線より高い場合,見落とし,RSIが調整された超売線より低い場合は見落としである.

最後に,2つのモジュールの信号が一致するときに,実際の取引命令が生成されます.

この戦略の最大の利点は,複数の要因が市場を判断する構造的高低点を統合し,単一の要因の下にある偽信号の一部をフィルターすることで,実際の取引の勝率を向上させることができるという点にある.

戦略的優位性

  • 複数の要因を組み合わせて,市場の高低を総合的に判断する

  • 逆転と超買いと超売りの指標を組み合わせた

  • 偽反転信号を効果的にフィルターし,正確性を向上させる

  • 回測パラメータは,異なる市場に対応して最適化できます.

  • 実行の難しさが低く,迅速に複製できる取引

危険性についてのヒント

  • 逆転信号が遅れているため,パラメータを更新する必要があります.

  • 過剰取引を防ぐために取引料金を増やす必要がある

  • 株の基本面に注目すべきだ

  • 逆転戦略はインデックスや人気株に適しています

要約する

多因子融合逆転追跡戦略は,定量化ツールの優位性と人工分析の経験を組み合わせて,複数の角度を考慮して取引信号を決定する.単一の指標戦略と比較して,実際の取引の安定性と勝率を大幅に向上させることができる.この戦略は,最初に反測で検証・最適化され,その後徐々に実地化され,非常に顕著な実用価値を持つ.

ストラテジーソースコード
/*backtest
start: 2023-08-15 00:00:00
end: 2023-09-14 00:00:00
period: 2h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=4
////////////////////////////////////////////////////////////
//  Copyright by HPotter v1.0 15/06/2021
// 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
// The related article is copyrighted material from
// Stocks & Commodities.
//
// 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


RE_RSI(Value,WildPer) =>
    pos = 0.0
    AUC = 0.0
    ADC = 0.0
    ExpPer = 2 * WildPer - 1
    K = 2 / (ExpPer + 1)
    AUC := iff(close > close[1], K * (close - close[1]) + (1 - K) * nz(AUC[1], 1), (1-K) * nz(AUC[1], 1))
    ADC := iff(close > close[1], (1-K) * nz(ADC[1], 1), K * (close[1] - close) + (1 - K) * nz(ADC[1], 1))
    nVal = (WildPer - 1) * (ADC * Value / (100 - Value) - AUC)
    nRes = iff(nVal >= 0, close + nVal, close + nVal * (100 - Value) / Value)
    pos:= iff(nRes > close, -1,
    	   iff(nRes < close, 1, nz(pos[1], 0))) 
    pos

strategy(title="Combo Backtest 123 Reversal & Reverse Engineering RSI, by Giorgos Siligardos", shorttitle="Combo", overlay = true)
line1 = input(true, "---- 123 Reversal ----")
Length = input(14, minval=1)
KSmoothing = input(1, minval=1)
DLength = input(3, minval=1)
Level = input(50, minval=1)
//-------------------------
line2 = input(true, "---- Reverse Engineering RSI ----")
Value = input(50, minval=1)
WildPer = input(14,minval=1)
reverse = input(false, title="Trade reverse")
posReversal123 = Reversal123(Length, KSmoothing, DLength, Level)
posRE_RSI = RE_RSI(Value,WildPer)
pos = iff(posReversal123 == 1 and posRE_RSI == 1 , 1,
	   iff(posReversal123 == -1 and posRE_RSI == -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 )