4段階BIST株定量取得戦略


作成日: 2023-12-19 15:21:22 最終変更日: 2023-12-19 15:21:22
コピー: 0 クリック数: 560
1
フォロー
1619
フォロワー

4段階BIST株定量取得戦略

概要

4段階BIST株の定量買い戦略は,4段階の買いによる波動追跡を利用し,市場が沈んだ地区で買い,市場が上昇した地域で売却する戦略である.この戦略は,大幅な波動のある株に適用され,分量買いによってより良いコストコントロールを実現する.

戦略原則

この戦略は,まず,抵抗線とサポート線を計算する. 抵抗線は,高い価格の振動平均線と閉店価格の交差点によって決定され,サポート線は,閉店価格と低い価格の振動平均線の交差点によって決定される.

価格がサポートラインを下回ったとき,価格がレジスタンスラインから距離が設定された買取区間の範囲内であれば,第一段階の25%のポジションの買取を行う.その後,第一段階の買取価格の近くで再び25%のポジションの買取を行う.このように4回サイクルし,最終的に100%のポジションを達成する.

株価が開設コストの2倍を超えると,全開場を行う.

戦略的優位性

  1. 購入コストを4回分けて購入
  2. 株の波動を追跡し,入場ポイントを良くする
  3. 利回りが良いのは 合理的な停止点から

リスクと解決策

  1. 株価が下がり続け,大損失を招く可能性が高い.

    • 合理的なストップラインを設定し,損失を効果的に制御する
  2. パラメータ設定不適切で,複数の購入ポイントがあまりにも近いため,コスト分散効果は実現できません.

    • 購入段階間の価格格差を合理的に設定する
  3. ストップ・ロスの設定が大きすぎて,損失を効果的にコントロールできない

    • リアルな取引環境と心理的耐久性に基づいて適切なストップ・ディスタンスを設定する

戦略最適化の方向性

  1. 異なる種類の株式に合わせてパラメータを調整し,購入区域をその株式の特性に合わせます.

  2. 波動率指数に追加し,波動が大きくなると購入します.

  3. ストップを追跡する代わりに,ストップを最適化して,より高い収益を上げること

  4. 価格が一定水準を下方突破したときに損失を止めるため,ストップラインの設定を追加します.

要約する

4段階のBIST株式の量化買収戦略は,全体的に熱い概念株に非常に適した戦略である。分期して倉庫を建設することで,株式の変動性を有効に活用し,価格が下がったときにより良いコストを得ることができる。同時に,合理的な止まりと損失の設定は,この戦略をリスク管理の面で優れたパフォーマンスを与える.この戦略は,実際の市場環境に応じてパラメータを継続的に調整して最適化すれば,安定したアルファを得ることができると信じられている。

ストラテジーソースコード
/*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"}]
*/

// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © Cantalk

//@version=5
strategy("BİST_100 HİSSELERİ 1_SAAT 4 KADEME ALIM",overlay = true, pyramiding=4, initial_capital=10000, process_orders_on_close=true, commission_type=strategy.commission.percent, commission_value=0.002)



LB2 = input(30, title="Alım_Üst_Çizgi")
LB = input(90, title="Alım_Alt_Çizgi")
Barcolor=input(true,title="Barcolor")
Bgcolor=input(true,title="Bgcolor")
//////////////////////////////////////////////////////////////////////

//////////////////////////////////////////////////////////////////////////////////////
RDirenc = ta.valuewhen(ta.cross(ta.hma(close, LB2), close), ta.highest(high, LB2), 1)
SDestek = ta.valuewhen(ta.cross(close, ta.hma(close, LB)), ta.lowest(low, LB), 1)



//plot(RDirenc,title="Resistance", color=#f7d707fc, linewidth =2)
//plot(SDestek,title="Support", color=#064df4, linewidth = 2)

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

LB22 = input(40, title="Satım_Üst_Çizgi")
LB1 = input(300, title="Satım_Alt_Çizgi")

Barcolor2=input(true,title="Barcolor2")
Bgcolor2=input(true,title="Bgcolor2")
//////////////////////////////////////////////////////////////////////

//////////////////////////////////////////////////////////////////////////////////////
RDirenc2 = ta.valuewhen(ta.cross(ta.hma(close, LB22), close), ta.highest(high, LB22), 1)
SDestek2 = ta.valuewhen(ta.cross(close, ta.hma(close, LB1)), ta.lowest(low, LB1), 1)



//plot(RDirenc2,title="Resistance2", color=#f40a0afc, linewidth =2)
//plot(SDestek2,title="Support2", color=#0eed0e, linewidth = 2)

//colors=if(close>RDirenc, color= #008000,if(SDestek<close,color=#FFFF00,color=#FF0000))

aralik_yuzde_alis = ((RDirenc-SDestek)/SDestek)*100
fark = input(25.0, title="Alış Aralığı %")



aralik_yuzde_satis = ((RDirenc2-SDestek2)/SDestek2)*100
fark2 = input(45.0, title="Satış aralığı %")




buyProcess = input(0.12, "ALIM YERİ %")
//buyProcess2 = input(0.10, "ALIM YERİ-2 %")
//buyProcess3 = input(0.10, "ALIM YERİ-3 %")



buy1 = strategy.position_avg_price - (strategy.position_avg_price * buyProcess)

buy2 = buy1 - (strategy.position_avg_price * buyProcess)

buy3 = buy2 - (strategy.position_avg_price * buyProcess)

buy4 = buy3 - (strategy.position_avg_price * buyProcess)



//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
isLong1 = if ta.crossover(close, SDestek) and aralik_yuzde_alis < fark 
    1
else
    0

    
isLong2 = if ta.crossover(close, SDestek) and (close <=  buy1)
    1
else
    0

isLong3 = if ta.crossover(close, SDestek) and (close <=  buy2) 
    1
else
    0

isLong4 = if ta.crossover(close, SDestek) and (close <= buy3) 
    1
else
    0



message_long_entry  = input("long entry message")
message_long_exit   = input("long exit message")


fullProfit = input(2.00, "PROFİT SATIŞ SEVİYESİ")
profit = strategy.position_avg_price * fullProfit
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

strategy.entry(id = "BUY-1", direction = strategy.long, qty = 25, when = (isLong1 and strategy.position_size == 0), alert_message = message_long_entry)
strategy.entry(id = "BUY-2", direction = strategy.long, qty = 25, when = (isLong2 and strategy.position_size == 25), alert_message = message_long_entry)
strategy.entry(id = "BUY-3", direction = strategy.long, qty = 25, when = (isLong3 and strategy.position_size == 50), alert_message = message_long_entry)
strategy.entry(id = "BUY-4", direction = strategy.long, qty = 25, when = (isLong4 and strategy.position_size == 75), alert_message = message_long_entry)



buyclose1 = if  (close >= (strategy.position_avg_price + profit)) and aralik_yuzde_satis > fark2
    close
    

strategy.exit("EXİT",qty_percent = 100, stop = buyclose1)


aritmeticClose =  strategy.position_avg_price + profit
plot(aritmeticClose, color = color.rgb(248, 5, 240), linewidth = 1, style = plot.style_linebr)