Stock Score is a python script to score stocks based on specified criteria. The goal of this project is to provide a stock screening system for various types of stock classifications (growth, momentum, value, etc.).
Similar to how one might rank the best options when they are deciding where to go to dinner, Stock Score lets investors choose what screens they want to run. Then, this script takes care of the rest, showing which stocks performed best under the given screens.
To clone this repository, run the following:
git clone https://github.com/jackmoody11/stockscore
Change working directory to project folder
cd my/path/to/stockscore
Create a virtual environment
python3 -m venv env
Activate the virtual environment. See the docs for help.
Then make init
to install required modules.
To make sure that everything is working, while in the working directory of the stockScore project, run python3 stockscore.py
.
Note: Make sure you are using python3
.
This project does not support versions below Python 3.6 since it uses f strings.
This may change in the future to allow for earlier versions of Python to run.
Here is an example output of what you can expect to see when you run the program:
Terminal output:
Top 10 stocks output:
All tests can be run by simply running
pytest
In order to run a specific test file (like test_fundamental_functions.py), run
pytest tests/test_fundamental_functions.py
To run a specific test (like "test_dividend_test_returns_scores" in test_fundamental_screens.py), run
pytest tests/test_fundamental_screens.py -k 'test_dividend_test_returns_scores'
For more information on how to use pytest (like how to select a few tests), look here for the official pytest docs.
In order to make code styling simple, this project uses black. To make sure that this code adheres to this opinion based formatting, stockscore uses pre-commit
. In order to run black automatically before making a commit, please download pre-commit
.
You may need to run pre-commit install
before you are able to use this. For more details, check out the pre-commit website.
This project is very simple to deploy to a live system. To change which tests you are using, change which functions are added to the suites (this is the name used in both files) of fundamental_functions.py
and technical_functions.py
.
Python 3 and some great third party modules (see requirements.txt for full list).
Please read the code of conduct for details on how to positively contribute to this project.
This project uses SemVer for versioning. For the versions available, see the tags on this repository.
This project is licensed under the MIT License - see the LICENSE file for details
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。