If analysis is the body, data is the soul.
In our project of stock market analysis based on Twitter sentiments, we selected a few sample companies. We decided what we needed but we still had to cast some spells to get to the core data.
As much as we dream about attending Hogwarts, we can’t simply say ‘Accio’ to make the data come to us. The computer generally doesn’t understand the spells of the wizarding world yet. So, we will just go create some of our own spells using Python.
Now that choice of language has been made, let’s dive into coding. To get the data, I need an API which can provide me with reliable data of NASDAQ. With numerous searches on Google, I found one named ‘Alpha Vantage’. It provides simple, easy to use API to retrieve around last 10 days of per minute data. Good enough to go ahead with it.
Now, with this API, either I can just simply download the JSON file everyday by making changes to the API call or I can simply write some code to get me the real-time data. Downloading it every day is one way but I chose the later one.
Sourced through Scoop.it from: www.cloudsigma.com
If you are stock market trader, this script can come in handy in terms of data mining. You can exctract Twitter sentiment data and via NASDAQ’s API to extract 10 Days pers minute data.
This way you can do stock market analysis based on Twitter sentiments all on your cloud VM or VPS.
I assume this can be replicated the process to pull feeds via Coinbase or Bitfinex API and do cryptocurrency twitter sentiment data mining.