![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
This report describes our attempt to apply ANFIS (Adaptive Neuro-Fuzzy Inference Systems) for the prediction of stock market.本 Fuzzy Model 的重點放在預測各股票上市公司其股票長期投資的發展能力。由於不鼓 勵股市的短線炒作,以及影響短線因素的過度複雜,在預測上有其困難處。 因此,本 Fuzzy Model 不做股市的短期預測。
假設在某股票市場的環境下,共有20家股票上市公司。在長期投資的前提下,藉由各股票 上市公司所公開的營運狀況資料,可推算出 C, A, N, S, L, I 等六個指標參數。 本 Fuzzy Model 將根據各股票上市公司的 C, A, N, S, L, I 等六個指標參數,為各公 司股票未來的發展潛能評分並排序,輸出建議購買股票的優先順序,做為投資者的購股 參考。
Input 1: C-當季每股盈餘(Current Quarterly Earnings Per Share) Input 2: A-年度每股盈餘成長率(Annual Earnings Increases) Input 3: N-新創意或新領導階(New High) Input 4: S-供給與需求(Supply and Demand) Input 5: L-領導股(Leader or Laggard) Input 6: I -專業投資機構的認同(Institutional Sponsorship) Output:
Our approach to this problem can be explained in three aspects:
2-input 2-rules ANFIS as an Example:6-input 64-rule ANFIS : In factor, this structure can be extended to n-input 2^n-rule ANFIS, such as 5-intput 32-rule ANFIS or 7-input 128-rule ANFIS. Membership function : Because the linguistic set {CH,AH,NH,SH,LH,IH,CL,AL,NL,SL,LL,IL} is chosen, we must have 12 membership function. We deside to use sig_function as our membership function. For example, the membership functions for CH and CL are: membership function for CH: membership function for CL:
經由 Model 的計算,預測的結果表示在輸出矩陣中,各股輸出分數的長條圖:![]()
從這次final project中,我們學習到了以ANFIS的架構來分析並預測個股未來的 發展潛力。本project主要特色在於經過大量的資料庫運算後,能提供相當有效的 參考指標,以篩選出可供投資的參考個股;在經過程式的判斷,使投資人更容易 縮小可供投資的參考個股範圍,進一步確認良好的投資目標。
http://www.oz.nthu.edu.tw/~g853905/fuzzy/final.m http://www.oz.nthu.edu.tw/~g853905/fuzzy/main.m http://www.oz.nthu.edu.tw/~g853905/fuzzy/sig.m
1. Edit input matrix(input_mat), for example:
input_mat=[ 1 1.8 17 35.2 27 41 68.1 2 82.1 40.5 81 19.8 84.6 37 3 44 93.5 12 1.5 52.5 83 4 61.5 91.6 13.8 74 20 50 5 79 41 20 44.5 67 70.9 6 92 89.3 19 93 83 42 7 73 5 60.3 46.5 1.9 30.4 8 94 80 60 50 50 65 9 95.3 96 90.2 88 80 30 10 91 96 76 88 84.4 96.5 11 95 94.5 90 10 80 30 12 88 91.5 20 56 76 49 13 26 62 29 63 26.5 51 14 10 76 99 43.2 88 20 15 60 33 65 74 59 53.4 16 62 97 84.3 62 9 29 17 46 89 74 83.7 64 89.5 18 71 6 7 34 78 56.5 19 55 26 27 64 38 57 20 87 78 68.5 90 76 83 ];
2. Call the main_function, for example:
output_mat=main(input_mat, rule_mat);
PS: rule_mat has been desided:
3. Get the output matrix(output_mat), and choose your favorite stock.