量重量平均価格戦略

作者: リン・ハーンチャオチャン,日付: 2023-12-29 16:31:33
タグ:

img

概要

ボリューム・ウェイト・平均価格 (VWAP) 戦略は,特定の時間間にわたって株式の平均価格を追跡する戦略である.この戦略は,VWAPをベンチマークとして使用し,価格がVWAP以上または以下を横断するときにロングまたはショートポジションをとる.また,ストップ・ロストと利益条件を設定し,取引を管理する.

戦略の論理

この戦略は,まず典型的な価格 (高値,低値,閉値の平均値) を量で掛け,そして総量で計算する.次に,典型価格・総量製品の合計を総量で割ることでVWAPを計算する.価格がVWAPを超えると,ロングに行く.価格が以下を超えると,ショートに行く.

ロングポジションの利益取得条件は,価格がエントリー価格より3%上昇すると閉じる.ストップロスの条件は,価格がエントリー価格より1%下落すると閉じる.ショートポジションにも同様の条件が適用される.

利点分析

VWAP戦略の主な利点は以下の通りである.

  1. 取引信号の基準として,よく知られているVWAP統計を使用し,戦略をより効率的にします.

  2. Vwap 信号とストップ・ロスト/利益引き合わせの両方を利用し,トレンドから利益を得て損失を制限する.

  3. シンプルで明快な論理で 分かりやすく実行できます

リスク分析

この戦略にはいくつかのリスクもあります:

  1. VWAPは将来の価格を予測できないので 信号が遅れる可能性があります

  2. ストップ・ロスは幅が大きくなり,潜在的な損失が増加する可能性があります.

  3. バックテストが長くなったら 信号が増えるので 実際の性能は違います

これらのリスクは,パラメータ調整,ストップ損失アルゴリズムの最適化などによって軽減できる.

オプティマイゼーションの方向性

戦略を最適化する方法には以下の通りがあります.

  1. 最適な計算期間を見つけるために VWAP パラメータを最適化します.

  2. 他の追跡停止アルゴリズムをテストする.例えば移動平均停止,パラボリックSAR.

  3. VWAP信号をフィルタリングするために他の指標を組み合わせます.例えば,ボリューム,ボリンジャー帯.

結論

要約すると,VWAP戦略は,この重要な統計の予測力を利用し,長期的ポジティブな期待を達成するためにストップ損失/利益を取ります.しかし,より大きな収益性のために市場変動リスクを軽減するために,さらなる最適化と他の戦略との組み合わせが必要です.


/*backtest
start: 2023-11-28 00:00:00
end: 2023-12-28 00:00:00
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=4
strategy("VWAP Strategy by Royce Mars", overlay=true)

cumulativePeriod = input(14, "Period")

var float cumulativeTypicalPriceVolume = 0.0
var float cumulativeVolume = 0.0

typicalPrice = (high + low + close) / 3
typicalPriceVolume = typicalPrice * volume
cumulativeTypicalPriceVolume := cumulativeTypicalPriceVolume + typicalPriceVolume
cumulativeVolume := cumulativeVolume + volume
vwapValue = cumulativeTypicalPriceVolume / cumulativeVolume

// Buy condition: Price crosses over VWAP
buyCondition = crossover(close, vwapValue)

// Short condition: Price crosses below VWAP
shortCondition = crossunder(close, vwapValue)

// Profit-taking condition for long positions: Sell long position when profit reaches 3%
profitTakingLongCondition = close / strategy.position_avg_price >= 1.03

// Profit-taking condition for short positions: Cover short position when profit reaches 3%
profitTakingShortCondition = close / strategy.position_avg_price <= 0.97

// Stop loss condition for long positions: Sell long position when loss reaches 1%
stopLossLongCondition = close / strategy.position_avg_price <= 0.99

// Stop loss condition for short positions: Cover short position when loss reaches 1%
stopLossShortCondition = close / strategy.position_avg_price >= 1.01

// Strategy Execution
strategy.entry("Buy", strategy.long, when=buyCondition)
strategy.close("Buy", when=shortCondition or profitTakingLongCondition or stopLossLongCondition)

strategy.entry("Short", strategy.short, when=shortCondition)
strategy.close("Short", when=buyCondition or profitTakingShortCondition or stopLossShortCondition)

// Plot VWAP on the chart
plot(vwapValue, color=color.blue, title="VWAP")


もっと