qlib
qlib copied to clipboard
Add util function to help automatically get horizon
Add util function to help automatically get horizon
Description
Add util function to help automatically get horizon
Motivation and Context
In some code like TRA and DDG-DA, horizon is manually passed into the model. Which is not convenient to automate the workflow. Add a util function to help guess the horizon by label.
How Has This Been Tested?
- [x] Pass the test by running:
pytest qlib/tests/test_all_pipeline.pyunder upper directory ofqlib. - [x] If you are adding a new feature, test on your own test scripts.
Screenshots of Test Results (if appropriate):
-
Pipeline test:
-
Your own tests:
qrun workflow_config_tra_Alpha158.yaml and remove the "horizon" field in the yaml config
Types of changes
- [ ] Fix bugs
- [x] Add new feature
- [ ] Update documentation