Create your own fundamental or chart based stock filter. All you need is a database set up with pystockdb.
- Lervermann
- Piotroski F-Score
- Price Target Score: analysts price targets compared with actual price
pip install pystockfilter
Build internal filters:
import logging
from pystockdb.db.schema.stocks import db
from pystockfilter.tool.build_internal_filters import BuildInternalFilters
# connect to database
arguments = {'db_args': {
'provider': 'sqlite',
'filename': db_path_test,
'create_db': False
}
}
db.bind(**arguments["db_args"])
db.generate_mapping()
# create internal filters for Adidas AG and Infineon
arguments = {'symbols': ['ADS.F', 'IFX.F']}
builder = BuildInternalFilters(arguments, logger)
builder.build()
# create internal filters for all stocks in database
arguments = {'symbols': ['ALL']}
builder = BuildInternalFilters(arguments, logger)
builder.build()