Market trends in shares can often be linked to company performance or the performance of the economy. However, this was not always the case in January 2021. GameStop, a video games retail company that had been struggling for many years, began having a very unusual surge in share prices. In the span from early January to its peak in the month, share prices increased by over 1700%. This increase did not occur due to a new product or unexpected profit, but instead due to thousands of regular retail investors on Reddit (r/WallStreetBets) encouraging each other to invest in the stock. As more people began investing, demand for the stock increased quickly. The news started to take notice, and many professional investors were confused to see a market being influenced by a group of users on Reddit. This simple example demonstrates that stock prices can be greatly affected by sentiments of investors, and by social media commentary.
Within computer science, data science and finance, there is a huge amount of opinion on companies given in forms of social media (Reddit, Twitter, etc). With this huge amount of data, can we process it within computers to discover trends that may indicate future price
movements? In order to do this, NLP can be applied. Within NLP, we are not simply counting the number of mentions of the company, but are attempting to understand what meaning is behind each comment. This is very complex as social media comments can often contain slang, abbreviations, emojis, typos, humour and sarcasm. It can be difficult to determine the intention behind a comment. A comment might look positive in isolation, but when combined with other comments in context may be making fun of the company. Due to this complexity, natural language understanding remains a difficult problem in AI.
Natural Language Processing is a sub-field of computer science, allowing computers to understand written text. Large amounts of text from social media posts are analysed to produce an indication of the general sentiment towards a company. This is given as a numerical value called a ‘sentiment score’. Researchers can then compare this data against
historical share price data to observe if there is correlation between changes in sentiment and price. Although sentiment data cannot predict all changes in the market, it indicates some interesting trends in investor behaviour which would be extremely difficult to analyse manually.
Before this analysis can take place, preprocessing of data is required. This step is often underestimated. Social media contains millions of posts daily, many of which may be unhelpful. Duplicates in content, spam, advertisements, bots, random hyperlinks, and slang that is difficult to interpret outside of context will be present. Using this data without preprocessing may lead to misleading results. Duplicate posts are removed. Suspicious accounts are found and content is filtered to remove unhelpful information. Finally, consistent formatting is applied to allow the computer to process the data. This is not an exciting process, but is extremely important. If inaccurate data is used to train an AI model, the accuracy of the model will be compromised.
One common approach to sentiment analysis is the bag of words method. Important words from the text are counted. If key positive words are found in the text (buy, growth, profit, strong), then a positive sentiment will be assumed. If key negative words are found (loss, decline, sell, risk) then a negative sentiment will be assumed. Word order is not considered, meaning this method is quick and simple. However, context can be hard to determine. For example, “this stock is fire” generally implies excitement from investors. However, “this company is on fire” indicates that the company is in severe trouble. Although the same key word is present in both sentences, the meaning is very different. As word count alone is being analysed, this model would not be able to differentiate.
More modern methods solve many of these issues. Transformer models such as BERT (Bidirectional Encoder Representations from Transformers) are able to understand context in sentences more effectively than older models. Therefore, slang and changing meanings of words can be understood much more easily. However, sarcasm and irony still pose difficulties. Additionally, due to rapidly changing wording on the internet, no model can be completely up to date for long periods of time.
Due to the many factors affecting share prices (profit, interest rates, policy, world events and investor psychology), sentiment data cannot fully predict market trends. People often behave irrationally, and psychological factors such as fear, greed and FOMO (fear of missing out) can cause many investors to “herd”. GameStop is a great example of this. Although sentiment data can be very helpful in analysis, most research agrees that it should be used to complement traditional methods, rather than replace them.
Artificial intelligence has allowed new insight into financial market analysis. NLP allows researchers to quickly and efficiently analyse millions of discussions. However, it does remind us that the financial markets are influenced by people, which are not always predictable or rational. In my opinion, AI will not completely replace human decision making in the future of market analysis. However, it is likely that human and machine intelligence will be used together. Computers are excellent at recognising complex trends within large data sets, however, to understand why individuals make specific financial decisions a human perspective will be required.
Bibliography
https://www.sciencedirect.com/science/article/pii/S2214635021000459
https://scholar.google.com/scholar?q=A+Tale+of+Company+Fundamentals+vs+Sentiment+ Driven+Pricing+The+Case+of+GameStop
https://www.ebsco.com/articles/business-and-management/cf6a3620-b1a9-5907-94b9-b492 bd0db320/place-your-bets-the-value-of-investment-research-on-reddit-s-wallstreetbets
https://scholar.google.com/scholar?q=Place+Your+Bets+The+Value+of+Investment+Resear ch+on+Reddit+WallStreetBets
https://scholar.google.com/scholar?q=Speech+and+Language+Processing+Jurafsky+Martin
https://scholar.google.com/scholar?q=Artificial+Intelligence+A+Modern+Approach+Russell+ Norvig
https://scholar.google.com/scholar?q=Turning+Stocks+into+Memes+A+Dataset+for+Underst anding+How+Social+Communities+Can+Drive+Wall+Street