Skip to content

Fix $volume normalization issue - #792

Merged
you-n-g merged 4 commits into
microsoft:mainfrom
2young-2simple-sometimes-naive:patch-1
Jan 1, 2022
Merged

Fix $volume normalization issue#792
you-n-g merged 4 commits into
microsoft:mainfrom
2young-2simple-sometimes-naive:patch-1

Conversation

@2young-2simple-sometimes-naive

Copy link
Copy Markdown
Contributor

Fix: #765

Description

change $volume to $volume+1e-12 such that low volume stocks will not create infinity in features.

Motivation and Context

https://github.com//issues/765 $volume creates infinity for low volume stocks.

How Has This Been Tested?

  • 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:

Types of changes

  • Fix bugs
  • Add new feature
  • Update documentation
@you-n-g

you-n-g commented Jan 1, 2022

Copy link
Copy Markdown
Contributor
@you-n-g

you-n-g commented Jan 1, 2022

Copy link
Copy Markdown
Contributor

Besides, will your results change significantly if you add this patch?

@you-n-g

you-n-g commented Jan 1, 2022

Copy link
Copy Markdown
Contributor
@2young-2simple-sometimes-naive

Copy link
Copy Markdown
Contributor Author

Besides, will your results change significantly if you add this patch?

Depends on the selection of stocks. My strategy has a lot of low volumes stocks, and the fix does not change the IC/RIC significantly. It turns out the volume info is not that important in my stock pool.

@you-n-g

you-n-g commented Jan 1, 2022

Copy link
Copy Markdown
Contributor

It looks great to me.
Thanks so much!

@you-n-g
you-n-g merged commit e76b409 into microsoft:main Jan 1, 2022
@you-n-g you-n-g added the bug Something isn't working label Jan 12, 2022
YQ Tsui (qianyun210603) pushed a commit to qianyun210603/qlib that referenced this pull request Mar 23, 2023
* Fix $volume normalization issue

Fix: microsoft#765

* black formatting

black formatting

* black formatting

black formatting

* black formatting

black formatting
you-n-g added a commit to you-n-g/qlib that referenced this pull request Aug 16, 2025
…t#792)

* refactor: use dynamic input path and update template loader

* fix: update include syntax for data source in prompts.yaml

* add customization path

* docs: update prompts for ensemble scoring and metric direction

* chore: remove obsolete data_science/share.yaml file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

2 participants