Strategi Pelacakan Pembalikan Kuantitatif dua faktor

Penulis:ChaoZhang, Tanggal: 2023-12-20
Tag:

img

Gambaran umum

Strategi ini menggabungkan pola pembalikan 123 dan indikator Awesome Oscillator untuk menerapkan perdagangan pelacakan pembalikan kuantitatif dua faktor.

Strategi ini terutama cocok untuk perdagangan pembalikan jangka menengah-pendek. Dengan konfirmasi multi-faktor, dapat secara efektif menyaring pembalikan palsu dan meningkatkan kualitas sinyal.

Prinsip Strategi

  1. 123 Pola Pembalikan

    Menghakimi hubungan antara harga penutupan dua hari sebelumnya dan harga penutupan saat ini untuk membentuk pola tinggi-tinggi-rendah atau rendah-rendah-tinggi, menunjukkan sinyal pembalikan yang mungkin.

    Pada saat yang sama, mengharuskan indikator Stochastic berada di area overbought atau oversold untuk lebih mengkonfirmasi sinyal pembalikan dan menyaring pembalikan palsu.

  2. Osilator Luar Biasa

    Awesome Oscillator adalah indikator momentum yang dibangun berdasarkan perbedaan antara rata-rata bergerak jangka menengah dan rata-rata bergerak jangka pendek.

    Strategi ini mengadopsi penilaian indikator tentang keadaan bullish atau bearish untuk menentukan titik beli dan jual.

  3. Konfirmasi dua faktor

    Melalui konfirmasi ganda dari pola pembalikan 123 dan Awesome Oscillator, pembalikan palsu dapat secara efektif disaring dan akurasi waktu masuk dapat ditingkatkan.

Keuntungan dari Strategi

  1. Menggunakan faktor ganda untuk menentukan titik pembalikan dapat secara efektif menyaring sinyal pembalikan palsu.

  2. Sebagai indikator momentum, Awesome Oscillator dapat meningkatkan akurasi waktu masuk.

  3. Penambahan indikator Stochastic dapat menghindari risiko membeli di puncak dan menjual di bagian bawah.

  4. Strategi pembalikan sendiri memiliki keuntungan dalam tingkat kemenangan yang lebih tinggi dan rasio risiko-manfaat.

Risiko dari Strategi

  1. Risiko kegagalan pembalikan masih ada. Menggunakan faktor ganda dapat mengurangi probabilitas, tetapi tidak dapat sepenuhnya menghindari risiko ini.

  2. Risiko over-optimization: Parameter indikator perlu diuji dan dioptimalkan untuk pasar yang berbeda untuk mencegah over-optimization.

  3. Risiko perdagangan melawan tren pasar. Dalam pasar dengan tren yang kuat, strategi pembalikan rentan terhadap kerugian yang berlawanan. Stop loss dapat diatur untuk mengendalikan risiko.

Arahan Optimasi

  1. Uji dan optimalkan kombinasi parameter indikator untuk meningkatkan ketahanan.

  2. Tambahkan strategi stop loss untuk mengendalikan kerugian tunggal.

  3. Gabungkan pemilihan industri dan sektor untuk menghindari pemilihan stok yang tidak tepat.

  4. Mengoptimalkan jangka waktu menahan untuk mencegah tren buta mengikuti.

  5. Uji sistem rata-rata bergerak yang berbeda sebagai kondisi tambahan.

Kesimpulan

Singkatnya, sementara memastikan probabilitas keuntungan tertentu dan rasio risiko-balasan, strategi pelacakan pembalikan kuantitatif dua faktor ini menggunakan Awesome Oscillator sebagai alat waktu masuk, dan menghindari membeli di puncak melalui indikator Stochastic, yang dapat secara efektif mengendalikan risiko perdagangan pembalikan dan memiliki kepraktisan yang kuat.

Namun, risiko yang melekat pada strategi pembalikan tidak dapat diabaikan. Masih perlu untuk mengoptimalkan parameter indikator, mengatur kondisi stop loss, dll untuk mengendalikan risiko. Jika digunakan dengan benar, strategi ini dapat membawa investor stabil kelebihan pengembalian.


