Using the Intrinio Financial Data API (application programming interface) we can programmatically retrieve standardized fundamental company financials including Income Statements, Balance Sheet Statements and Cash Flow Statements.
We will use the Standardized Financials API end-point to retrieve standardized company financials throughout this lab.
In this lab we will cover:
Code examples in Python and R are provided throughout this lab.
All code examples can be run in your browser using a Jupter Notebook. To launch the Jupyter Notebook for any code example simply click the Run Jupyter Notebook button at the top of the code example.
If you wish to run the code examples in your own development environment, be sure to first install the Intrino SDK for the language of your choice:
In code examples throughout this lab you will be asked to provide your API Key.
The API keys assigned to you are available below.
For the purposes of this lab, be sure to use your Production API key
In this section we use the Standardized Financials API end-point to retrieve the 2019 Fiscal Year Income Statement for Apple Inc.
Run the code below to see the result...
Now that we've seen how to retrieve a Standardized Income Statement for a single fiscal year, let's create an array of multiple years and retrieve fiscal year Income Statements for all of them.
We'll iterate through an array of 5 years, executing an API call retrieve the Apple Inc. fiscal year Income Statement for each year.
Then, we'll process the API responses adding the income statements for each year to an 'income_statements' object.
Run the code below to see the result...
Building on our previous work, now let's create 3 graphs for 5 years of Total Revenue, Net Income, and R&D Expenses for Apple Inc.
To do so, we'll iterate through each of the income statements we added to our income_statements object, extracting the Total Revenue, Net Income, and R&D expenses.
We'll push the extracted values into new arrays representing each value type - Total Revenue, Net Income, and R&D expenses.
Once we have our Total Revenue, Net Income, and R&D expenses arrays populated we'll then create bar charts for each array.
Run the code below to see the result...