Hedge Cutters

Inspiration

What inspired our group to create this project was the sudden relevance of the stock market both in our daily lives and on the news. Because the movement to drain hedge funds was driven by people not unlike us, we wanted to have an opportunity to contribute to this unprecedented time in the free market. Additionally, our team wanted to have a fun time during our first TAMUhack event creating something we’ve never done before!

What it does

Hedge Cutter finds tweets on twitter talking about stocks, and then allows the user to select these tweets and see a stock chart for the stock they had tweeted about. There’s both a dark and light mode, and a response interface to make interactions easy!

How we built it:

At first, we split into four teams. First, tweepy was used to query tweets, and then psycopg2 was used to commit the tweets to a postgresql database. From there, Ruby on Rails was used to implement the database into a scrollbar that was made in HTML5/CSS. These tweets button tags that we used to create stock graphs, which we then injected into the webpage using JavaScript. We also implemented a light mode and dark mode using a combination of CSS and JavaScript, and the mode you choose is even stored using cookies. This was done through a combination of A) event listeners that picked up when our theme-changing icon was pressed and B) CSS variables that we modified by adding or removing a “dark” class to html.

Challenges:

One of the biggest challenges we faced was dealing with specialization–it was sometimes difficult to piece components together when 2 of us were best at back-end development and the other 2 dealt with front-end development. However, it was a fruitful experience in the end because not only did we get a chance to practice some of the skills we’ve acquired on our own, but we also learned a bit about the other end of the spectrum as we worked to put together the whole project. Though difficult, we were always able to teach each other just enough of the relevant details to effectively bridge the knowledge gaps and write the necessary code.

What we’re proud of:

To be honest, we’re all just proud that the thing works! And also that the GUI resizes with the application window! But more seriously, it feels great to have built an actual working product within 24 hours. Some of us are somewhat new to web development, so we were especially happy to have had an opportunity to apply beginner knowledge to a real project and actually do well.

What we learned:

The first thing we learned is something everyone knows: Styling with CSS is hard, but it’s worth the reward of a friendly UI--we also learned some styling techniques and tricks along the way. One of us also became quite familiar with the Twitter API as we figured out how to scrape and store relevant tweets to present and display. Beyond that, this being all of our first TAMUhacks, the biggest thing we learned is that planning and executing a development process is not nearly as intimidating as it seems. With everyone dedicated to adding what they can to the assignment, it was enjoyable to solve problems and laugh about how infuriating some issues were, and it was even better getting to see each other figure out solutions and push the project forward. All in, TAMUhack was a great experience, and there’s no doubt we each came out a bit more knowledgeable afterwards.

What's next for Hedge Cutters?:

Reddit’s r/WallstreetBets saw the takeoff of $GME, so that is definitely something we want to look into. For example, we could figure out how to add the ability to let people upvote reddit posts through their Reddit accounts (and do the same for our displayed Twitter tweets). In addition, we plan to create a Discord server with a bot that provides information that may help people decide what to buy, sell, or just look into. Alongside the technical changes we would like to do next, there are some improvements to the UI. These are the addition of borders, padding and the numeric features displaying the stocks' low and high prices, percent change and an iconographic representation showing whether the stock's prices are dropping or spiking.

Share this project:

Updates