用指標股月營收製定的大盤長線多空指標

By | 2022-04-20

我觀察到,市場整體的月營收,其長期波動方向,有蠻明顯的循環趨勢,不會這個月大家的營收年增率都大漲,但下個月馬上集體大跌,我試著找出各行各業中的代表性公司,把它們的月營收年增率加起來作為一個指標,在研判大盤多空趨勢與轉折上,的確有其效果,今天來跟大家分享這樣的觀察心得

 

首先,我先寫了一個腳本,來計算出我挑出來的,各行各業龍頭,其月營收年增率的總和及移動平均

array:lead[100](0);
array:pcg[100](0);

lead[1]=GetSymbolField("1102.tw","月營收","M");//台泥
lead[2]=GetSymbolField("2317.tw","月營收","M");//鴻海
lead[3]=GetSymbolField("1216.tw","月營收","M");//統一
lead[4]=GetSymbolField("1301.tw","月營收","M");//台塑
lead[5]=GetSymbolField("1304.tw","月營收","M");//台聚
lead[6]=GetSymbolField("1312.tw","月營收","M");//國喬
lead[7]=GetSymbolField("1326.tw","月營收","M");//台化
lead[8]=GetSymbolField("1455.tw","月營收","M");//集盛
lead[9]=GetSymbolField("1476.tw","月營收","M");//儒鴻
lead[10]=GetSymbolField("1477.tw","月營收","M");//聚陽
lead[11]=GetSymbolField("1513.tw","月營收","M");//中興電
lead[12]=GetSymbolField("1515.tw","月營收","M");//力山
lead[13]=GetSymbolField("1521.tw","月營收","M");//大億
lead[14]=GetSymbolField("1527.tw","月營收","M");//鑽全
lead[15]=GetSymbolField("1560.tw","月營收","M");//中砂
lead[16]=GetSymbolField("1565.tw","月營收","M");//精華
lead[17]=GetSymbolField("1582.tw","月營收","M");//信錦
lead[18]=GetSymbolField("1605.tw","月營收","M");//華新
lead[19]=GetSymbolField("1717.tw","月營收","M");//長興
lead[20]=GetSymbolField("1723.tw","月營收","M");//中碳
//lead[21]=GetSymbolField("1726.tw","月營收","M");//永記
lead[22]=GetSymbolField("1736.tw","月營收","M");//喬山
lead[23]=GetSymbolField("1773.tw","月營收","M");//勝一
lead[24]=GetSymbolField("1795.tw","月營收","M");//美時
lead[25]=GetSymbolField("1907.tw","月營收","M");//永豊餘
lead[26]=GetSymbolField("2002.tw","月營收","M");//中鋼
lead[27]=GetSymbolField("2006.tw","月營收","M");//東鋼
lead[28]=GetSymbolField("2015.tw","月營收","M");//豊興
lead[29]=GetSymbolField("2029.tw","月營收","M");//盛餘
lead[30]=GetSymbolField("2027.tw","月營收","M");//大成鋼
lead[31]=GetSymbolField("2031.tw","月營收","M");//新光鋼
lead[32]=GetSymbolField("2049.tw","月營收","M");//上銀
lead[33]=GetSymbolField("2059.tw","月營收","M");//川湖
lead[34]=GetSymbolField("2103.tw","月營收","M");//台橡
lead[35]=GetSymbolField("2105.tw","月營收","M");//正新
lead[36]=GetSymbolField("2204.tw","月營收","M");//中華車
lead[37]=GetSymbolField("2207.tw","月營收","M");//和泰車
lead[38]=GetSymbolField("2231.tw","月營收","M");//為升
lead[39]=GetSymbolField("2233.tw","月營收","M");//宇隆
lead[40]=GetSymbolField("2301.tw","月營收","M");//光寶
lead[41]=GetSymbolField("2303.tw","月營收","M");//聯電
lead[42]=GetSymbolField("2308.tw","月營收","M");//台達電
lead[43]=GetSymbolField("2313.tw","月營收","M");//華通
lead[44]=GetSymbolField("2324.tw","月營收","M");//仁寶
lead[45]=GetSymbolField("2327.tw","月營收","M");//國巨
lead[46]=GetSymbolField("2330.tw","月營收","M");//台積電
lead[47]=GetSymbolField("2337.tw","月營收","M");//旺宏
lead[48]=GetSymbolField("2344.tw","月營收","M");//華邦電
lead[49]=GetSymbolField("2345.tw","月營收","M");//智邦
lead[50]=GetSymbolField("2347.tw","月營收","M");//聯強
lead[51]=GetSymbolField("2352.tw","月營收","M");//佳世達
lead[52]=GetSymbolField("2353.tw","月營收","M");//宏碁
lead[53]=GetSymbolField("2354.tw","月營收","M");//鴻準
lead[54]=GetSymbolField("2357.tw","月營收","M");//華碩
lead[55]=GetSymbolField("2368.tw","月營收","M");//金像電
lead[56]=GetSymbolField("2376.tw","月營收","M");//技嘉
lead[57]=GetSymbolField("2377.tw","月營收","M");//微星
lead[58]=GetSymbolField("2379.tw","月營收","M");//瑞昱
lead[59]=GetSymbolField("2382.tw","月營收","M");//廣達
lead[60]=GetSymbolField("2383.tw","月營收","M");//台光電
lead[61]=GetSymbolField("2385.tw","月營收","M");//群光
lead[62]=GetSymbolField("2393.tw","月營收","M");//億光
lead[63]=GetSymbolField("2395.tw","月營收","M");//研華
lead[64]=GetSymbolField("2408.tw","月營收","M");//南亞科
lead[65]=GetSymbolField("2409.tw","月營收","M");//友達
lead[66]=GetSymbolField("2439.tw","月營收","M");//美律
lead[67]=GetSymbolField("2449.tw","月營收","M");//京元電
lead[68]=GetSymbolField("2454.tw","月營收","M");//聯發科
lead[69]=GetSymbolField("2603.tw","月營收","M");//長榮
lead[70]=GetSymbolField("2606.tw","月營收","M");//裕民
lead[71]=GetSymbolField("2610.tw","月營收","M");//華航
lead[72]=GetSymbolField("2615.tw","月營收","M");//萬海
lead[73]=GetSymbolField("2707.tw","月營收","M");//晶華
lead[74]=GetSymbolField("2729.tw","月營收","M");//瓦城
lead[75]=GetSymbolField("2731.tw","月營收","M");//雄獅
lead[76]=GetSymbolField("2912.tw","月營收","M");//統一超
lead[77]=GetSymbolField("3008.tw","月營收","M");//大立光
lead[78]=GetSymbolField("3034.tw","月營收","M");//聯詠
lead[79]=GetSymbolField("3037.tw","月營收","M");//欣興
lead[80]=GetSymbolField("3042.tw","月營收","M");//晶技
lead[81]=GetSymbolField("3130.tw","月營收","M");//104
lead[82]=GetSymbolField("3231.tw","月營收","M");//緯創
lead[83]=GetSymbolField("3406.tw","月營收","M");//玉晶光
lead[84]=GetSymbolField("3481.tw","月營收","M");//群創
lead[85]=GetSymbolField("3576.tw","月營收","M");//聯合再生
lead[86]=GetSymbolField("3665.tw","月營收","M");//貿聯
lead[87]=GetSymbolField("3702.tw","月營收","M");//大聯大
lead[88]=GetSymbolField("3707.tw","月營收","M");//漢磊
//lead[89]=GetSymbolField("3708.tw","月營收","M");//上緯
//lead[90]=GetSymbolField("3711.tw","月營收","M");//日月光
//lead[91]=GetSymbolField("3714.tw","月營收","M");//富采
lead[92]=GetSymbolField("4438.tw","月營收","M");//廣越
lead[93]=GetSymbolField("5434.tw","月營收","M");//崇越
lead[94]=GetSymbolField("6269.tw","月營收","M");//台郡
lead[95]=GetSymbolField("6285.tw","月營收","M");//啟碁
lead[96]=GetSymbolField("6505.tw","月營收","M");//台塑化
lead[97]=GetSymbolField("9910.tw","月營收","M");//豊泰
lead[98]=GetSymbolField("9921.tw","月營收","M");//巨大
lead[99]=GetSymbolField("8299.tw","月營收","M");//群聯
lead[100]=GetSymbolField("8086.tw","月營收","M");//宏捷科
variable:i(0);
for i=1 to 100 begin
if lead[i][12]<>0
then 
pcg[i]=(lead[i]-lead[i][12])/lead[i][12]; 
end;
value1=array_sum(pcg,1,100);
value2=average(value1,4);
plot1(value1);
plot2(value2);

然後我把這兩個指標跟加權指數作對照

從上面這張圖來看,的確有很明顯亦步亦趨的循環現象

有興趣的朋友可以依此作為例子,重新調整您認為的產業龍頭,畫出您專屬的大盤多空長線領先指標

不過記得你用的龍頭公司上市期間要夠長

我上面的腳本用了一些剛上市不久的公司,這樣系統因為缺資料就只畫出有資料的部份,指標長度變短,就看不出其循環性了