
二重反転均衡戦略は,反転戦略と波分解戦略を総合的に利用する組み合わせの戦略である.この戦略は,まず123反転システムを使用して取引信号を生成し,その後,経験模式分解 (EMD) と組み合わせて波処理を行う.両取引信号を統合して,より高い勝利率を実現する.
123反転システムは,Ulf Jensenの”How I Get Three-Fold Earnings in the Futures Market”から由来する.この部分策は,反転型の策である.閉盘価格が前日の閉盘価格より2日連続で高く,そして9日ゆっくりK線が50を下回ったとき,多行する.閉盘価格が前日の閉盘価格より2日連続で低く,そして9日ゆっくりK線が50以上で空行する.
経験モデル分解 (EMD) は,自己適応のデータ分析方法である.これは,データの異なる周波数成分を効率的に分離し,データの長期的な傾向を抽出する.ここで,長さを20で設定し,デルタは0.5で,fractionは0.1で,価格の異なる周波数成分に基づいて取引信号を生成する.
双反転均衡戦略は123反転システムと経験パターン分解から生じる取引信号を統合し,両信号が一致するときにエンテニダを確認する.これにより戦略の勝率を高めることができる.
二重反転均衡戦略は,反転戦略とデジタル信号処理技術を組み合わせ,異なるモデルの優位性を総合的に利用する.反転システムは,短期的な反転の機会を捕捉し,経験パターンを分解して長期のトレンドを把握する.両者の組み合わせは,戦略の安定性を向上させる.
この戦略は,非理想的な反転を値化されるのを防ぐために123形も導入した. 経験パターンの分解に合理的なパラメータを設定することで,部分的なノイズをフィルターし,誤信号を減らすのに役立ちます.
二重反転均衡戦略の最大のリスクは,反転が失敗することにある.123形を導入することで,この確率を減らすことができるが,反転取引は本質的に大きな不確実性を有することを覚えておく.また,自己適応の波方法として,経験パターンの分解は,極端な状況でも失敗する可能性がある.
これらのリスクを制御するために,逆転のパラメータを適切に調整して,逆転信号をより信頼できるようにすることもできます.また,異なる波方法の代替実験モデル分解をテストして,よりよい波効果が得られるかどうかを確認することもできます.また,単一の損失を避けるために小規模な取引を保つことも必要です.
この戦略は以下の点で最適化できます.
異なるパラメータの反転システムをテストし,最適なパラメータの組み合わせを決定する
デジタルフィルタリングを試す 微波変換,ヒルベルト変換など
単一損失を抑えるために ストップ・ストップ戦略を追加する
他の指標と組み合わせることで,取引方向がより正確で確実になる.
資金管理を最適化し,最適取引サイズ比率を決定する
双反転均衡戦略は,反転戦略とデジタル信号処理技術の総合的な適用の利点である. 合理的なパラメータ設定,リスク管理,安定した取引である. この戦略は,強力な普遍性と拡張性があり,推奨される取引戦略である.
/*backtest
start: 2023-11-14 00:00:00
end: 2023-12-14 00:00:00
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=4
////////////////////////////////////////////////////////////
// Copyright by HPotter v1.0 30/06/2020
// 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 Mar 2010
//
// 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
Empirical(Length,Delta,Fraction) =>
pos = 0
xBandpassFilter = 0.0
xPeak = 0.0
xValley =0.0
xPrice = hl2
beta = cos(3.1415 * (360 / Length) / 180)
gamma = 1 / cos(3.1415 * (720 * Delta / Length) / 180)
alpha = gamma - sqrt(gamma * gamma - 1)
xBandpassFilter := 0.5 * (1 - alpha) * (xPrice - xPrice[2]) + beta * (1 + alpha) * nz(xBandpassFilter[1]) - alpha * nz(xBandpassFilter[2])
xMean = sma(xBandpassFilter, 2 * Length)
xPeak := iff (xBandpassFilter[1] > xBandpassFilter and xBandpassFilter[1] > xBandpassFilter[2], xBandpassFilter[1], nz(xPeak[1]))
xValley := iff (xBandpassFilter[1] < xBandpassFilter and xBandpassFilter[1] < xBandpassFilter[2], xBandpassFilter[1], nz(xValley[1]))
xAvrPeak = sma(xPeak, 50)
xAvrValley = sma(xValley, 50)
nAvrPeak = Fraction * xAvrPeak
nAvrValley = Fraction * xAvrValley
pos := iff(xMean > nAvrPeak and xMean > nAvrValley, 1,
iff(xMean < nAvrPeak and xMean < nAvrValley, -1, nz(pos[1], 0)))
pos
strategy(title="Combo Backtest 123 Reversal & Empirical Mode Decomposition", shorttitle="Combo", overlay = true)
Length = input(14, minval=1)
KSmoothing = input(1, minval=1)
DLength = input(3, minval=1)
Level = input(50, minval=1)
//-------------------------
LengthEMD = input(20, minval=1)
Delta = input(0.5)
Fraction = input(0.1)
reverse = input(false, title="Trade reverse")
posReversal123 = Reversal123(Length, KSmoothing, DLength, Level)
posEmpirical = Empirical(LengthEMD,Delta,Fraction)
pos = iff(posReversal123 == 1 and posEmpirical == 1 , 1,
iff(posReversal123 == -1 and posEmpirical == -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 )