Saturday, June 22, 2019

Analyzing MSFT Financial Data using AlphaVantage and Google Colab

In today's world, it's very easy to analyze data sets online, including financial data. This article shows how to compute standard statistical properties of a financial data set, like linear approximation and standard deviation. The example is using python based jupyter notebook, shared through Google Colab.

Here's a Jupyter Notebook, which can be used for this exercise.

First, we start by creating an API key in AlphaVantage.


Next, we can display a downloaded financial dataset, which corresponds to MSFT historical data.

After this step, we run statistical analysis of dataset using Python stats library.

from scipy import stats

slope, intercept, r_value, p_value, std_err = stats.linregress(x, y)


Then, we can display the resulting data using Matplotlib. The chart will be displayed in the result window of Jupyter Notebook:


Google Research Colab is a very popular and simple tool for running all sorts of data set analysis tasks. This also includes deep learning using tensorflow library. It is a step forward into simplifying data analysis in the research community.