應用資料探勘技術於股票投資 -以全家為例
Applications of Data Mining Techniques for Stock Investment-A case study of Taiwan FamilyMart Co., Ltd.
摘要
本論文利用資料探勘技術於全家便利商店(股票代碼:5903.TW),以2008年到2019年(共12年)的資料進行股票投資策略研究,並將資料集切分為前9年訓練及驗證資料集,後3年為測試資料集。本論文認為(Hung et al. 2021)之研究架構非常具有前瞻性,但其中使用的五個超參數 (N,B,S,λ,D)及6年的單一訓練資料集(Dm)為人工給定。為了提升模型的穩健性,本論文提出了兩個嶄新的方法(TM1與TM2),讓電腦自動選擇超參數。TM1為使用全數搜尋法在驗證資料集中尋找表現最好的超參數組合;TM2為使用情境階段穩健搜尋法來尋找個股最具穩健性的超參數組合。使用TM1與TM2各自取得最佳超參數之後,本論文使用多重訓練資料集 (Dm,m=1,…,d) 來重新訓練分類器,此為前兩種方法所延伸而成的,命名為 (TMX1 與 TMX2)。在提出了前述的四種方法之後,將建立的模型利用測試資料集進行測試,所使用的衡量指標為投資報酬率(ROI),結果為TMX1(ROI=14.3%)優於其他三種方法和另外五種比較基準。然而,TMX1的投資報酬率稍微比買進持有方法(ROI=15.42%)來的低一些。此研究顯示TMX1方法用於全家便利商店投資是相對優質的投資方法。
This research applies data mining technology to study stock investment, using a listed stock (Famy Mart convenience store, 5903.TW) as the testing example. The adopted dataset ranges from 2008 to 2019 (12 years in total), in which the first 9 years are taken as a composition of training dataset and validation dataset, and the final 3 years are taken as test dataset. A recently published research framework (Hung et al. 2021) has shown a promising approach on stock investment; yet in which five hyper-parameters (N, B, S, λ, D) and a single training dataset (Dm) which covers 6 years are manually selected. To enhance robustness of performance, this research aims to automatically select hyper-parameters. This leads to the development of two novel trading methods (TM1 and TM2), where the hyper-parameters of TM1 are obtained by using an exhaustive search method, and that of TM2 is obtained by using a scenario-stage-robustness search method. Adopting the hyper-parameters of TM1 and TM2, we use multiple training datasets (Dm, m = 1,…, d) to retrain classifiers and propose two other trading methods (TMX1 and TMX2). Taking return of invement (ROI) in the 3-year testing period (2017-2019) as performance measure, TMX1 (ROI = 14.3%) outperforms the other three proposed trading methods and five other technical analysis methods. Yet, TMX1 is slightly less effective than the buy-and-hold method (ROI = 15.42%). The experiment outcomes indicate that TMX1 appears to be a promising method for trading the stock 5903.TW.