qlib icon indicating copy to clipboard operation
qlib copied to clipboard

Add util function to help automatically get horizon

Open chenditc opened this issue 2 years ago • 0 comments

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.py under upper directory of qlib.
  • [x] If you are adding a new feature, test on your own test scripts.

Screenshots of Test Results (if appropriate):

  1. Pipeline test: image

  2. Your own tests: image

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

chenditc avatar May 10 '23 09:05 chenditc