
이 전략은 가마 중도 평균 가격 (GWAP) 과 동력 분석을 결합한 정량 거래 시스템이다. 이 전략은 역사적 가격 데이터를 가마 중도 처리하고, 단기 동력 지표와 결합하여 가격 움직임을 예측한다. 전략의 핵심은 가마 인자를 사용하여 근기한 가격에 더 높은 무게를 배분하여 근기한 시장 움직임에 대한 감수성을 높이는 것이다.
전략은 주로 두 가지 핵심 심리학 이론에 기반합니다: 동력 효과와 마 중도 가격. 동력 측면에서, 전략은 금융 시장에서 가격 추세가 지속되는 특성을 활용합니다. 중력 측면에서, 마 인자 ((수용 범위 0.5-1.5)) 를 통해 역사 가격에 지수적 하락 가중을 가합니다. 구체적으로, 전략은 GWAP를 기준 가격으로 계산하여 가격이 GWAP 위에 있고 3 개의 연속으로 상승 추세를 보이는 경우 더 많은 포지션을 열고, 반대로 빈 포지션을 열습니다.
이 전략은 마의 무게와 동력 분석을 결합하여 시장 경향에 대한 지능적인 추적을 구현한다. 그것의 핵심 장점은 시장 상황의 동력에 따라 무게 분배를 조정할 수 있다는 점이며, 동시에 높은 계산 효율을 유지한다는 것이다. 특정 시장 위험과 파라미터 민감성 문제가 있지만, 지속적인 최적화와 개선으로 전략은 좋은 적용 전망을 가지고 있다.
/*backtest
start: 2024-02-18 00:00:00
end: 2025-02-16 08:00:00
period: 6h
basePeriod: 6h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=6
strategy("BTC Future Gamma-Weighted Momentum Model (BGMM)", shorttitle="BGMM", overlay=true,
default_qty_type=strategy.cash, default_qty_value=50000,
slippage=1, commission_value=0.01)
// Inputs
length = input.int(60, "Length for GWAP Calculation")
gamma_factor = input.float(0.75, "Gamma Weight Factor", minval=0.5, maxval=1.5, step=0.01)
// Helper Functions
var float cumulative_weighted_price = na
var float cumulative_weight = na
price = (high + low + close) / 3 // Typical price as a baseline
gamma_weights = array.new_float(length, 0.0)
price_series = array.new_float(length, na)
// Populate Arrays for Calculation
if bar_index >= length
for i = 0 to length - 1
weighted_gamma = math.pow(gamma_factor, i)
array.set(gamma_weights, i, weighted_gamma)
array.set(price_series, i, close[i])
// Compute GWAP
weighted_sum = 0.0
weight_total = 0.0
for i = 0 to length - 1
w = array.get(gamma_weights, i)
p = array.get(price_series, i)
weighted_sum := weighted_sum + p * w
weight_total := weight_total + w
GWAP = weight_total != 0 ? weighted_sum / weight_total : na
plot(GWAP, color=color.red, title="Gamma Weighted Average Price")
// Conditions for Trade Signals
long_condition = close > GWAP and close[1] > close[2] and close[2] > close[3]
short_condition = close < GWAP and close[1] < close[2] and close[2] < close[3]
// Strategy Logic
if long_condition
strategy.entry("Long", strategy.long)
if short_condition
strategy.entry("Short", strategy.short)