ガウスチャネル多重フィルタリング戦略:堅牢な定量取引システムの構築方法

GAUSSIAN Kijun-Sen VAPI ATR TRAILING
作成日: 2025-09-02 18:22:32 最終変更日: 2025-09-09 09:39:46
コピー: 0 クリック数: 333
2
フォロー
319
フォロワー

ガウスチャネル多重フィルタリング戦略:堅牢な定量取引システムの構築方法 ガウスチャネル多重フィルタリング戦略:堅牢な定量取引システムの構築方法

なぜ,複雑な市場では,従来の技術指標が機能しないのか?

量子取引では,一つの技術指標が市場の騒音の中で偽信号を発生し,頻繁にストップと資金の撤収を誘発することがしばしばあるという根本的な問題に直面しています. では,どのようにトレンドを捉え,騒音を効果的にフィルターできる取引システムを構築するか?

今日分析したガウス・チャネルの複数のフィルタリング戦略は,4つの異なる次元を巧妙に組み合わせた技術指標によって,私たちが深く研究する価値のある解決策を提供します.

核の技術構造:四重フィルタリングの仕組みはどのように協働しているのでしょうか?

1. ガウスチャンネル - トレンド認識の核心

策略の基礎は,144周期のサンプリングウィンドウを使用する4段階の高士フィルターである.従来の移動平均とは異なり,高士フィルターは,数学的なモデリングにより,価格変化に対する感受性を保ちながら,市場のノイズの大半を排除する.

