/scikit-invest

A simple, open source, stock screener

Primary LanguagePython

scikit-invest

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:

  1. VALUE SCORE
  2. LIQUIDITY SCORE
  3. EFFICIENCY SCORE
  4. SOLVENCY SCORE
  5. DIVIDEND SCORE
  6. 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.

Usage

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:

Screening Borsa Italiana's stocks

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))

Screening NASDAQ's stocks

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))

Feedbacks

Any feedback, improvement/enhancement or issue is welcome in the issue page of the repo.

Contributing

Feel free to fork this repository, modify the code and open any needed pull requests!

Licence

This repository has a MIT License.

Support

As I am a caffeine-fueled programmer, if you want to support my open source projects you can offer me a coffee ;)

AleGianfelici alessandrogianfelici