ランダムな運に基づいた単純な取引戦略

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

この戦略は"ランダムラッキーに基づくシンプル・トレーディング・戦略"と呼ばれる.これは,ランダムな方法を使って,毎週最初の取引日にロング・またはショート・シグナルを生成し,大量に繰り返されるテストを通じてランダムな取引のパフォーマンスを評価する.

取引の論理は とてもシンプルです

  1. 毎週月曜日にコインを投げると ランダムに表か尾の結果が出ます

  2. 首なら,その日,ロング,尾ならショート.

  3. ストップ・ロスを 1 x ATR に設定し,ロングの場合 1 x ATR で利益を得て,ショートの場合 1 x ATR で利益を得て,リスク・リターン比は 1:1 に達します.

  4. 週末まで 位置を保持して 閉じる

利点は,ランダム取引の平均勝利率を評価するために,長年のデータをバックテストすることです.取引規則は非常にシンプルで,比較のためのベンチマークベースラインとして機能できます.

しかし,ランダムな取引は市場パターンを利用することができず,持続的な利益を生む可能性は低い.固定ストップ損失と利益を取ることも損失を拡大するリスクがあります.トレーダーはそれを実験戦略としてのみ使用することができ,ライブ取引には使用できません.

結論として,バックテスト結果はランダムな取引の結果を示唆するが,実際に適用可能な戦略を代表するものではない.トレーダーは最終的に依然として裁量力と体系的な取引技術を必要としている.


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

//@version=5
strategy("CoinFlip", overlay = true)

int result = int(math.random()+0.5)
atr_period = input(defval = 20, title = "ATR Period")
year_to_test = input(defval = 2022, title = "Year to Test")
day_of_week = input(defval = 1, title = "Day of Week")

atr = ta.atr(atr_period)

shouldSell = result == 0 and dayofweek == day_of_week
shouldBuy = result == 1 and dayofweek == day_of_week 

plotshape(result == 0 and dayofmonth == day_of_week, title="sell", location=location.abovebar, color=color.red, transp=0, style=shape.arrowdown)
plotshape(result == 1 and dayofmonth == day_of_week, title="buy", location=location.belowbar, color=color.lime, transp=0, style=shape.arrowup)


strategy.entry("short entry", strategy.short, 1000 / (1*atr), when=shouldSell and year == year_to_test)
strategy.entry("long entry", strategy.long,  1000  / (1*atr), when=shouldBuy and year == year_to_test)

strategy.exit("exit", "long entry", limit = close + 1*atr, stop = close - 1*atr, when = shouldBuy)
strategy.exit("exit", "short entry", limit = close - 1*atr, stop = close + 1*atr, when = shouldSell)



もっと