Repo that consists of all settings used for Quant Equity software modules
After connecting to the Quant Equity Artifact Feed, you can install Quant Equity Settings by running the pip command:
pip install qe_settings
About the package requirements
:
- Install the dev requirements in your local machine by running:
pip install -r requirements/dev.txt
-
Requirements for Unit testing can be found in
requirements/test.txt
-
Requirements for Prod build can be found in
requirements/prod.txt
-
Prod requirements are reused in both Dev and Test requirements.
The master branch is the main working branch for researchers.
If you want to push your branch please adhere to the following rules:
- If you add a new feature to the repo, use: "feature/<branch_name>".
- For bugfixes, use: "bugfix/<branch_name>".
- For research projects, use: "research/<branch_name>".
- For expansion of our unittests, use: "tests/<branch_name>".
Besides, delete your branch after merge or inactivity. We want to keep the repo clean!
We adhere to strong coding quality. Please read the following documentation before contributing.
If you want to make a PR, please format your code following Pre-Commit rules.
The rules are specified in .pre-commit-config.yaml
.
In order to check whether your code complies you can first install pre-commit:
pip install pre-commit
You can then run the following command to check whether the code is compliant:
pre-commit run --all-files
If you want you can run pre-commit automatically whenever you want to commit and avoid commits if the code does not pass the tests. To set this up run the following command in your terminal:
pre-commit install
Finally, you should make sure that our unittests cover the added features.
That is, you might need to add test functions. These are ALL located in the tests
folder.
Make sure that all tests succeed by running the following lines in your folder with the .git
file:
pytest
For all strategies, both with research and with production settings, we test whether the required data and ranking outcomes change.
We do this by keeping track of the hashes of the data-input and the final ranking. These hashes are saved in the tests/test_ranking/test_integration
folder and look like:
You can update the hashes using the following command in your command line from your qe_settings .git
location:
rhino-updatehash
Whenever you want to add a new node
/transformer
/combinator
to the models_prd.yml
,
you also need to add a description of the object in the descriptions.yml
.
Be sure that the object you describe is in the same place relative
to the other objects as in the models_prd.yml
.
Otherwise, the unit test will fail.
In addition, to be able to preserve historical mappings whenever there are name changes, we use rhino_id
s.
Every object in models_prd.yml
should also have a mapping in the rhino_id_mapping.yml
.
If you make new objects, the identifiers will be updated automatically when you run rhino-updatehash
.
However, if you want to rename a node/transformer/combinator you should specifically run one of
the following commands in the command line:
rhino-id --rename-node <old_name> <new_name>
rhino-id --rename-transformer <old_name> <new_name>
rhino-id --rename-combinator <old_name> <new_name>
Asterix settings are also checked using hashes. After making changes you will need to update hashes by running the following command in your command line from your qe_settings .git
location:
asterix-updatehash