每個月初,在營收公佈前後,如果今年累計的營收成長率夠高,且法人或主力買超,均線帶大量黃金交叉,代表這家公司的月營收依然是一個可以帶動買氣的因子,是短多值得觀察的標的
以下是根據上述精神寫的腳本
Input:SPeriod(3); Input:SMALen(5),LMALen(13); //每月初一到15之間 Condition1=dayofmonth(Date)>1 and dayofmonth(Date)<15; // 營收連續成長 Condition2=GetField("累計營收年增率","M")>20 and GetField("累計營收年增率","M")[1]>20; // 相對大量 Condition3=V>=Highest(V[1],SPeriod)*1.2; // 籌碼四選二(外資/投信/主力/控盤) Condition4=CCT_Chip(1)>=2; // 股本<100億 Condition5=GetField("股本(億)","D")<100; // 均線黃金交叉 Condition6=average(L,SMALen) Cross Over average(H,LMALen) ; // 個股條件 Condition100=Condition1 and Condition2 and Condition3 and Condition4 and Condition5 and Condition6; If Condition100 Then Ret=1;
其中有一個函數的腳本如下
Input:Days(numericsimple); Var:ChipCount(0); ChipCount=0; CCT_Chip=0; If summation(GetField("投信買賣超"),Days)>0 Then ChipCount=ChipCount+1; //Else //ChipCount=ChipCount; If summation(GetField("外資買賣超"),Days)>0 Then ChipCount=ChipCount+1; If summation(GetField("主力買賣超張數"),Days)>0 Then ChipCount=ChipCount+1; If summation(GetField("控盤者買賣超張數"),Days)>0 Then ChipCount=ChipCount+1; CCT_Chip=ChipCount;
用這個腳本去回測所有普通股,停損停利都設7%,過去七年的回測報告如下圖
勝率雖然不高,但長期可以貢獻穩定的報酬率