多要素量的な取引戦略

作者: リン・ハーンチャオチャン, 日付: 2023-09-13 14:46:59
タグ:

リスクを制御し安定性を向上させるために移動平均因子と振動指標を統合する多要素量的な取引戦略.この記事では,この取引戦略の理性,利点および潜在的なリスクを詳細に説明します.

戦略の論理

戦略は3つの主要モジュールで構成されています.

  1. 移動 平均 的 要因

5つの異なる期間の (8, 13, 21, 34, 55) EMA を使用してトレンドフィルターを構築する.MAsは短から長に並べられている.高速な EMAが遅い EMAを横切ったときのみ,トレンド信号が生成される.

  1. 振動する指標

RSIとストカスティックオシレーターを組み合わせてブレイクシグナルを検証し,変動市場における過剰な偽ブレイクを回避する.

RSI (14) は40~70の範囲で長い信号,30~60の範囲で短い信号を生成します.

ストカスティック (14,3,3) は,K線が20−80の間にあるときの長信号と,K線が5−95の間にあるときの短信号を表示する.

  1. 入口と出口の論理

入力信号は,2つの要素が一致したときにのみ発生する.出力信号は,1つの要素が有効でないときに発生する.

厳格なマルチファクターフィルターは 高勝率と信頼性の高い信号を保証します

利点

  • 多要素設計は市場の騒音を効果的にフィルタリングし,過剰取引を防止します
  • トレンドフォローと平均逆転を組み合わせ,ダイナミック取引とロケーション取引をバランスします.
  • MAとオシレーターを使用してトレンド内の逆転点を記録する.
  • より良いパフォーマンスを得るために大きな最適化スペース

リスク

  • 比較的低い信号周波数で 機会を逃すかもしれない
  • MAの遅延は,より速い振動器で確認する必要があります.
  • 誤った信号に敏感な振動器は,補助要素として使用されるべきです.
  • パラメータは,変化する市場状況に適応するために定期的に最適化する必要があります.

結論

この戦略は,トレンドフォローとリバーサル・トレード戦略の強みをうまく組み合わせています.多要素リスクコントロールモデルは安定したアルファを提供します.AIコミュニティによる深入の研究と適用に値する非常に実践的な定量的なトレード戦略です.


/*backtest
start: 2022-09-12 00:00:00
end: 2022-11-15 00:00:00
period: 2d
basePeriod: 1d
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=3
strategy(title = "Combined Strategy", default_qty_type = strategy.percent_of_equity, default_qty_value = 100, commission_type=strategy.commission.percent, commission_value = .0020, pyramiding = 0, slippage = 3, overlay = true)

//----------//
// MOMENTUM //
//----------//
ema8 = ema(close, 8)
ema13 = ema(close, 13)
ema21 = ema(close, 21)
ema34 = ema(close, 34)
ema55 = ema(close, 55)

plot(ema8, color=red, style=line, title="8", linewidth=1)
plot(ema13, color=orange, style=line, title="13", linewidth=1)
plot(ema21, color=yellow, style=line, title="21", linewidth=1)
plot(ema34, color=aqua, style=line, title="34", linewidth=1)
plot(ema55, color=lime, style=line, title="55", linewidth=1)

longEmaCondition = ema8 > ema13 and ema13 > ema21 and ema21 > ema34 and ema34 > ema55
exitLongEmaCondition = ema13 < ema55

shortEmaCondition = ema8 < ema13 and ema13 < ema21 and ema21 < ema34 and ema34 < ema55
exitShortEmaCondition = ema13 > ema55

// ----------  //
// OSCILLATORS //
// ----------- //
rsi = rsi(close, 14)
longRsiCondition = rsi < 70 and rsi > 40
exitLongRsiCondition = rsi > 70

shortRsiCondition = rsi > 30 and rsi < 60
exitShortRsiCondition = rsi < 30

// Stochastic
length = 14, smoothK = 3, smoothD = 3
kFast = stoch(close, high, low, 14)
dSlow = sma(kFast, smoothD)

longStochasticCondition = kFast < 80
exitLongStochasticCondition = kFast > 95

shortStochasticCondition = kFast > 20
exitShortStochasticCondition = kFast < 5

//----------//
// STRATEGY //
//----------//

longCondition = longEmaCondition and longRsiCondition and longStochasticCondition and strategy.position_size == 0
exitLongCondition = (exitLongEmaCondition or exitLongRsiCondition or exitLongStochasticCondition) and strategy.position_size > 0

if (longCondition)
    strategy.entry("LONG", strategy.long)
if (exitLongCondition)
    strategy.close("LONG")
    
shortCondition = shortEmaCondition and shortRsiCondition and shortStochasticCondition and strategy.position_size == 0
exitShortCondition = (exitShortEmaCondition or exitShortRsiCondition or exitShortStochasticCondition) and strategy.position_size < 0

if (shortCondition)
    strategy.entry("SHORT", strategy.short)
if (exitShortCondition)
    strategy.close("SHORT")

もっと