Abstract:In order to explore the impact of investor sentiment on the stock trend, the crawler technology of R software was used to capture people's views on the stock market, and the implied emotions in the text were divided into three categories, namely positive, negative and neutral, based on which the sentiment score was constructed as the quantitative result of market sentiment. Then, the unit root test and other methods were used to explore the causal relationship between The Shanghai Composite Index and investor sentiment and establish the VAR model. In order to better judge the degree of influence of market sentiment on stock trend, BP neural network models were built respectively before and after the addition of sentiment score to predict the return rate of Shanghai Stock Index. The advantages and disadvantages of the two models were compared, and it was found that the error of stock prediction model after the addition of market sentiment index become smaller and more accurate.