Inspiration
We were inspired by recent events with the skyrocketing value of Gamestop shares and the realization by the internet of just how much power they hold over the stock market. We were specifically inspired by the activities of the subreddit "WallStreetBets", thus the name of our project.
What it does
WallStreetBots trawls subreddits dedicated to the discussion of stock and cryptocurrency (specifically satoshistreetbets for crypto and wallstreetbets for stock) and tracks the relative momentum of various stocks, computing their relative weight and if the frequency of their ticker symbol's mention is increasing or decreasing. Based on this data it generates a set of ratios that can be sent to a Gekko-based microtrading bot which will invest based on this reddit trend data.
How we built it
We used the praw library for python to interface with reddit's API and pull data from the past 5 months for the 2 aforementioned subreddits. We also constructed a .csv database for the stock ticker codes of every stock traded on the NYSE as well as all commonly traded cryptocurrencies, using a data pull from NASDAQ which we processed with the python pandas library. The python script then searches our pulled data, which can be constantly updated, to see which stocks and cryptocurrencies are trending in interest. The script yields "heat ratings" for the most popular and recently trending stocks, which are factored into an RSI equation to determine what the trading bot does. The trading bot is built with JavaScript in the Gekko framework. Currently the trading bot is fully functional for micro-trading crypto, however it is not yet operational for stock trading.
Challenges we ran into
We ran into a great many challenges with the analysis side of the bot. Reddit limits the amount of data we can pull. We worked around this by searching for a specific daily thread that allowed us to obtain a cross-section of interest in various stocks. We also used an AWS server to help us pull more data, faster. We also encountered challenges with the trading bot such as not being able to obtain up to date stock data. We are still working on this challenge, which is why the bot is currently unable to actually trade stocks, however it can trade crypto and can trade stock in simulated settings.
Accomplishments that we're proud of
We beat the market in cryptocurrency trading last night using the analysis data obtained from reddit, given to our trading bot as described above. We are proud that we actually made money from this. Additionally, we compared our analysis bot results to past stock data from the previous weeks and found that it would have made A LOT of money from tracking trending stocks and inventing when it observes spikes in interest online.
What we learned
We learned a lot about investing and stock trading, since none of us knew a whole lot about it before this project. We also learned about the inner workings of reddit as well as how to pull relevant data from webpages. Add to that we learned about a slew of different APIs and useful libraries, which we have mentioned above.
What's next for WallStreetBots
The path forward for WallStreetBots is clear - we will integrate real-time NYSE stock-trading to supplement our current cryptocurrency abilities. This will allow us to analyze and react to a variety of investment data faster and more actively than a human could and thus profit from all the trends. Ping Trietmasu#0328 if anything goes wrong with the webpage.
Built With
- amazon-web-services
- gekko
- javascript
- praw
- python
- streamlit
Log in or sign up for Devpost to join the conversation.