Abstract & Overview
In this paper, the support vector machine (SVM) and K-nearest neighbor (KNN) algorithm were used to study the stock price forecasting problem, select the transaction data reflecting the stock changes and its technical indicators, including volume, closing price, highest price, moving average (MA), etc., forecasting the ups and downs and the closing price of the Shanghai Composite Index. Firstly, the SVM was used to predict the training set’s ups and downs. Then the training set used KNN to predict the short-term (1 day), medium-term (7 days) and long-term (30 days) prices of the stock, thus forming a forecast model based on transaction data and technical indicators. Finally, the MAPE and RMSE of this model were obtained. In order to verify the validity of the model, a new investment strategy was constructed based on the model prediction results, and the real data was used for investment, and the large-cap stock index was subjected to a one-month simulation investment.