Uhl MA 기반 적응형 이동 평균 교차 전략


생성 날짜: 2023-09-19 22:06:42 마지막으로 수정됨: 2023-09-19 22:06:42
복사: 1 클릭수: 976
avatar of ChaoZhang ChaoZhang
1
집중하다
1617
수행원

개요

Uhl MA 시스템은 자율적 평행선 교차 시스템으로, 전통적인 평행선 시스템의 결점을 보완하기 위해 설계되었다. 이 시스템은 빠른 평행선과 느린 평행선 교차로 거래 신호를 생성한다. 느린 평행선은 Uhl이 처음에 제안한 수정 평행선 ((CMA) 을 채택하고, 빠른 평행선은 수정 평행선 아이디어에 기반한 수정 경향 단계를 채택한다. 시스템은 자율적으로 평행선 매개 변수를 조정하여 더 안정적이고 신뢰할 수있는 거래 신호를 구현한다.

원리 해부

이 전략의 핵심은 Uhl MA 평균선과 CTS 평균선의 계산이다. 이 중, Uhl MA 평균선은 전통적인 SMA 평균선에 기초하여 수정되며, 편차 VAR과 역사 CMA의 제곱차 SECMA를 도입하여 자율 조정한다. VAR이 SECMA보다 작을 때 SMA 비율을 높이고, VAR이 SECMA보다 크면 CMA 비율을 높인다. 이렇게 하면 약간의 잡음을 필터링하여 보다 안정적인 라인 평균선을 생성한다.

교차 원칙은 전통적인 평선 교차 시스템과 동일하며, CTS가 위쪽으로 Uhl MA를 통과할 때 구매 신호를 발생시키고, CTS가 아래쪽으로 Uhl MA를 통과할 때 판매 신호를 발생시킨다. 이렇게 하면 스스로 적응하는 평선 거래 시스템이 된다.

우위 분석

전통적인 평행선 교차 시스템과 비교할 때, 이 전략의 가장 큰 장점은 적응 평행선을 채택하여, 일부 잡음을 필터링하여, 흔들림 상황에서 더 신뢰할 수 있는 거래 신호를 생성할 수 있다는 것입니다. 죽은 포크 금 포크와 비교할 때, 적응 평행선 교차는 잘못된 거래의 확률을 감소시킵니다. 또한, 빠른 선과 느린 선의 조합으로, 더 나은 트렌드 거래 기회를 잡을 수 있습니다.

위험 분석

평균선은 본질적으로 트렌드를 판단하는 기술적 지표이기 때문에, 이 전략의 가장 큰 위험은 흔들림 상황에서 잘못된 신호를 생성할 확률이 높다는 것이다. 이것은 주로 CMA 평균선의 자기 적응 계산 방법에서 비롯되며, 흔들림 상황에서 가격 영역으로 접어들면서 불필요한 신호를 생성한다. 또한, 적절한 파라미터 조합을 찾는 것도 큰 문제이다. 파라미터를 적절하게 설정하지 않으면, 더 나은 거래 기회를 놓치거나 잘못된 신호의 가능성을 높일 수 있다.

최적화 제안

이 전략은 다음의 몇 가지 측면에서 최적화될 수 있습니다.

  1. CMA 자율 계산 방법을 개선하여, 진동상태에서 수렴을 방지하고, 잘못된 신호를 생성한다. 다른 지표의 도입을 고려하여 수정할 수 있다.

  2. 최적화 매개 변수 설정, 최적의 매개 변수 조합을 찾는 것. 유전 알고리즘과 같은 방법을 통해 다차원 매개 변수 최적화를 할 수 있다.

  3. 단편적 손실을 통제하기 위해 손실을 막는 전략을 추가하십시오.

  4. 다른 지표 필터 신호와 결합하여 불안정한 상황에서 자주 거래하는 것을 피하십시오. 예를 들어, 변동률 지표, RFM 지표 등을 도입하십시오.

  5. 재원 관리를 최적화하여, 예를 들어 위험 측정, 포지션 제어 등으로, 전반적인 위험을 더 잘 통제한다.

요약하다

Uhl MA 시스템은 매우 혁신적인 사고의 자율적 평평선 교차 전략이다. 전통적인 전략에 비해, 동적 평평선을 채택하면 잘못된 거래의 확률을 줄일 수 있고, 트렌드 잡기 좋은 기회를 얻을 수 있다. 그러나 이 전략은 또한 일정 한계가 있다.

||

Overview

The Uhl MA system is an adaptive moving average crossover system designed to overcome the deficiencies of traditional MA systems. It uses fast and slow moving averages to generate trading signals, with the slow MA being the corrected MA (CMA) originally proposed by Andreas Uhl and the fast MA being the corrected trend step (CTS) which is also based on the corrected MA. The system adaptively adjusts the MA parameters to achieve more reliable trading signals.

Principle Analysis

The core of this strategy lies in the calculation of Uhl MA and CTS lines. Uhl MA line is an enhancement over the traditional SMA, using variance (VAR) and historical squared deviation (SECMA) to adaptively adjust the weights between SMA and previous CMA. When VAR is less than SECMA, more weight is put on SMA, otherwise more weight is put on CMA. This helps filter out some noise and generate smoother MA. CTS line uses similar adaptive calculation based on SRC price.

The crossover logic is the same as traditional MA systems. A buy signal is generated when CTS crosses above Uhl MA, and a sell signal when crossing below. This forms an adaptive MA trading system.

Advantage Analysis

Compared to traditional MA crossover systems, the biggest advantage of this strategy is the use of adaptive MAs, which can filter some noise and generate more reliable signals in range-bound markets. The adaptive crossover reduces false signals compared to dead cross and golden cross. Also, the fast and slow MA combination allows catching some trend-trading opportunities. From backtest results we can see superior performance in assets with obvious trends.

Risk Analysis

The major risk of this strategy comes from the increased false signals in ranging markets, as MAs are trend-following indicators in nature. This is largely due to the adaptive calculation of CMA, which converges to price ranges in consolidation, generating unnecessary signals. Proper parameter tuning is also a big challenge. Improper parameters may lead to missing good trades or increased false signals.

Optimization Suggestions

The potential optimizations include:

  1. Improve CMA calculation to avoid convergence in ranging markets, using other indicators for example.

  2. Optimize parameters through multi-variate optimization algorithms like genetic algorithms.

  3. Introduce stop loss to control single trade loss.

  4. Add filters using other indicators to avoid over-trading in consolidation, such as volatility measures, RFM index etc.

  5. Optimize risk management including position sizing, risk metrics to better control overall risk.

Conclusion

The Uhl MA system is a very innovative adaptive MA crossover strategy. Compared to traditional strategies, the dynamic MAs help reduce false signals and better capture trends. But limitations exist in ranging markets. Further improvements in calculation methodology and adding filters hold great potential. Meanwhile, parameter tuning and risk control are also critical. Overall, the Uhl MA strategy has good potential and research value worth further exploration.

[/trans]

전략 소스 코드
/*backtest
start: 2023-01-01 00:00:00
end: 2023-06-25 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © alexgrover

//@version=4
strategy("Uhl MA System - Strategy Analysis")
length = input(100),mult = input(1.),src = input(close)
//----
out = 0., cma = 0., cts = 0.
Var = variance(src,length)           ,sma = sma(src,length)
secma = pow(nz(sma - cma[1]),2)      ,sects = pow(nz(src - cts[1]),2) 
ka = Var < secma ? 1 - Var/secma : 0 ,kb = Var < sects ? 1 - Var/sects : 0
cma := ka*sma+(1-ka)*nz(cma[1],src)  ,cts := kb*src+(1-kb)*nz(cts[1],src)
//----
if crossover(cts,cma)
    strategy.entry("Buy", strategy.long)
if crossunder(cts,cma)
    strategy.entry("Sell", strategy.short)
//----
cap = 50000
eq = strategy.equity
rmax = 0.
rmax := max(eq,nz(rmax[1]))
//----
css = eq > cap ? #0cb51a : #e65100
a = plot(eq,"Equity",#2196f3,2,transp=0)
b = plot(rmax,"Maximum",css,2,transp=0)
fill(a,b,css,80)