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
- selenium
- pandas
- numpy
- yfinance
- openpyxl
- pyfiglet [not needed at the moment]
Below the flowcharts I followed to build the scripts
I have set up the excel file with these sheets: YNAME, DCF, MULTIPLI.
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.
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.
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
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