Stock Sentiment Tracker
This application automatically tracks and analyses discussions on social networks to calculate market sentiment about specific stocks.
The need for such project arose after GameStop short squeeze in 2021, when Reddit caused the stock price to skyrocket, rising nearly 30 times during 1 month. After the Gamestop story, many other stocks also experienced similar sharp increases, creating many profit opportunities from the so-called "meme stocks".
Thus, this tool was created to automate social network monitoring and comment analysis. The goal of this tool is to alert the user of potential new meme stocks, which may create investment opportunities. All without having the user to read discussions themselves, which can be quite time-consuming, and instead having aggregated statistics through this app.
Application homepage screenshot
App homepage lists most popular stocks, along with their mentions count, stock price, and their change over last 24 hours.
The app is built as a web system. It works by analysing Reddit comments live-stream 24/7 in the background, looking for keywords related to specific stocks. For example, the following comment would be counted as 1 mention of Tesla stock:
Example Reddit comment, that would be counted as 1 mention for the stock
The app provides a web interface to view aggregated data. You can view the most popular stock list, as well as detailed data for each company/stock. E.g. its price history, mentions history, related news articles, and all comments that were counted as mentions. You can also view Price vs Mentions graph, to see if there's any correlation between price and mentions change:
Single company page screenshot
Technology stack:
Backend:
PHP Symfony Doctrine MySQL Elasticsearch
Frontend:
React Bootstrap Webpack Kibana
Other:
Docker FluentBit SEQ
Sentiment data is sourced from multiple subreddits (r/wallstreebets, r/wallstreetbetsOGs, r/Superstonk, r/stockmarket), in which discussions about meme stocks are most active. Financial data is sourced from Tiingo API and Google Finance/Google Sheets.
Key takeaways:
  • The statistics shown on the app (e.g. increased popularity for a specific stock) would match with how it looks like when following the discussions myself and reading the comments. So the stock popularity algorithm was working overall.
  • Automated analysis of social network comments is incredibly difficult. It required constant work to tweak the algorithm to combat new spam methods, to keep up with the slang, etc.
  • There were cases where it could be seen strong correlation between sudden price change and increased discussions on Reddit about that specific stock. However, very rarely would discussions change precede price change. So the system was useful overall as a tool to more easily keep up with stock market news, but was difficult to use for the intended goal of receiving alerts about investment opportunities into meme stocks.