financeMacroFactors.valuation package

Submodules

financeMacroFactors.valuation.valuationMethods module

financeMacroFactors.valuation.valuationMethods.discountedCashFlow(fcf, shares, discountingFactor=1.1, terminalFactor=10.0)[source]

valuation of a company using the DCF method

This funciton calculates the valuation of a company using the Discounted Cash Flow method. In case there is an error in the calculations, this is going to log an error and will return a value of None.

Parameters
  • fcf (numpy 1d-array) – The free cash flow of the company for N years

  • shares (numpy 1d-array) – Number of free shares outstanding for the company. This should have the same dimensionality as the fcf vector. Moreover, there should be a one-to-one correspondence between the values within the fcf vector and the shares vector.

  • discountingFactor (float, optional) – The discounting factor by which future earnings shoule be discounted, by default 1.1 which represents a 10% valuation for the future value of money

  • terminalFactor (float, optional) – The value by which the final extrapolated EPS value should be multiplied so as to obtain a terminal value of the company, by default 10

Returns

The calculated valuation of the company. If there is an error, a None will be returned.

Return type

float or None

financeMacroFactors.valuation.valuationMethods.discountedFutureEarnings(eps, discountingFactor=1.1, terminalFactor=10.0)[source]

obtain DFE Valuation

Calculate the valuation using the Discounted Future Earnings valuation method. This function assumes that the input for the earnings per share relates to the yearly EPS values for a company for the previous N years. Ideally this value is approcimately 5. If this value is less than 3, then an error will be registered and a value of None returned.

Parameters
  • eps (numpy 1d-array) – The earnings for share for the last N years of data

  • discountingFactor (float, optional) – The discounting factor by which future earnings shoule be discounted, by default 1.1 which represents a 10% valuation for the future value of money

  • terminalFactor (float, optional) – The value by which the final extrapolated EPS value should be multiplied so as to obtain a terminal value of the company, by default 10

Returns

The calculated valuation of the company. If there is an error, a None will be returned.

Return type

float or None

financeMacroFactors.valuation.valuationMethods.priceToEarningsRatio(eps, price)[source]

valuation of a company using the P/E ration method

This will allow you to get the valuation of the company with the price-to-earnings method. In case that there is an error detected, this is going to return a None and will also log an appropriate error.

Parameters
  • eps (numpy 1d-array) – This is a vector of yearly earnings per share associated with the company for the last N years. This is typically present in the Income Statement of the company.

  • price (numpy 1d-array) – This is a vector representing the price of a single share for the last N years. The size of the vector should be the same as the size of the other two input vectors. There should be a one-to-one correspondence between the values within the vector.

Returns

The valuation of the company according to the P/E method

Return type

float

financeMacroFactors.valuation.valuationMethods.priceToSalesRatio(revenue, shares, price)[source]

valuation of a company using the P/S ration method

This will allow you to get the valuation of the company with the price-to-sales method. In case that there is an error detected, this is going to return a None and will also log an appropriate error.

Parameters
  • revenue (numpy 1d-array) – This is a vector of yearly revenues associated with the company for the last N years. This is typically present in the Income Statement of the company.

  • shares (numpy 1d-array) – This is a vector containing the number of shares outstanding of the company for the same years for which the revenue is provided. There should be a one-to-one correspondence between the revenue and the number of shares outstanding.

  • price (numpy 1d-array) – This is a vector representing the price of a single share for the last N years. The size of the vector should be the same as the size of the other two input vectors. There should be a one-to-one correspondence between the values within the vector.

Returns

The valuation of the company according to the P/S method

Return type

float

Module contents

API for getting the valuation of a company

This module can be used for calculating the valuation of a company. There are 4 different methods available for company valuation. These are the following:

  1. The P/S Valuation method

  2. The P/E Valuation method

  3. The DFE Valuation method

  4. The DCF Valuation method

For a detailed description of the different valuation methods it may be helpful to look at the following Medium Article:

Sure you know the stock price. But do you know its value?.