Inspiration

As social media grows its user base day by day, its impact on society increases. It has a power to directly affect actions in the real world through the narratives that its users create. Consequently, social media has the power to affect how stocks behave in the market. Take for example Tesla's stock, which has been often heavily influenced by tweets and narratives based on people's opinions of those tweets. Volatility v Twitter analyzes the trends of stocks based on chatter on Twitter and determines if they are affected by Twitter media narratives or not and assist users to make an informed decision before they invest in a stock. We expect this tool to be invaluable to new and experienced investors in the near future.

What it does

Volatility v Twitter is a web application that analyzes the trends of a stock to find a correlation to narratives about it on Twitter. The user enters a stock symbol to analyze current, and outputs the correlation and other statistics to the user. This will determine if the trends of the stock are influenced by narratives on Twitter.

How we built it

The web app is created with ReactJS and TailwindCSS for the front end, and Python Flask for the backend. The application uses the Twitter API to search for twitter keywords related to a stock and then analyzes the sentiment of tweets related to this stock using the RoBERTa Sentiment Analysis model. From this we can analyze the correlation between the positive or negative narrative and its influence on the stock.

Challenges we ran into

One of the biggest challenges that my team ran into was finding out the limitation in the Twitter API and the Python Tweepy library. It took us a while to figure out that the API not returning data in the correct time range was due to the limitation of the API's free tier. The free tier only allows us to retrieve tweets only in the range of a fixed week based on the current date. This was a big limiting factor since it hindered our plans to analyze historical stock data.

Accomplishments that we're proud of

Firstly, we are happy with our organization of data from the APIs that made the rest of the process of data mining easier for the team. We did this by implementing good software engineering techniques to make the code modular. Additionally, our team ethic was something that we were proud of. We split up tasks effectively allowing us to achieve more with our own tasks as well as communicate more effectively with the team about our contributions and ideas.

What we learned

We learned several things in the span of the project, such as connecting a React app and Flask backend together, learning the process of analyzing sentiment after proper data cleaning, and making API calls. We learned more about how to use the Pandas library and merging Pandas data frames. We also improved our time management and collaboration skills.

What's next for Volatility v Twitter

We have a lot of exciting things in store for VVT. First, we plan on analyzing historical data which we were not able to due to API restrictions. Historical data is extremely important to our application since this will enable us to inform the users whether a stock is consistently influenced by narratives on the internet. We will achieve this by expanding beyond Twitter and including other social media as well as websites, blogs, and articles. Narratives are formed in various places, and broadening our horizon will increase the accuracy of our classification. We also plan on increasing the accuracy of our classification by utilizing more advanced NLP techniques to get a better insight into the formation of people's narratives that affect the stock market.

Share this project:

Updates