This repo is a scaled down version of stock crawler that collects stock metrics through the Yahoo Finance API
for the nordic markets and ranks them based on a set of composite metrics from "The little book that beats the market" by J. Greenblatt. Stock metrics are obtained by referencing ticker codes in yf, e.g. CRAYN.OL
for Crayon Group Holding ASA
, and responds with financial- and general info for that stock. Final scores for each stock are saved to excel as .xlsx
.
- Rank each stock by
(EBIT 3y average)/EV
. Largest gets 1 point, second largest 2, etc. - Rank each stock by
ROC
ORROE
. Largest gets 1 point, second largest 2, etc. - Get each stocks final score by summing over all points. The smaller final score the better.
The philosophy behind this screener is to find a set of companies that on average trades at a bargain price relative to their true value. This is done with a margin of safety as the companies generally earn well compared to their cost with little debt and is further improved by spreading the portfolio over 20-30 stocks over a year.
Install python packages from the requirements-file:
pip install -r requirements.txt
Run mainscript for all tickers and save results to .xlsx
-file:
main.py
Greenblatt J. The Little Book That Still Beats the Market.
Hoboken N.J: J. Wiley & Sons; 2010. http://site.ebrary.com/id/10419167.
Accessed October 1 2022.
Special thanks to my colleague Thomas for giving me the opportunity to assist him in his stock adventures.