The stock market reflects the country's economic conditions, and it is of great significance to have a good prediction effect on the stock market. But with the rapid rise of the Internet, big data, and machine learning, the prediction of the stock market trend is not limited to the traditional methods and data sets. The trend of the stock market is not only dependent on itself but also affected by some other factors. Therefore, based on the machine learning model, this paper studies the prediction of investors' attention to the Shanghai Composite Index trend. This paper crawled the relevant index data from the website of Baidu Index based on the selected keywords. The correlation coefficient is used to select the keyword data with the best lag order and data type and as the model's input data. Through the establishment of LSTM, LASSO, RF, and GBDT models, the rise and fall of the Shanghai Composite Index are predicted. That is to say. The paper takes the accuracy of the rise and fall prediction as the judgment standard. GBDT model has the best prediction effect on the Shanghai Stock Exchange Index and can best explain the rise and fall of the Shanghai Stock Exchange Index. So, people can use this research to buy stocks before they rise and sell them before they fall.
Read full abstract