Company Valuation With Python

sankha mukherjee
2 min readAug 24, 2020

--

In an earlier article, I had described various methods of generating the valuation of a company. I had also described an automated way of obtaining the valuation of a company using Google Sheets. For all articles that I describe, I try my best to make sure that people more comfortable with spreadsheet software are able to get some value out of the articles.

Of course, those who are more computer-savvy will recognize that automation is better-handled by a programming language. In this article, I present the Python library fiannceMacroFactors that can be used for calculating the valuation of different companies directly.

Note that all the code for this article is available in the GitHub Repo companyValuationWithPython.

In the article Sure you know the stock price. But do you know its value?, we had talked about four different methods for calculating the valuation of a company. Associated with each method, A Jupyter Notebook has been create that demonstrates how each valuation can be calculated.

  1. The Discounted Future Earnings method [link]
  2. The Discounted Cash Flow method [link]
  3. The Price-to-Sales Ratio [link]
  4. The Price-to-Earnings Ratio [link]

A separate Notebook has been provided [link] that allows one to do the entire calculation using the libraries provided. It looks like the following:

A rather easy implementation that gives you results.

A Python library like this should not be used in isolation. Ideally, you want to calculate the valuation of a number of companies and generate a screener that will allow you to narrow down focus on companies that are currently undervalued. Remember that a screener is not to be used as a basis for a trading strategy — rather as the beginning of a more detailed evaluation process of the potential of the company of future returns.

References:

  1. Review of company valuations [link]
  2. All code for this demo [link]
  3. Library for downloading fundamental data, stock price, and calculating the valuation of a company [link]

--

--