Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the region in qlib.config for FileCalendarStorage. #1049

Merged
merged 3 commits into from
Apr 20, 2022

Conversation

ChiahungTai
Copy link
Collaborator

Description

  1. Add parameter region in method "resam_calendar".
  2. Add region in time.py
  3. Get region in qlib.config in FileCalendarStorage

Motivation and Context

The high frequency backtest use the calendar for minutes data. Once the region is not "cn", the result of resam_calendar will be now due to differnt trasaction time in different region.

How Has This Been Tested?

<! --- Put an x in all the boxes that apply: --->

  • Pass the test by running: pytest qlib/tests/test_all_pipeline.py under upper directory of qlib.
  • If you are adding a new feature, test on your own test scripts.

Screenshots of Test Results (if appropriate):

  1. Pipeline test:
  2. Your own tests:

Screen Shot 2022-04-14 at 9 14 45 PM

Types of changes

  • Fix bugs
  • Add new feature
  • Update documentation

@ChiahungTai
Copy link
Collaborator Author

@you-n-g Could you please review this patch?

qlib/utils/resam.py Outdated Show resolved Hide resolved
qlib/utils/time.py Outdated Show resolved Hide resolved
@you-n-g
Copy link
Collaborator

you-n-g commented Apr 20, 2022

It looks great!
Thanks so much!

@you-n-g you-n-g merged commit fe0f942 into microsoft:main Apr 20, 2022
@ChiahungTai ChiahungTai deleted the region branch April 21, 2022 10:24
@you-n-g you-n-g added the enhancement New feature or request label Apr 24, 2022
qianyun210603 pushed a commit to qianyun210603/qlib that referenced this pull request Mar 23, 2023
* Use the region in qlib.config for FileCalendarStorage.

* Fix black.

* Make region as an optional parameter.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants