
黄金分割式平均値回帰トレンド取引戦略は,通道指標と移動平均を使用して,より強いトレンドの方向を識別し,価格が一定割合の反転が発生した後,トレンドの方向にポジションを開くことができます. この戦略は,より強いトレンドの特徴を持つ市場に適しており,トレンドの状況でより良いパフォーマンスを得ることができます.
この戦略の核心指標には,通路指標,移動平均,リコールトリガーラインが含まれている.具体的には:
価格がチャネルの底に触れたとき,戦略は最低点を参照点として記録し,空白を許容する標識を設定する.価格が上昇したときに,上昇幅が回調比に達すると,反発点の近くで空白を打開する.
逆に,価格がチャネルの頂点に触れたとき,戦略は最高点を参照点として記録し,多行符号を許容するように設定する.価格が下がったとき,下落幅が回調比率要求に達した場合,その点の近くで多行を開く.
したがって,この戦略の取引論理は,価格チャネルを追跡し,反転シグナルが発生したときに適切なポイントを選択して既存のトレンドに介入することです.これはトレンドリバーシング型の取引戦略の一般的な套路です.
この戦略の利点は以下の通りです.
具体的には,戦略は主にトレンドの逆転点でポジションを開くため,価格の変動が大きく,トレンドが顕著な市場ではより効果的である.さらに,回帰比率のパラメータを調整することで,戦略のトレンド追跡の激進度を制御することができる.最後に,ストップ・ロスの方法によって単一損失を制御することができる.
この戦略には以下の主要なリスクがあります.
具体的には,戦略が適用される取引品種の傾向が弱く,波動が小さい場合,効果は割引される可能性があります.また,回収比率が大きすぎたり小さすぎたりすると,戦略のパフォーマンスに影響します.最後に,戦略のポジションの時間帯が長い可能性があるため,また,夜間リスクの管理にも注意する必要があります.
上記のリスクを回避するために,以下の側面を最適化することを検討できます.
黄金分割式平均値回帰トレンド取引戦略は,単純な指標によって価格トレンドと回調シグナルを判断し,強気な状況でポジション追跡トレンドを開く,より典型的なトレンドシステムに属している.この戦略のパラメータ調整の余地が大きいので,最適化によりより多くの市場環境に適応することができ,リスク管理もより合理的である.したがって,それは実用的にテストし,改良する価値のある最適化戦略のアイデアである.
/*backtest
start: 2022-11-30 00:00:00
end: 2023-12-06 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=3
//
// A port of the TradeStation EasyLanguage code for a mean-revision strategy described at
// http://traders.com/Documentation/FEEDbk_docs/2017/01/TradersTips.html
//
// "In “Mean-Reversion Swing Trading,” which appeared in the December 2016 issue of STOCKS & COMMODITIES, author Ken Calhoun
// describes a trading methodology where the trader attempts to enter an existing trend after there has been a pullback.
// He suggests looking for 50% pullbacks in strong trends and waiting for price to move back in the direction of the trend
// before entering the trade."
//
// See Also:
// - 9 Mistakes Quants Make that Cause Backtests to Lie (https://blog.quantopian.com/9-mistakes-quants-make-that-cause-backtests-to-lie-by-tucker-balch-ph-d/)
// - When Backtests Meet Reality (http://financial-hacker.com/Backtest.pdf)
// - Why MT4 backtesting does not work (http://www.stevehopwoodforex.com/phpBB3/viewtopic.php?f=28&t=4020)
//
//
// -----------------------------------------------------------------------------
// Copyright 2018 sherwind
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// The GNU General Public License can be found here
// <http://www.gnu.org/licenses/>.
//
// -----------------------------------------------------------------------------
//
strategy("Mean-Reversion Swing Trading Strategy v1", shorttitle="MRST Strategy v1", overlay=true)
channel_len = input(defval=20, title="Channel Period", minval=1)
pullback_pct = input(defval=0.5, title="Percent Pull Back Trigger", minval=0.01, maxval=1, step=0.01)
trend_filter_len = input(defval=50, title="Trend MA Period", minval=1)
upper_band = highest(high, channel_len)
lower_band = lowest(low, channel_len)
trend = sma(close, trend_filter_len)
low_ref = 0.0
low_ref := nz(low_ref[1])
high_ref = 0.0
high_ref := nz(high_ref[1])
long_ok = false
long_ok := nz(long_ok[1])
short_ok = false
short_ok := nz(short_ok[1])
long_ok2 = false
long_ok2 := nz(long_ok2[1])
if (low == lower_band)
low_ref := low
long_ok := false
short_ok := true
long_ok2 := false
if (high == upper_band)
high_ref := high
long_ok := true
short_ok := false
long_ok2 := true
// Pull Back Level
trigger = long_ok2 ? high_ref - pullback_pct * (high_ref - low_ref) : low_ref + pullback_pct * (high_ref - low_ref)
plot(upper_band, title="Upper Band", color=long_ok2?green:red)
plot(lower_band, title="Lower Band", color=long_ok2?green:red)
plot(trigger, title="Trigger", color=purple)
plot(trend, title="Trend", color=orange)
enter_long = long_ok[1] and long_ok and crossover(close, trigger) and close > trend and strategy.position_size <= 0
enter_short = short_ok[1] and short_ok and crossunder(close, trigger) and close < trend and strategy.position_size >= 0
if (enter_long)
long_ok := false
strategy.entry("pullback-long", strategy.long, stop=close, comment="pullback-long")
else
strategy.cancel("pullback-long")
if (enter_short)
short_ok := false
strategy.entry("pullback-short", strategy.short, stop=close, comment="pullback-short")
else
strategy.cancel("pullback-short")
strategy.exit("exit-long", "pullback-long", limit=upper_band, stop=lower_band)
strategy.exit("exit-short", "pullback-short", limit=lower_band, stop=upper_band)