Text Based Stock Price Prediction in Python

Text Based Stock Price Prediction in Python

Abstract:

Microblog can obtain investors' views of stock market accurately and timely, and grasping the fluctuation of investor sentiment is beneficial to predict the future trend of stock market. Based on behavioral finance theory, this paper uses text mining and natural language processing technology to obtain investor sentiment, and then combines price earnings ratio and turnover rate to build a stock market prediction model. The results show that the investor sentiment based on Weibo text has a certain predictive ability to the Shanghai stock index. The model has the best performance in the ascending period, and the effect of the shock period is the worst.