Inspiration

The inspiration for Stocksense was derived from our passion for financial tech products. Various applications today such as Robinhood allow traders to effectively buy, sell, and evaluate stocks; but there currently does not exist an application that allows traders to understand how the general public feels about certain stocks and trends. After all, the rise and fall of stocks in the stock market are dependent on the public's trust of the companies' performance record.

What it does

Stocksense is a financial tech tool that allows users to discover and predict trends in the stock market based on how the general public feels about stocks via their reactions on Twitter. If a user were to search stock XYZ on Stocksense, our backend would evaluate hundreds of tweets with keyword "XYZ" and use machine learning to judge if most of the tweets are positive reactions or if most of them are negative reactions. We would then use both the sentiment levels of the most recent tweets relating to the stock and the stock's historical data within the past seven days to create a regression model for predicting whether the stock will be "Bullish" or "Bearish" in the future.

How we built it

We utilized various APIs and SDKs in the development of Stocksense. The Twitter API (using Tweepy SDK) is used to search tweets on Twitter matching a specific query which in this case would be the stock symbol or name. Stocksense then stores the most relevant (non-retweeted) tweets as an array in Python and employs machine learning algorithms including Google's Natural Processing Language API to determine the sentiment level of these tweets. Our code then uses the SciPy stack and BlackRock's API to generate a regression model based on the sentiment levels of relevant tweets and stock performance from the past seven days to predict future trends. Jasper Gan (UC Berkeley '20) built the front-end of the website using React.js while Shashank Addagarla (Stanford '21), Aditya Zanwar (USC '20), Aditya Sridhar (Duke '20), and Callum Córdova Pe (USC '20) built the back-end of the website using Python and Flask. The front-end is hosted on Github while the back-end/REST API is deployed on Heroku.

Accomplishments that we're proud of

We're proud of utilizing an array of APIs, SDKs, and data science tools to create a robust financial tech tool usable by virtually every trader who engages in the stock market. Our website offers a clean, intuitive interface for discovering trends in stocks which are applicable in making critical investment decisions. Additionally, we're proud of developing an incredible backend and REST API within 36-hours and have them all fully deployed in the cloud.

What's next for Stocksense

The are no limits to where Stocksense can go next. First and foremost, due to time constraints we were only able to extract data from Twitter's API, but we look forward to utilizing posts on various other social media platforms such as Facebook, Reddit, StockTwits, etc. to generate more accurate and precise predictions in stock trends. Furthermore, because our front-facing application is built using React.js, a next step would be to integrate the code into React Native to create a mobile app on iOS/Android. Another goal of ours is to broaden our data set and optimize our "crawler" to quickly and effectively search millions of tweets/posts online for sentiment analysis.

Built With

Share this project:

Updates