이중 역전 전략

저자:차오장, 2024-02-26 12:07:32
태그:

img

전반적인 설명

이중 역전 전략은 신호 품질을 향상시키고 위험을 줄이기 위해 123 역전 및 3 바 역전 패턴을 결합한 양적 전략이다. 가격 미화 지표와 촛불 패턴 지표의 조합을 사용하여 거래 접근 방식을 채택하고, 양이 신호를 표시 할 때만 포지션을 열고 신호 정확도를 증가시킵니다.

전략 원칙

이중 역전 전략은 두 가지 다른 유형의 거래 전략을 결합합니다. 첫째는 123 역전 전략입니다. 가격 차이 지표를 사용하여 가격이 2 일 연속으로 역전되고 스토카스틱 지표가 임계 값을 넘을 때 트리거됩니다. 둘째는 3 바 역전 패턴 전략입니다.

특히, 123 역전 전략은 과반 구매 및 과반 판매 조건을 식별하기 위해 9 일 주주 스토카스틱 오시레이터를 사용합니다. 가격이 2 일 연속 하락하고 스토카스틱 판독이 50 이하로 떨어지면 구매 신호를 생성하고 가격이 2 일 연속 상승하고 스토카스틱 상위 50 이면 판매 신호를 생성합니다. 3 바 역전 패턴 전략은 가격이 3 일 동안 높은-저하 높은 패턴을 형성했는지 여부를 감지하여 단기적 과반 판매가 추진력에 의해 역전되는 것을 나타냅니다.

이중 역전 전략은 어떤 포지션도 취하기 전에 양 전략에서 일치하는 신호를 필요로 합니다. 이것은 잘못된 신호를 크게 줄여서 시스템이 높은 확률의 기회에서만 거래하도록 보장합니다.

이점 분석

단일 전략 시스템과 비교하면 이중 역전 전략은 다음과 같은 장점을 가지고 있습니다.

  1. 신호 품질 향상, 거짓 신호 감소
  2. 이중 지표 확인, 더 낮은 유출 위험
  3. 단기 및 중기 회전 기회를 포착합니다.
  4. 이해하기 쉽고 실행하기 쉽다

위험 과 해결책

이중 역전 전략의 주요 위험은 수익성있는 기회를 놓치는 것입니다. 엄격한 신호 요구 사항으로 인해 개별 지표에 의해 식별 된 일부 거래 기회가 건너뛰어집니다. 이는 하나의 지표의 조건을 완화하고 거래 빈도를 증가시키기 위해 매개 변수를 조정함으로써 완화 될 수 있습니다.

또 다른 위험은 두 지표가 극단적인 시장 조건에서 동시에 실패하여 잘못된 신호의 비율이 높아지는 것입니다. 그러한 경우, 포지션을 빠르게 풀고 손실을 제한하기 위해 스톱 로스 메커니즘을 추가 할 수 있습니다. 대안으로, 포지션을 취하지 않도록 역사적으로 입증된 불리한 극단적인 시장 조건에서 거래 신호를 비활성화하십시오.

최적화 제안

이중 역전 전략에 대한 추가 최적화는 다음을 포함합니다.

  1. 과도한 매수/ 과도한 매수 평가의 정확성을 향상시키기 위해 스토카스틱 지표 매개 변수를 조정
  2. 가장 적합한 자산을 찾기 위해 다른 거래 도구에 대한 효과를 테스트합니다.
  3. 신호 검증을 지원하고 정확도를 향상시키기 위해 기계 학습 모델을 통합합니다.
  4. 더 많은 시장 통계를 결합해 볼 수 있습니다. 부피 변화, 내일 변동성 등.

결론

이중 역전 전략은 평균 역전 원칙과 촛불 패턴 분석을 성공적으로 결합하여 가격의 순환성을 완전히 포착합니다. 간단한 트렌드를 따르는 방법과 비교하면 위험과 보상 사이의 균형을 이룬다. 지속적인 개선으로 전략의 가치가 시간이 지남에 따라 검증 될 것입니다.


/*backtest
start: 2024-01-01 00:00:00
end: 2024-01-31 23:59:59
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=3
////////////////////////////////////////////////////////////
//  Copyright by HPotter v1.0 17/04/2019
// This is combo strategies for get 
// a cumulative signal. Result signal will return 1 if two strategies 
// is long, -1 if all strategies is short and 0 if signals of strategies is not equal.
//
// 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.
//
// Secon strategy
// This startegy based on 3-day pattern reversal described in "Are Three-Bar 
// Patterns Reliable For Stocks" article by Thomas Bulkowski, presented in 
// January,2000 issue of Stocks&Commodities magazine.
// That pattern conforms to the following rules:
// - It uses daily prices, not intraday or weekly prices;
// - The middle day of the three-day pattern has the lowest low of the three days, with no ties allowed;
// - The last day must have a close above the prior day's high, with no ties allowed;
// - Each day must have a nonzero trading range. 
//
// 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

BarReversalPattern() =>
    pos = 0.0
    pos := iff(open[2] > close[2] and high[1] < high[2] and low[1] < low[2] and low[0] > low[1] and high[0] > high[1], 1,
	         iff(open[2] < close[2] and high[1] > high[2] and low[1] > low[2] and high[0] < high[1] and low[0] < low[1], -1, nz(pos[1], 0))) 
    pos

strategy(title="Combo Strategies 123 Reversal and 3-Bar-Reversal-Pattern", shorttitle="Combo Backtest", overlay = true)
Length = input(14, minval=1)
KSmoothing = input(1, minval=1)
DLength = input(3, minval=1)
Level = input(50, minval=1)
reverse = input(false, title="Trade reverse")
posReversal123 = Reversal123(Length, KSmoothing, DLength, Level)
pos3BarReversalPattern = BarReversalPattern()
pos = iff(posReversal123 == 1 and pos3BarReversalPattern == 1 , 1,
	   iff(posReversal123 == -1 and pos3BarReversalPattern == -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 ? red: possig == 1 ? green : blue ) 

더 많은