金融市場的動態預測一直是許多投資者以及研究者試圖解決的問題,本研究希望能透過機器學習建置一個能夠穩定判斷市場趨勢的模型,並利用該模型設計一套可以在台灣股票指數期貨中穩定獲利的策略。首先我們選用三種不同的機器學習模型:Logistic Regression、Random Forest、LSTM,將趨勢分成三種類別:上升趨勢、下跌趨勢、盤整趨勢,並從中選出最適合的模型。接著我們希望在趨勢中找出合適的進場時機點,因此我們先使用Dynamic Programming演算法標記歷史資料中所有的最佳進場時機點,同樣用上述三種機器學習模型學習如何判斷進場時機點並從中選出表現最佳者。最後將兩個模型合併建置出一套能夠在市場中獲利的策略,並用一般投資者常用的技術指標策略來與本研究設計的模型比較績效。
Forecasting the dynamics of financial market has always been a problem that many investors and researchers try to solve. In this research, we tried to build a stable model to predict market trends through machine learning, and used this model to design a strategy that can make profits in Taiwan stock index futures. First, we selected three different machine learning models: logistic regression, random forest and LSTM, and divided the trend into three categories: upward trend, downward trend and consolidation trend. Next, we selected the most suitable model from them. Afterwards, we tried to find the timings of buying in these trends. Therefore, we used dynamic programming to label all of the best timings of buying from historical data. Then, we used the aforementioned three models for training to predict the timings of buying and chose the model with the best performance. Finally, we combined the two models together to build a profitable strategy, and used several technical indicator strategies to compare the model designed in this study.