波動性 有限量要素戦略

作者: リン・ハーンチャオチャン, 日時: 2023-12-19 15:23:59
タグ:

img

概要

この戦略は,有限量要素 (FVE) 指標に基づいた改善である.FVEは価格変化を考慮しない純粋な量指標であり,資金流入と流出に集中する.この戦略は,市場情勢と資金流出を判断するために,FVEに基づいて波動性に基づいて取引量を彩る.

戦略原則

戦略は日中の変動を計算する.Intra日間変動Inter標準偏差と組み合わせたVintraそしてVinter変動率の限界値を得るためにCutOff計算するとMF資金の流入 (正) や流出 (負) を判断するために,前回の中間価格,前回の中間価格,およびボリュームとの間を区別します.MF超えているCutOff取引量と変動が同じ方向で,市場が明らかに熱狂していることを意味します.MF負より小さいCutOff取引量と変動が同じ方向にあることを意味し,市場には明らかな悲観主義があり,色は赤に設定されています.そうでなければ色は青です.最後に,色に基づいて長/短方向を決定します.

利点分析

この戦略は,市場情勢をより正確に判断するために,取引量と変動指標を組み合わせます.単一の指標と比較して,判断の安定性と信頼性の利点があります. さらに,この戦略の判断基準は,特に変動のために設計されており,異なる市場状況の変化にうまく適応することができます.

リスク分析

この戦略は,取引量と波動性指標に依存している.両者の間の不一致は判断に影響を与える.さらに,パラメータ設定は結果により大きな影響を与え,異なる種類とパラメータ組み合わせからの結果の大きな違いがあり,標的型最適化が必要です.

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

判断を助けるために,MACD,OBVなどの他の指標を組み合わせることを検討し,取引量と変動からの騒音を避ける.また,安定性を向上させるために異なる市場状況に応じてパラメータを動的に調整するための適応パラメータメカニズムを設計することも可能です.または,特定の品種のための最適なパラメータポートフォリオを見つけるためにパラメータをバックテストし最適化することができます.

概要

この戦略は,市場熱意のレベルを判断するために,取引量と波動性指標の利点を統合している.単一の指標と比較して,判断精度と安定性が高い.しかし,パラメータ設定と多様性差は結果に重大な影響を持ち,さまざまな取引環境に適応するために,さらなる最適化と調整が必要である.全体として,この戦略は合理的な理論的基盤と改善の可能性が大きい.


/*backtest
start: 2022-12-12 00:00:00
end: 2023-12-18 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=2
////////////////////////////////////////////////////////////
//  Copyright by HPotter v1.0 22/08/2017
// The FVE is a pure volume indicator. Unlike most of the other indicators 
// (except OBV), price change doesn?t come into the equation for the FVE 
// (price is not multiplied by volume), but is only used to determine whether 
// money is flowing in or out of the stock. This is contrary to the current trend 
// in the design of modern money flow indicators. The author decided against a 
// price-volume indicator for the following reasons:
// - A pure volume indicator has more power to contradict.
// - The number of buyers or sellers (which is assessed by volume) will be the same, 
// regardless of the price fluctuation.
// - Price-volume indicators tend to spike excessively at breakouts or breakdowns.
// This study is an addition to FVE indicator. Indicator plots different-coloured volume 
// bars depending on volatility.
//
// You can change long to short in the Input Settings
// Please, use it only for learning or paper trading. Do not for real trading.
////////////////////////////////////////////////////////////
strategy(title="Volatility Finite Volume Elements Strategy", shorttitle="FVI")
Samples = input(22, minval=1)
AvgLength = input(50, minval=1)
AlertPct = input(70, minval=1)
Cintra = input(0.1, step = 0.1)
Cinter = input(0.1, step = 0.1)
reverse = input(false, title="Trade reverse")
xVolume = volume
xClose = close
xhl2 = hl2
xhlc3 = hlc3
xMA = sma(xVolume, AvgLength)
xIntra = log(high) - log(low)
xInter = log(xhlc3) - log(xhlc3[1])
xStDevIntra = stdev(xIntra, Samples)
xStDevInter = stdev(xInter, Samples)
TP = xhlc3
TP1 = xhlc3[1]
Intra = xIntra
Vintra = xStDevIntra
Inter = xInter
Vinter = xStDevInter
CutOff = Cintra * Vintra + Cinter * Vinter
MF = xClose - xhl2 + TP - TP1
clr = iff(MF > CutOff * xClose, green, 
             iff(MF < -1 * CutOff * xClose, red,  blue))
pos = iff(MF > CutOff * xClose, 1,
	   iff(MF < -1 * CutOff * xClose, -1, nz(pos[1], 0))) 
possig = iff(reverse and pos == 1, -1,
          iff(reverse and pos == -1, 1, pos))	   
if (possig == 1) 
    strategy.entry("Long", strategy.long)
if (possig == -1)
    strategy.entry("Short", strategy.short)	   	    
barcolor(possig == -1 ? red: possig == 1 ? green : blue )           
plot(xVolume, color=clr, title="VBF")
plot(xMA, color=blue, title="VBF EMA")

もっと