Using Fundamental Analysis Package to get FCF and ROIC

Michael Wirtz
3 min readMar 13, 2021



Looking further into sustainable investing, it is important to not forget to look at the fundamentals. For this article, we will be looking into quickly getting information about companies through the Fundamental Analysis package. The specific metrics in question are FCF Per Share and ROIC — widely considered the most important metrics in fundamental analysis. The question we will be asking here is, “Can the business generate growing FCF Per Share and sustain high ROIC?”

Analyzing Sustainable FCF and ROIC

  • Input: List of company stock tickers
  • Output: Same list of companies ranked in order of best FCF and ROIC metrics to worst FCF and ROIC metrics.


This analysis was rather simple as far as the offerings of the package are concerned. The notebook just dips your toes into the available metrics offered by the Fundamental Analysis package. I highly encourage those interested to check out the package more thoroughly.

Querying API

You will need to make an account to get an api key before you begin your querying process. To get the api key, make an account here. With the free account the package offers, you will be able to make up to 250 requests per day for data falling within the last 5 years. If you are looking to upgrade and find this package helpful, the starter plan, which will cost you $14/month, comes with unlimited requests and 30+ years of available data. Once you have your api key, access the package data in the following way:

import FundamentalAnalysis as fa# Getting api key from text file
api_key = open('/Users/MichaelWirtz/Desktop/pathfile/fundamental_analysis_api_key.txt').read()
# to get the most recently reported fcf per share metric for Apple
current_fcf = fa.key_metrics('AAPL',api_key,'annual').loc['freeCashFlowPerShare'][0]

To counter the issue of limited requests, I designed my notebook function to only make a single request per company. This way, I have the ability to make data requests on up to 250 companies per day.

Data and Calculations

What I decided to do for the feature engineering in the data frame is questionable. However, in keeping the calculations simple, I believe it was the best path. I averaged the roic and fcf per share growth into a single comprehensive metric, as seen here:

final metric = average (roic growth, fcf per share growth)

I wanted to create a composite metric to make the filtering process more linear. If you are reading and think there is a better way, please let me know.


Taking the same list of companies from the S&P 500 that I have in my previous two posts, here is the output that I got:


I believe the issues with this project lie in its simplicity. I would be very interested to talk with someone about their thoughts on the best way to go about analyzing the sustainability and growth of FCF per share and ROIC. Next steps that I would like to include into this analysis would be to compare the ranked quartiles of this data frame with returns on equity and also potentially make the comprehensive metric a bit more elaborate. As always, open to any suggestions!