/*backtest
start: 2023-12-12 00:00:00
end: 2023-12-14 05:00:00
period: 20m
basePeriod: 1m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=4
////////////////////////////////////////////////////////////
//  Copyright by HPotter v1.0 12/08/2021
// This is combo strategies for get a cumulative signal. 
//
// First strategy
// This System was created from the Book "How I Tripled My Money In The 
// Futures Market" by Ulf Jensen, Page 183. This is reverse type of strategies.
// The strategy buys at market, if close price is higher than the previous close 
// during 2 days and the meaning of 9-days Stochastic Slow Oscillator is lower than 50. 
// The strategy sells at market, if close price is lower than the previous close price 
// during 2 days and the meaning of 9-days Stochastic Fast Oscillator is higher than 50.
//
// Second strategy
//    This indicator is based on Bill Williams` recommendations from his book 
//    "New Trading Dimensions". We recommend this book to you as most useful reading.
//    The wisdom, technical expertise, and skillful teaching style of Williams make 
//    it a truly revolutionary-level source. A must-have new book for stock and 
//    commodity traders.
//    The 1st 2 chapters are somewhat of ramble where the author describes the 
//    "metaphysics" of trading. Still some good ideas are offered. The book references 
//    chaos theory, and leaves it up to the reader to believe whether "supercomputers" 
//    were used in formulating the various trading methods (the author wants to come across 
//    as an applied mathemetician, but he sure looks like a stock trader). There isn't any 
//    obvious connection with Chaos Theory - despite of the weak link between the title and 
//    content, the trading methodologies do work. Most readers think the author's systems to 
//    be a perfect filter and trigger for a short term trading system. He states a goal of 
//    10%/month, but when these filters & axioms are correctly combined with a good momentum 
//    system, much more is a probable result.
//    There's better written & more informative books out there for less money, but this author 
//    does have the "Holy Grail" of stock trading. A set of filters, axioms, and methods which are 
//    the "missing link" for any trading system which is based upon conventional indicators.
//    This indicator plots the oscillator as a histogram where periods fit for buying are marked 
//    as blue, and periods fit for selling as red. If the current value of AC (Awesome Oscillator) 
//    is over the previous, the period is deemed fit for buying and the indicator is marked blue. 
//    If the AC values is not over the previous, the period is deemed fir for selling and the indicator 
//    is marked red.
//
// WARNING:
// - For purpose educate only
// - This script to change bars colors.
////////////////////////////////////////////////////////////
Reversal123(Length, KSmoothing, DLength, Level) =>
    vFast = sma(stoch(close, high, low, Length), KSmoothing) 
    vSlow = sma(vFast, DLength)
    pos = 0.0
    pos := iff(close[2] < close[1] and close > close[1] and vFast < vSlow and vFast > Level, 1,
	         iff(close[2] > close[1] and close < close[1] and vFast > vSlow and vFast < Level, -1, nz(pos[1], 0))) 
	pos


BWAO(nLengthSlow,nLengthFast) =>
    pos = 0.0
    xSMA1_hl2 = sma(hl2, nLengthFast)
    xSMA2_hl2 = sma(hl2, nLengthSlow)
    xSMA1_SMA2 = xSMA1_hl2 - xSMA2_hl2
    pos := iff(xSMA1_SMA2 > xSMA1_SMA2[1], 1,
    	      iff(xSMA1_SMA2 < xSMA1_SMA2[1], -1, nz(pos[1], 0)))   
    pos

strategy(title="Combo Backtest 123 Reversal & Awesome Oscillator (AO)", shorttitle="Combo", overlay = true)
line1 = input(true, "---- 123 Reversal ----")
Length = input(14, minval=1)
KSmoothing = input(1, minval=1)
DLength = input(3, minval=1)
Level = input(50, minval=1)
//-------------------------
line2 = input(true, "---- Awesome Oscillator (AO) ----")
nLengthSlow = input(34, minval=1, title="Length Slow")
nLengthFast = input(5, minval=1, title="Length Fast")
reverse = input(false, title="Trade reverse")
posReversal123 = Reversal123(Length, KSmoothing, DLength, Level)
posBWAO = BWAO(nLengthSlow,nLengthFast)
pos = iff(posReversal123 == 1 and posBWAO == 1 , 1,
	   iff(posReversal123 == -1 and posBWAO == -1, -1, 0)) 
possig = iff(reverse and pos == 1, -1,
          iff(reverse and pos == -1 , 1, pos))	   
if (possig == 1 ) 
    strategy.entry("Long", strategy.long)
if (possig == -1 )
    strategy.entry("Short", strategy.short)	 
if (possig == 0) 
    strategy.close_all()
barcolor(possig == -1 ? #b50404: possig == 1 ? #079605 : #0536b3 )

Lebih banyak