應用資料探勘技術於股票投資─以聯發科為例
Applications of Data Mining Techniques for Stock Investment-A Case Study of MediaTek Corp.
摘要
本研究是利用資料探勘(Data Mining, DM)技術建立一個有效的股票投資方法。案例公司是台灣最大的積體電路設計公司──聯發科技股份有限公司。股票交易決策模型是一個二分類問題,我們購買股票的交易日定義為買點信號:在未來n天(n為60天)中股價上漲超過10%,因此利用先前的股票交易資料,可將每個交易日定義為買點信號或非買點信號。股票投資方法可以分成三階段,運用將近9.5年的資料(2007/10-2017/4)進行實驗。第一階段根據前67%的資料(訓練資料集),對多種DM演算法進行買點信號模型的預測;第二階段利用接續11%的資料(驗證資料集)選擇最佳的買點信號模型和最佳的交易決策,在此,考慮了四種交易策略,即當買點信號連續出現m次(m為1, 2, 3,或4)才進行購買;第三階段利用最後的22%資料(測試數據集),將所選出來最佳的買點信號模型與交易策略進行測試。數值實驗表明,所提出的交易方法優於基準交易方法。
This research is a case study of using data mining (DM) techniques to develop an effective stock investment method. The case company is MediaTek Corp., the largest IC design house in Taiwan. The stock trading decision is modeled as a binary classification problem. We define a trading day as a “B-signal” day if the stock price shall rise over 10% in the coming n days (say 60 days). Then, using prior stock price data, each trading day can be identified as either a B-signal day or not. The development of the stock investment method involves three phases, assuming that 9.5 years of data (2007/10-2017/4) have been given. In phase 1, we train many B-signal predictors by various DM algorithms based on the first 67% data (training dataset). In phase 2, we select the best B-signal predictor and the best trading policy based on the consecutive 11% data (validation dataset). Herein, three trading policies are considered; namely, one takes buy-action when m (1, 2, 3, or 4) consecutive B-signal days appear. In phase 3, the best B-predictor and trading policy is tested by the last 22% data (test dataset). Numerical experiments reveal that the proposed stock trading method outperforms a benchmark trading method.