/getRoic

Collection of scripts to know the health status of a company and its fair value. It is based on the yfinance library.

Primary LanguagePython

getRoic

Collection of scripts to know the health status of a company and its fair value. It is based on the yfinance library.

  • Dividend Discounted Model
  • Discounted Cash Flow Model
  • Stock Picking Model, based on balance sheet multiples

Dependencies

  • selenium
  • pandas
  • numpy
  • yfinance
  • openpyxl
  • pyfiglet [not needed at the moment]

How it works

  1. Flowchart
  2. Excel File Settings
  3. Industry Table
  4. Selenium Settings
  5. Warnings

Flowchart

Below the flowcharts I followed to build the scripts

Excel File Settings

I have set up the excel file with these sheets: YNAME, DCF, MULTIPLI.

excel_sheets

Obviously you can modify them as you want, just remember to change the code.

All scripts take the names of the companies you have selected from "YNAME" sheet, python processes the data and then saves the results in the sheet set in the script.

Industry Table

balance-sheet-multiples.py script uses a csv exported from finviz.

Next you need to use text-to-columns function to split the text into columns.

At the end save the file in xlsx format and then you need to indicate the file path in the script.

Selenium Settings

For selenium settings download chromedriver.

I used two extensions. The first one to block ads and the second one to bypass cookie acceptance.

Take the crx files of these extensions and change the folder path in the script to the folder path where you stored them

Warnings

The project is still in a testing state, known issues are:

  • corrupted excel file after forced script closure [this does not always happen]
  • parameters taken from yfinance not available with some companies
  • please note that yahoo may prevent the page from loading due to too many queries. for this reason a timeout of 60s has been added. use a vpn if you think you will do a lot of queries