BB shift
検討
資金量とロスカットの算出を、ATR ではなく、 ATR + 2 * STDEV にすると良いのでは?
信用区間で、ロスカットに掛かりづらくなる
つまり、ロスカットの目的に沿っている
試す(単利)
table:結果
勝率 RR 破産0%の最大リスク 期待値
ATR 29.37% 2.96 3.4% 0.092
ATR + 2 * STDEV 35.19% 2.068 2.5% 0.08
別に良くはない
ロジック最終版
2020-06
table:logic
BB 25 shift 5
table:RiskManagement
SO-Exit 1-ATR LOAD 3
SO-Entry 1-ATR TrailingStop モデル1to0
table:AssetManagement
Trade 1% Unit/Day 1%
table:Filters
Valid Long Valid Short
spread x < 0.125 x <= 0.2
diff_c -0.3 <= x <= 1.75 x <= 0.5
TR_stdev_index x < 0.65 x < 0.75
diff_BB_upper_shift_index -0.002 <= x < 0.002 -0.0015 < x < 0.001
diff_BB_lower_shift_index -0.001 < x < 0.002 -0.0015 < x < 0.002
CFTC_total_spreads_diff x < 15000
CFTC_dealer_spreads_diff -20000 < x < 20000
ADOSC_index -150 <= x <= 300 -250 <= x
Vol_index x < 150
SPX_c_sma -60 < x -125 < x < 75
SHC_c_sma -300 < x -500 < x < 400
GC_c_sma -100 < x < 100 -75 < x < 75
US10Y_c_sma -0.3 <= x -0.3 < x
ichi_value x != 4 and x != 3
weekday x != Sat.
2020-02
table:logic
BB 25 shift 5
table:RiskManagement
SO-Exit 1-ATR LOAD 3
SO-Entry 1-ATR TrailingStop モデル1:1
table:AssetManagement
Trade 1% Unit/Day 1%
table:Filters
Valid Long Valid Short
spread x < 0.125 x <= 0.2
diff_c -0.3 <= x <= 1.75 x <= 0.5
TR_stdev_index x < 0.65 x < 0.75
diff_BB_upper_shift_index -0.002 <= x < 0.002 -0.0015 < x < 0.001
diff_BB_lower_shift_index -0.001 < x < 0.002 -0.0015 < x < 0.002
CFTC_total_spreads_diff x < 15000
CFTC_dealer_spreads_diff -20000 < x < 20000
ADOSC_index -150 <= x <= 300 -250 <= x
Vol_index x < 150
SPX_c_sma -60 < x -125 < x < 75
SHC_c_sma -300 < x -500 < x < 400
GC_c_sma -100 < x < 100 -75 < x < 75
US10Y_c_sma -0.3 <= x -0.3 < x
ichi_value x != 4 and x != 3
weekday x != Sat.
1909
table:logic
BB 25 shift 5
table:RiskManagement
SO-Exit 1-ATR LOAD 4
SO-Entry 1-ATR TrailingStop モデル1:1
table:AssetManagement
Trade 1% Unit/Day 1%
フィルターの選定
初回のテスト結果…累計損益/atr
table:filter_test
00 ベンチマーク 389.349
01 spread_filter 441.323 02 diff_c_filter 406.587
03 TR_stdev_filter 408.944 04 diff_BBu_filter 400.389
05 diff_BBl_filter 420.659 06 ADOSC_filter 402.190
07 Volume_filter 400.528 08 CFTC_total_filter 390.104
09 CFTC_dealer_filter 423.881 10 SPX_filter 421.359
11 SHC_filter 406.706 12 GC_filter 412.208
13 US10Y_filter 411.442 14 ichimoku_filter 391.756
15 week_filter 415.705 all 606.536
https://gyazo.com/ca400c105d0f318a002691c228e70517
完成版
table:filter_test
00 ベンチマーク 389.349 all 606.536
https://gyazo.com/72164d49796123101dd416caf3db327b
https://gyazo.com/e7b13a6c55d6965a8a4cc8cab9cdb62c
Long
説明変数のうち相関の強いものは排除。排除したもので重回帰分析に掛ける。
アウトカムは「PL/atr」で検証
https://gyazo.com/c467d1eef4cad7e945c36796c3169263
成果の上がりそうなものを単回帰分析に掛けて確認する。
まずは、1ユニットで終わるトレードをフィルタリングする
フィルターを探すためとすると「回帰係数に表れない良い特性」もあり得る
結局すべて目を通す
主要な変数
https://gyazo.com/ee104fef6c7302bbb1b1ebfe0281be82
フィルター候補(買いエントリー)
spread < 0.125
-0.1 <= diff_c <= 1.75 → -0.3 <= diff_c
TR_stdev_index < 0.65
https://gyazo.com/ceaf59eee8dcdd9c44cca4375c8fa908
フィルター候補
-0.002 <= diff_BB_upper_shift_index < 0.002
-0.001 < diff_BB_lower_shift_index < 0.002
-100 < ADOSC_index < 250 → -150 < ADOSC_index < 300
https://gyazo.com/606df664902cc9fabe18ae899f367f40
フィルター候補
GBPJPY_total_spreads_diff < 15000
https://gyazo.com/ad2b95c91f7a21736c5ade60d7fe376b
フィルター候補
-60 < SPX_c_sma
-300 < SHC_c_sma
-100 < GC_c_sma < 100
-0.3 <= US10Y_c_sma
カウンティング
https://gyazo.com/82b099ebd659dee6f7c7bf0309d4957a
0以下は伸びないという傾向はあるけど、フィルターにするのは難しそう
一目均衡表の評価
https://gyazo.com/b3eed7cfdcddd92b72126024acd423e4
-2以下は伸びないという傾向はあるけど、同じくフィルターにはならないか
曜日
https://gyazo.com/58162a67a113f5fc5612fc68bee1b6f6
フィルター候補
week != Sat
時刻
https://gyazo.com/9d5ae8cd2fa073c089ea7d4a7290ac66
フィルター候補
hour != 18 and hour != 19
日付
https://gyazo.com/753411f2f1db0ea523784b5be948bdeb
https://gyazo.com/3730a4b419524102a5f326fe4552e265
判断をするには微妙。サンプルが少ない気がする。
Short
longと同じ説明変数で重回帰分析。
https://gyazo.com/0fdb407c379343801241e238e7f0009b
単回帰分析
主要変数
https://gyazo.com/b9eaa3d14194455320d8396e782df69e
フィルター候補
spread <= 0.2
-5 < diff_c <= 0.1 → diff_c <= 0.5
TR_stdev_index < 0.75
https://gyazo.com/31ed68777008a6f126ff9763f81d180d
フィルター候補
-0.0015 < diff_BB_upper_shift_index < 0.001
-0.0015 < diff_BB_lower_shift_index < 0.002
-200 < ADOSC_index → -250 < ADOSC_index
Vol_index < 150
-20000 < GBPJPY_dealer_spreads_diff < 20000
https://gyazo.com/88808ccbd88ea3a6115246012d82193c
使えそうなのはない
https://gyazo.com/8238bc3cc56c614a33b6e1a0377f7582
フィルター候補
-125 < SPX_c_sma < 75
-500 < SHC_c_sma < 400
-75 < GC_c_sma < 75
-0.3 < US10Y_c_sma
カウンティング
https://gyazo.com/924c22c6eed84ea54e210feabcb3b18d
因果がはっきりしないので不採用
一目均衡表の評価
https://gyazo.com/fddfbf591163a488a1991935ca15d99e
フィルター候補
ichi_value != 4 and ichi_value != 3
曜日
https://gyazo.com/512f1a6b98cb9753eaccc8fbe6e9a0fa
なし
時刻
https://gyazo.com/fb6738f336c62a14c7921a429c1f2ef2
因果がはっきりしない
日付
https://gyazo.com/f83f2729fafb2d47032021d1b0b8e18a
https://gyazo.com/9e30d526a7b35602be2432c71a4d820f
なし
LOADとTrail
ピラミッティングとトレイリングストップの確認
load6・8、トレイル有無
以下の表は単利のもの
table:load_trail_test
all 606.536
all__load6 564.788 all__load6__notrail 618.857
all__load8 216.817 all__load8__notrail 643.789
グラフ化すると、複利においては圧倒的に「load4・トレイルあり」が有利
https://gyazo.com/28bbbc965430fbb7883ca8e3d99e60ed
https://gyazo.com/3852b81312c76f09f23d9cb4a857606e
load2・3・5、トレイルなし
loadは3~5が良さそう
table:load_trail_test
パターン 累計損益/atr トレード数 勝率 RR
all 606.536 2243 25.59 2.99
all__load2 299.085 1576 15.99 4.85
all__load3 578.534 1314 22.68 4.50
all__load5 682.388 1977 23.37 3.48
all__load2__notrail 326.340 1621 22.95 4.60
all__load3__notrail 465.966 2386 27.20 2.81
all__load5__notrail 619.890 2030 22.46 4.80
https://gyazo.com/3d961adb4d0252a94a941715b81921d6
https://gyazo.com/c2eab95db97d4c9c5b71afcb358db3a4
トレイルするタイミング
トレーリングストップ:すべて増し玉のSOに切り上げ
SOの切り上げを足の確定時のみに行う(LOAD:4)
勝率:23.92%、RR:2.89
https://gyazo.com/8c45c994cdb7a8abc553c6a3412f39fc
足の途中でも行う
勝率:23.35%、RR:2.81
https://gyazo.com/19ef33bb65b9e52bee13e4f8ef18c27e
すでに稼働しているBOTにも適用する
https://gyazo.com/f308de21eda5a159d4d9090b24d2d0f8
https://gyazo.com/33d44c3b00224bee860e2b5ba2599f85
フィルターも健在
https://gyazo.com/33963c49509a6c830e9b24126686bf6e
https://gyazo.com/a8b619a097944d26abe4be8878301732