EasyTrader ArtNo 148
我們常在文獻/期刊/網路上看到很多國外不錯的策略 ,在轉化吸收的過程會碰到以下問題 - 若沒有詳細說明邏輯,不清楚要如何去測試
- 參數好幾個不知該如何套入台指期或是其他商品測試
- 花了好長時間,找不到合適參數區間
在加入結算日後 ,我先將其中數字部份全部轉換為參數,多空各五個參數 ,然後利用隨機參數的方式同時對10個參數作測試,在很短的時間內作出以下的結果
台股 VIX資料為2007開始 ,以下測試為台指期 日K 留倉 , 2007~ 2014/4/30 交易成本 1200input:AvgBarL(47),LookBackL1(15),BollLengthL(10),StdDev_L(0.65),NBarL(16),
AvgBarS(27),LookBackS1(16),BollLengthS(23),StdDev_S(1.1),NBarS(8) ;
Vars: LastTradeDay(false) ;
if DAYofMonth(Date) > 14 and DAYofMonth(Date) < 22 and DAYofWeek(Date)= 3 then LastTradeDay = True else LastTradeDay =False ;
If Close of Data1 > Average(Close of Data1, AvgBarL) and (Close[LookBackL1] of Data2) <
BollingerBand(Close of Data2, BollLengthL, StdDev_L)[LookBackL1]
and Close[LookBackL1+1] of Data2 > BollingerBand(Close of Data2, BollLengthL, StdDev_L)[LookBackL1+1]
Then Buy on Close of Data1 Stop;
If BarsSinceEntry = NBarL and Close of Data1 < Close[NBarL] of Data1 Then
ExitLong on Close of Data1 stop;
If Close of Data1 < Average(Close of Data1, AvgBarS) and (Close[LookBackS1] of Data2) >
BollingerBand(Close of Data2, BollLengthS, -StdDev_S)[LookBackS1]
and Close[LookBackS1+1] of Data2 < BollingerBand(Close of Data2, BollLengthS, -StdDev_S)[LookBackS1+1] Then
Sell on Close of Data1 stop;
If BarsSinceEntry = NBarS and Close of Data1 > Close[NBarS] of Data1 Then
ExitShort on Close of Data1 stop;
if LastTradeDay then SetExitOnClose ;
有興趣學習此方法的讀者趕快報名喔 !
沒有留言:
張貼留言