Inspiration

I was inspired by one of the pages in G-Research's leaflet about identifying market-affecting data within tweets.

What it does

The project searches the Twitter API for tweets about a given company that a user wants to be monitored, and uses sentiment analysis to identify general sentiment about the company. Using the general time of those tweets, it would then find the change in stock market price for the company after a short delay to allow for those changes, and note whether the stock increased or decreased. This data was then fed into a machine-learning algorithm in order to predict whether a stock would rise or fall, given a general sentiment from tweets.

How I built it

I built it using a variety of APIs, notably:

  • Tweepy for getting access to tweets about the companies
  • Scikit-learn for the machine-learning
  • Microsoft Text Analytics API to provide the sentiment analysis of the tweets
  • Yahoo-Finance API in order to grab historic stock market data to learn from

Challenges I ran into

The Yahoo-Finance API only allowed for checking on a daily level when looking at historic data, meaning I could not achieve the granularity I would have required while at the hack. It should be feasible to record tweets now and see the impact later on in the day to provide training data, but this was not practical to do at the hack due to time-constraints.

Accomplishments that I'm proud of

More-or-less implementing a system to predict a rise or fall in company stock. While it may not be the most accurate method, it could be potentially be improved in order to be really useful for this field.

What I learned

How to use REST APIs, how to form JSON objects of my own, how to get set up with Microsoft Azure

What's next for CompanyTracker

Improvements to the algorithm to allow it to be more accurate in its predictions.

Built With

Share this project:

Updates