This is a free and open source stock screener that I initially developed for my investment decisions. It uses the yahoo finance API to comupte, for each stock, ~30 indicators that are used to compute six scores:
- VALUE SCORE
- LIQUIDITY SCORE
- EFFICIENCY SCORE
- SOLVENCY SCORE
- DIVIDEND SCORE
- TECHNICAL SCORE
Then, an overall score is assigned to each stock of a given market. The overall score is the average of the six scores described before.
As the libraries relies on data downloaded by yahoo finance, it can be used to screen stocks on any market. Hereafter a sample of use on the markets I usually operate:
Example of use on Italian stocks:
from invest.loader import load_borsa_italiana_stocks_symbols
from invest.fundamental_analysis import main_fundamental_indicators
from invest.technical_analysis import detect_trend
from invest.scoring import compute_score, get_indicators
from invest import Stock
import pandas as pd
# Loading symbols
symbols = load_borsa_italiana_stocks_symbols()
# Computing indicators
result = pd.DataFrame()
for symbol in symbols['SYMBOL']:
try:
mystock = Stock(symbol)
result = pd.concat([result,
get_indicators(mystock)])
except Exception as e:
print(e, e.__doc__)
pass
scores = compute_score(result.reset_index(drop=1))
Example of use on NASDAQ's stocks:
from invest.loader import load_nasdaq_exchange_symbols
from invest.fundamental_analysis import main_fundamental_indicators
from invest.technical_analysis import detect_trend
from invest.scoring import compute_score, get_indicators
from invest import Stock
import pandas as pd
# Loading symbols
symbols = load_nasdaq_exchange_symbols()
# Computing indicators
result = pd.DataFrame()
for symbol, name in zip(symbols['Symbol'], symbols['Description']):
try:
mystock = Stock(symbol)
result = pd.concat([result,
get_indicators(mystock)])
except Exception as e:
print(e, e.__doc__)
pass
scores = compute_score(result.reset_index(drop=1))
Any feedback, improvement/enhancement or issue is welcome in the issue page of the repo.
Feel free to fork this repository, modify the code and open any needed pull requests!
This repository has a MIT License.
As I am a caffeine-fueled programmer, if you want to support my open source projects you can offer me a coffee ;)