Skip to main navigation Skip to search Skip to main content

The Effect of Online Investor Sentiment on Stock Movements: An LSTM Approach

  • Han Wang
  • , Liang Xue
  • , Wencai Du
  • , Fengling Wang
  • , Pengsheng Li
  • , Lijin Chen
  • , Huawei Ma*
  • *Corresponding author for this work
  • City University of Macau
  • Chinese Academy of Sciences
  • Guangdong University of Education
  • Beijing Institute of Technology
  • Ltd.

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

Abstract

Analyzing stock trends based on the sentiment of social media provides a novel direction for investors to analyze the stock market. Behavioral financial theory and social psychology indicate that irrational behaviors related to financial decisions could result in stock fluctuations. Taking representative 20 stocks on Shanghai Stock Exchange as an example, user generated contents from January 31, 2017 to January 31, 2019 are obtained from Sina and Fortune.com. TF-IDF and TextRank algorithms are applied to extract keywords, based on which 2000-word-level financial sentiment lexicon is generated. In addition, the LSTM model is built and 23,152 comments were analyzed based on the lexicon. Eventually, relationships between sentiment scores and the trend of stock fluctuation are explored by applying the correlation coefficient parameter and Apriori algorithm. Results show that LSTM has a great advantage in sentiment analysis, which presents a higher accuracy (99.87%) than the sentiment lexicon-based method (94.57%). Taking the delay impact of stockholders’ sentiments on the stock trend into account, this research discusses the correlation between current investor sentiments and stock markets in the next few days. The paper finds that current emotional tendency has a deeper influence on the stock trend at the third day afterwards. Thus, this study extends financial sentiment lexicons, explores applications of LSTM machine learning in financial fields, and discusses the influence of investor sentiments on the stock market based on social media platforms. Processes of Web crawling, keyword extraction, sentiment analysis, correlation analysis and result visualization are coded in Python programming language, code packages are contributed through the Github website.

Original languageEnglish
Title of host publicationComputer and Information Science, 2021
EditorsRoger Lee
PublisherSpringer Science and Business Media Deutschland GmbH
Pages1-14
Number of pages14
ISBN (Print)9783030794736
DOIs
StatePublished - 2021
Externally publishedYes
Event20th IEEE/ACIS International Summer Semi-Virtual Conference on Computer and Information Science, ICIS 2021 - Shanghai, China
Duration: 23 Jun 202125 Jun 2021

Publication series

NameStudies in Computational Intelligence
Volume985
ISSN (Print)1860-949X
ISSN (Electronic)1860-9503

Conference

Conference20th IEEE/ACIS International Summer Semi-Virtual Conference on Computer and Information Science, ICIS 2021
Country/TerritoryChina
CityShanghai
Period23/06/2125/06/21

Fingerprint

Dive into the research topics of 'The Effect of Online Investor Sentiment on Stock Movements: An LSTM Approach'. Together they form a unique fingerprint.

Cite this