Inspiration
Often times, the stock market is perceived as an obscure entity--its fluctuations seem downright random and based on the whims of various people in power, breaking news, and other people who own lots of stock. So though apps like Robinhood have permeated the public presence, and though entrance cost is relatively low, actually predicting the stock market is thought of as a job for the rocket scientists from MIT.
Combined with our view that the crowd is the biggest underutilized data source in finance, we built an app (for the people) that analyzes general public sentiment regarding stocks, products, or indices. Instead of just analyzing indicators like moving day averages or predicting small news-prompted fluctuations, our web app aims to leverage the insight of human beings and the power of machine learning to understand big trends in public sentiment and thereby the stock market.
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 Language Processing API to determine the sentiment level of these tweets. Our code then uses the SciPy library and BlackRock's API to generate a regression model based on the sentiment data of relevant tweets and stock performance from the past seven days to make a prediction about future trends. The front-end of the website was built using React.js, and the back-end using Python and Flask. Stocksense is hosted on Github.
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 not only millions of tweets and other social media posts, but also news articles for sentiment analysis and research papers. We plan to incorporate the Event Registry API, which provides access to hundreds of millions of news articles and events with instant updates.
Built With
- blackrock-api
- css
- flask
- google-cloud
- google-natural-language-processing-api
- html
- javascript
- machine-learning
- natural-language-processing
- python
- react
Log in or sign up for Devpost to join the conversation.