Inspiration
Our hero Elon Musk is famous for his tweets that affect Tesla Stock Prices. As I was scrolling through Twitter, I wondered if @realdonaldtrump's tweets affected the nation's "stock" in a similar fashion.
What it does
Our project allows users to see projected effects on the economy from a theoretical Trump Tweet. A user can input their own tweet or one from Trump himself and see it scored from 0 to 1 on the basis of whether it will increase or decrease the US Dollar index.
How I built it
We collected data on DXY(the US Dollar Index) and trump tweets from the Trump Twitter Archive. Then we labeled the tweets based on whether the DXY went up or down on the following day. After applying a natural language model, we used neural networks to finalize our model. From there, we adapted our model to PythonAnywhere and uploaded it. We build a Graphical User Interface (GUI) to make our model useful for the public.
Challenges I ran into
It was initially difficult to find stock indices online, but Yahoo finance had a CSV to download. The same went for Trump tweets, since we didn't have a twitter API, but the Trump Twitter Archive served our needs. Also, holidays and weekends did not show up for the DXY index, so we found a way to work around that. The keras model was built using Tensorflow 2.3.0, whereas PythonAnywhere only supported Tensorflow 2.0.0. After building our model, we had to downgrade it for compatibility in order to deploy it.
Accomplishments that I'm proud of
We're proud of developing a fully functional model and deploying it for immediate usage, and making something creative out of these seemingly unassociated information sets.
What I learned
We learned how to use natural language models, and it was our first time deploying python in a web interface. We learned that there actually is predictability (we scored between 0.53 and 0.55) with Trump tweets and the US Dollar, which is very important for people to know.
What's next for Trump Tweets and Stock Prices/Indices
One thing that we noticed was that there were more "bad day" tweets than "good day" tweets. We're going to do an exploration into whether the volume of tweets from that account is associated with how the economy performs.In addition, we are planning to apply our concept and model to other influential figures.
Log in or sign up for Devpost to join the conversation.