
この戦略は,量化モデルに基づいてカスタマイズされた高効率の量化取引戦略である.この戦略は,Modelius Volumeモデルを基本モデルとして使用し,その基礎で拡張および最適化が行われている.この戦略は,市場内の量化取引機会を捕捉し,安定した利益を達成することができる.
この戦略の核心は,Modelius Volumeモデルである.このモデルは,価格,取引量の変化を利用して,市場における量的な取引機会を識別する.具体的には,戦略は,クローズ価格,オープン価格,最高価格,最低価格を使用して,特定のルールに従って現在のK線の方向を計算する.K線の方向が変化するときに,取引量の大きさによって取引機会の質を量的に判断する.さらに,戦略は,SAR指標と均等線指標を組み合わせて,場入りと場出の判断を助ける.
基本取引の論理は,指数が負から正に突破するときは,多めにすること;指数が正から負に突破するときは,空いてすることである.さらに,戦略は,リスクを制御するために止損,ストップ・ストップ,トラッキング・ストップを設定する.
この戦略の最大の利点は,Modelius Volumeモデルを利用して,量化取引の機会を効果的に識別できるという点にある.従来の技術指標と比較して,このモデルは取引量の変化に注目しており,これは現在の高頻度量化取引において非常に実用的である.また,戦略の入場規則は比較的厳格であり,量化取引の機会を逃すことなく,乱雑の確率を最小限に抑えることができる.
この戦略の主なリスクは,Modelius Volumeモデル自体でノイズを完全に回避できないことにある.市場が異常な波動を起こしたとき,取引信号が誤って発生する可能性がある.さらに,戦略内のパラメータ設定も最終結果に影響を与える.
リスクを制御するために,パラメータを適切に調整し,他の指標と組み合わせて補助判断を行うことができる.
この戦略には,いくつかの最適化の余地もあります.例えば,機械学習アルゴリズムを組み合わせて,動的に最適化パラメータの設定を考慮することができます.または,感情分析などの指標を組み合わせて,意思決定の正確性を向上させることができます.さらに,異なる品種間の関連性を研究し,多品種アバरेजモデルを構築することもできます.
全体として,この戦略は,Modelius Volumeの量化モデルの優位性を活用して,操作性の高い量化取引戦略を設計した.パラメータ調整,モデル拡張,機械学習などの方法で最適化強化することができ,実際の取引でより良い安定した利益を得ることができる.
/*backtest
start: 2022-12-15 00:00:00
end: 2023-12-21 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=3
strategy(title="strategy modelius volume model ", shorttitle="mvm",overlay=true, calc_on_order_fills=true, default_qty_type=strategy.percent_of_equity, default_qty_value=50, overlay=false)
method = input(defval="ATR", options=["ATR", "Traditional", "Part of Price"], title="Renko Assignment Method")
methodvalue = input(defval=14.0, type=float, minval=0, title="Value")
pricesource = input(defval="Close", options=["Close", "Open / Close", "High / Low"], title="Price Source")
useClose = pricesource == "Close"
useOpenClose = pricesource == "Open / Close" or useClose
useTrueRange = input(defval="Auto", options=["Always", "Auto", "Never"], title="Use True Range instead of Volume")
isOscillating=input(defval=true, type=bool, title="Oscillating")
normalize=input(defval=false, type=bool, title="Normalize")
vol = useTrueRange == "Always" or (useTrueRange == "Auto" and na(volume))? tr : volume
op = useClose ? close : open
hi = useOpenClose ? close >= op ? close : op : high
lo = useOpenClose ? close <= op ? close : op : low
if method == "ATR"
methodvalue := atr(round(methodvalue))
if method == "Part of Price"
methodvalue := close/methodvalue
currclose = na
prevclose = nz(currclose[1])
prevhigh = prevclose + methodvalue
prevlow = prevclose - methodvalue
currclose := hi > prevhigh ? hi : lo < prevlow ? lo : prevclose
direction = na
direction := currclose > prevclose ? 1 : currclose < prevclose ? -1 : nz(direction[1])
directionHasChanged = change(direction) != 0
directionIsUp = direction > 0
directionIsDown = direction < 0
barcount = 1
barcount := not directionHasChanged and normalize ? barcount[1] + barcount : barcount
vol := not directionHasChanged ? vol[1] + vol : vol
res = barcount > 1 ? vol/barcount : vol
x=isOscillating and directionIsDown ? -res : res
TP = input(0) * 10
SL = input(0) * 10
TS = input(1) * 10
TO = input(3) * 10
CQ = 100
TPP = (TP > 0) ? TP : na
SLP = (SL > 0) ? SL : na
TSP = (TS > 0) ? TS : na
TOP = (TO > 0) ? TO : na
longCondition = crossover(x,0)
if (longCondition)
strategy.entry("Long", strategy.long)
shortCondition = crossunder(x,0)
if (shortCondition)
strategy.entry("Short", strategy.short)
strategy.exit("Close Short", "Short", qty_percent=CQ, profit=TPP, loss=SLP, trail_points=TSP, trail_offset=TOP)
strategy.exit("Close Long", "Long", qty_percent=CQ, profit=TPP, loss=SLP, trail_points=TSP, trail_offset=TOP)