Inspiration

Amateur stock trading is a big part of us college students, and it is quite common for us to lose money due to bad advice, which then leads to financial and likely emotional distress. We were inspired by how complicated stock trading data can be and how for college students it would be really good if we could provide a better way for students at a glance to determine value of the market.

What it does

First, we access tweets using the Twitter API, determining which stocks are mentioned and performing sentiment analysis via TextBlob to determine the overall positivity of that particular stock. We then select the top 50 most positively-viewed stocks, use yfinance to grab the values of the stocks, simulating a purchase of one share each. We store our portfolio and its value in a mongo-db database. Finally, we perform this analysis once a day, determining the new top 50 stocks, selling off those that fell off the list and buying new ones.

How we built it

First, we access tweets using the Twitter API, determining which stocks are mentioned and performing sentiment analysis via TextBlob to determine the overall positivity of that particular stock. We then select the top 50 most positively-viewed stocks, use yfinance to grab the values of the stocks, simulating a purchase of one share each. We store our portfolio and its value in a mongo-db database. Finally, we perform this analysis once a day, determining the new top 50 stocks, selling off those that fell off the list and buying new ones.

Challenges we ran into

The first challenge we ran into was integration. As we all worked on different parts of the project simultaneously, coordinating to make sure everyone's code all worked together was an unforeseen problem. Real time graphing was also a challenge.

Accomplishments that we're proud of

The entire thing and sentiment analysis. Sentiment analysis that's fast and based on real time twitter is the most impressive part of the project and is the backbone to make it all work.

What we learned

In school its often difficult to find good opportunities to collaborate with multiple people so this taught us a lot about how to write code and design a project that's conducive to multiple people all working on the same code base at the same time.

What's next for Twitter Trader

The next steps would be adding more flexibility and customization for the simulation. This would come in the form of user inputted tickers and different amounts of stock being purchased for each company.

Built With

Share this project:

Updates