キーパラメータの設定:

  • 高氏極点数:4 ((平衡の遅滞と平滑度)
  • サンプリングサイクル:144 (中期トレンドを捉える)
  • 波倍数:1.414 ((標準差倍数,通路幅を制御する)

2. キジュン・セン線 ((130周期) - 中長期トレンド確認

伝統的な26周期ではなく,130周期のKijun-Sen線がトレンドフィルターとして使用されています.

より長い周期設定は:

  • 偽突破信号の減少
  • 取引の方向が主流に合致することを確認する
  • 信号の質を向上させ,取引頻度を低下させる

3. VAPI指標 - 取引量価格分析

VAPI (Volume Adjusted Price Indicator) は,取引量と価格の変化の関係を分析し,市場参加者の真の意図を判断する.VAPI > 0時には多額の支持,< 0時には空調の支持する.

4. ATR ダイナミック・ストップ・リスク・コントロール・メカニズム

11サイクルATRの4.5倍をストップ距離として使用し,この設定は市場の波動性を考慮するとともに,市場騒音によって引き起こされる過密のストップを避ける.

資金管理の革新:75/25分担戦略の知恵

この戦略の最も学ぶに値する点は,その独特な資金管理方法である.

分散論理:

  • 75%のポジション:固定3.5倍リスクリターン比スト
  • 25% ポジション:ダイナミック・トラッキング・ストップ

デザインの理由とは

  1. 基本的利益を確保する固定ストップは75%のポジションで,ほとんどの資金が安定したリターンを得ることを保証します.
  2. 余分な収益を捕獲する:25%のトレーディングストップは,トレンドが続く場合より大きな利益を得ることができます
  3. リスク分散脱退のメカニズムは,単一の戦略が失敗するリスクを低減します.

リスク管理システム: 多層の保護機構

1. 入場リスク管理

  • 取引リスクは,口座資金の3%に制限されます.
  • ATRベースの動的ポジション計算

2. ポジションのリスク管理

  • 主なストップ:ATRの4.5倍
  • ストップトラッキング:動的調整,浮動をロックする
  • 追加ストップ:固定利益保護10%

3. 信号フィルタリング 4つの技術指標が同時に確認され,偽信号の確率が大幅に減少した.

戦略の優位性と限界の分析

中心的な長所:

  1. 信号の質は高い複数のフィルタリングにより,取引信号の信頼性が著しく向上しました.
  2. リスクはコントロールできます: 完ぺきなストップとポジション管理システム
  3. 適応性が高いATRの動態は市場変動に適応する
  4. 利益の最適化株の分割戦略により,安定した利益と余剰利益のバランスが取れた.

潜在的制限:

  1. トレンド依存市場が揺れ動いている中で,
  2. パラメータに敏感: 複数のパラメータを異なる品種で最適化する必要があります.
  3. 遅滞する複数のフィルターにより,入場時間が遅れる可能性

現場での応用

1. 品種選択 主要な通貨ペア,株式指数期貨などの傾向が強い品種を選択してください.

2. パラメータ最適化 特定の取引品種の歴史データに基づいて,追溯・最適化を行うことを推奨し,特に以下に注目する.

  • ゴス通路のサンプリングサイクル
  • キジュン・センの周期長さ
  • ATRの止損倍数

3. 市場環境への適応 明らかに揺れ動いている市場では,戦略を一時的に停止するか,パラメータ設定を調整することを考えることができます.

概要: 量的な取引のシステム思考

この戦略の価値は,技術的な実現だけでなく,体系的な思考にもあります.

  1. 多次元検証: トレンド,取引量,波動性などの複数の角度から取引シグナルを検証する
  2. リスク優先戦略の基礎となるのは,健全なリスク管理システムである.
  3. 利益の最適化収益の目標のバランスをとる分担戦略

この戦略は,量的なトレーダーにとって,良いフレームワークの参照を提供している. 鍵はパラメータを照らすことではなく,設計の考え方を理解し,自分の取引品種とリスクの好みに合わせて適切に調整することです.

ビジネス戦略は,最も複雑な戦略ではなく,あなたの取引スタイルと市場環境に最も適したものであることを覚えておいてください.

ストラテジーソースコード
/*backtest
start: 2025-01-01 00:00:00
end: 2025-04-01 00:00:00
period: 1h
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"ETH_USDT","balance":500000}]
*/

// @version=6
strategy("Gaussian Channel Strategy – GC + Kijun (120) + VAPI Gate + ATR(4.5x) + 75/25 TP-TRAIL + Extra %TP",
     overlay=true)

// =============================
// ======= INPUTS ==============
// =============================
N_poles   = input.int(4,   "Gaussian Poles", minval=1, maxval=9)
per       = input.int(144, "Sampling Period", minval=2)
mult      = input.float(1.414, "Filtered TR Multiplier", step=0.001)
src       = input.source(hlc3, "Source")
modeLag   = input.bool(false, "Reduced Lag Mode")
modeFast  = input.bool(false, "Fast Response Mode")

kijunLen  = input.int(130, "Kijun-Sen Period")

vapiLen   = input.int(10, "VAPI Length")
vapiThresh= input.float(0.0, "VAPI Threshold (0 = zero line)")

atrLen    = input.int(11, "ATR Length (RMA)")
slATRmul  = input.float(4.5, "SL = ATR ×", step=0.1)
rr_fixed  = input.float(3.5, "Fixed TP RR (Leg A)", step=0.1)
allocA    = input.float(75,  "Allocation %: Fixed TP Leg", minval=1, maxval=99)
riskPct   = input.float(3.0, "Risk % of Equity per Trade", step=0.1, minval=0.1, maxval=10)

tpEnable    = input.bool(true,  "Enable Extra % Take Profit")
tpPctLong   = input.float(10.0, "Extra Long TP % of Entry",  step=0.1, minval=0)
tpPctShort  = input.float(10.0, "Extra Short TP % of Entry", step=0.1, minval=0)

// =============================
// ===== CORE COMPONENTS =======
// =============================
atr = ta.rma(ta.tr(true), atrLen)

donchian_avg(len) => (ta.highest(high, len) + ta.lowest(low, len)) / 2.0
kijun = donchian_avg(kijunLen)

// --- VAPI_LB (LazyBear) ---
rs(x, len) => ta.cum(x) - nz(ta.cum(x)[len])
v_x   = (2*close - high - low) / math.max(high - low, syminfo.mintick)
v_tva = rs(volume * v_x, vapiLen)
v_tv  = rs(volume, vapiLen)
v_va  = 100 * (v_tva / v_tv)

// =============================
// ===== Gaussian Channel ======
// =============================
f_filt9x(_a, _s, _i) =>
    int _m2 = 0, int _m3 = 0, int _m4 = 0, int _m5 = 0, int _m6 = 0,
    int _m7 = 0, int _m8 = 0, int _m9 = 0, float _f = 0.0, _x = (1 - _a)
    _m2 := _i == 9 ? 36  : _i == 8 ? 28 : _i == 7 ? 21 : _i == 6 ? 15 : _i == 5 ? 10 : _i == 4 ? 6 : _i == 3 ? 3 : _i == 2 ? 1 : 0
    _m3 := _i == 9 ? 84  : _i == 8 ? 56 : _i == 7 ? 35 : _i == 6 ? 20 : _i == 5 ? 10 : _i == 4 ? 4 : _i == 3 ? 1 : 0
    _m4 := _i == 9 ? 126 : _i == 8 ? 70 : _i == 7 ? 35 : _i == 6 ? 15 : _i == 5 ? 5  : _i == 4 ? 1 : 0
    _m5 := _i == 9 ? 126 : _i == 8 ? 56 : _i == 7 ? 21 : _i == 6 ? 6  : _i == 5 ? 1  : 0 
    _m6 := _i == 9 ? 84  : _i == 8 ? 28 : _i == 7 ? 7  : _i == 6 ? 1  : 0 
    _m7 := _i == 9 ? 36  : _i == 8 ? 8  : _i == 7 ? 1  : 0 
    _m8 := _i == 9 ? 9   : _i == 8 ? 1  : 0 
    _m9 := _i == 9 ? 1   : 0
    _f := math.pow(_a, _i) * nz(_s) +
         _i  *     _x      * nz(_f[1])      - (_i >= 2 ?
         _m2 * math.pow(_x, 2)  * nz(_f[2]) : 0) + (_i >= 3 ?
         _m3 * math.pow(_x, 3)  * nz(_f[3]) : 0) - (_i >= 4 ?
         _m4 * math.pow(_x, 4)  * nz(_f[4]) : 0) + (_i >= 5 ?
         _m5 * math.pow(_x, 5)  * nz(_f[5]) : 0) - (_i >= 6 ?
         _m6 * math.pow(_x, 6)  * nz(_f[6]) : 0) + (_i >= 7 ?
         _m7 * math.pow(_x, 7)  * nz(_f[7]) : 0) - (_i >= 8 ?
         _m8 * math.pow(_x, 8)  * nz(_f[8]) : 0) + (_i == 9 ?
         _m9 * math.pow(_x, 9)  * nz(_f[9]) : 0)

f_pole(_a, _s, _i) =>
    _f1 =            f_filt9x(_a, _s, 1),      _f2 = (_i >= 2 ? f_filt9x(_a, _s, 2) : 0), _f3 = (_i >= 3 ? f_filt9x(_a, _s, 3) : 0)
    _f4 = (_i >= 4 ? f_filt9x(_a, _s, 4) : 0), _f5 = (_i >= 5 ? f_filt9x(_a, _s, 5) : 0), _f6 = (_i >= 6 ? f_filt9x(_a, _s, 6) : 0)
    _f7 = (_i >= 7 ? f_filt9x(_a, _s, 7) : 0), _f8 = (_i >= 8 ? f_filt9x(_a, _s, 8) : 0), _f9 = (_i == 9 ? f_filt9x(_a, _s, 9) : 0)
    _fn = _i == 1 ? _f1 : _i == 2 ? _f2 : _i == 3 ? _f3 : _i == 4 ? _f4 : _i == 5 ? _f5 : _i == 6 ? _f6 : _i == 7 ? _f7 : _i == 8 ? _f8 : _i == 9 ? _f9 : na
    [_fn, _f1]

beta  = (1 - math.cos(4*math.asin(1)/per)) / (math.pow(1.414, 2/N_poles) - 1)
alpha = - beta + math.sqrt(math.pow(beta, 2) + 2*beta)

lag = (per - 1) / (2.0 * N_poles)

srcdata = modeLag ? src + (src - nz(src[lag])) : src
tr_raw  = ta.tr(true)
trdata  = modeLag ? tr_raw + (tr_raw - nz(tr_raw[lag])) : tr_raw

[filt_n, filt_1]       = f_pole(alpha, srcdata, N_poles)
[filt_n_tr, filt_1_tr] = f_pole(alpha, trdata,  N_poles)

filt   = modeFast ? (filt_n + filt_1)/2.0 : filt_n
filttr = modeFast ? (filt_n_tr + filt_1_tr)/2.0 : filt_n_tr

hband = filt + filttr * mult
lband = filt - filttr * mult

// =============================
// ===== Signals & Filters =====
// =============================
doLong  = close > filt and close > kijun and v_va > vapiThresh
doShort = close < filt and close < kijun and v_va < -vapiThresh

// =============================
// ===== Position Sizing =======
// =============================
riskValue   = strategy.equity * (riskPct/100.0)
slDist      = atr * slATRmul
qtyTotal    = slDist > 0 ? riskValue / slDist : 0.0
qtyA        = qtyTotal * (allocA/100.0)
qtyB        = qtyTotal * ((100 - allocA)/100.0)

// =============================
// ===== Order Execution =======
// =============================
var float trailStopL = na
var float trailStopS = na

inLong  = strategy.position_size > 0
inShort = strategy.position_size < 0
entryPx = strategy.position_avg_price

// Entries
if doLong and not inLong and strategy.position_size <= 0
    strategy.order("L-A", strategy.long, qty=qtyA)
    strategy.order("L-B", strategy.long, qty=qtyB)
    trailStopL := na
if doShort and not inShort and strategy.position_size >= 0
    strategy.order("S-A", strategy.short, qty=qtyA)
    strategy.order("S-B", strategy.short, qty=qtyB)
    trailStopS := na

// LONG management
if inLong
    slL = entryPx - slDist
    tpA = entryPx + rr_fixed * slDist

    // Leg A: 固定RR止盈 + 止损
    strategy.exit("TP/SL-LA", from_entry="L-A", limit=tpA, stop=slL)

    // Leg B: 追踪止损
    trailStopL := na(trailStopL[1]) or strategy.position_size[1] <= 0 ? slL : math.max(trailStopL[1], close - slDist)
    strategy.exit("Trail-LB", from_entry="L-B", stop=trailStopL)

    // 额外百分比止盈
    if tpEnable and high >= entryPx * (1 + tpPctLong/100.0)
        strategy.close("L-A", comment="ExtraTP")
        strategy.close("L-B", comment="ExtraTP")

// SHORT management
if inShort
    slS = entryPx + slDist
    tpA = entryPx - rr_fixed * slDist

    // Leg A: 固定RR止盈 + 止损
    strategy.exit("TP/SL-SA", from_entry="S-A", limit=tpA, stop=slS)

    // Leg B: 追踪止损
    trailStopS := na(trailStopS[1]) or strategy.position_size[1] >= 0 ? slS : math.min(trailStopS[1], close + slDist)
    strategy.exit("Trail-SB", from_entry="S-B", stop=trailStopS)

    // 额外百分比止盈
    if tpEnable and low <= entryPx * (1 - tpPctShort/100.0)
        strategy.close("S-A", comment="ExtraTP")
        strategy.close("S-B", comment="ExtraTP")

// =============================
// ===== 图表绘制 ==============
// =============================
fcolor = filt > nz(filt[1]) ? color.new(color.lime, 0) : filt < nz(filt[1]) ? color.new(color.red, 0) : color.new(color.gray, 0)
plotFilter = plot(filt,  title="GC Filter",    color=fcolor, linewidth=2)
plotH      = plot(hband, title="GC High Band", color=fcolor)
plotL      = plot(lband, title="GC Low Band",  color=fcolor)
fill(plotH, plotL, color=color.new(fcolor, 80))

plot(kijun, "Kijun-Sen", color=color.new(color.maroon, 0))

// 信号标记
plotshape(doLong,  title="Long Setup",  style=shape.triangleup,   location=location.belowbar, color=color.new(color.lime, 0), size=size.tiny, text="ENTRY L")
plotshape(doShort, title="Short Setup", style=shape.triangledown, location=location.abovebar, color=color.new(color.fuchsia, 0), size=size.tiny, text="ENTRY S")