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

How to import our own csi300.txt? #445

Closed
arisliang opened this issue May 27, 2021 · 5 comments
Closed

How to import our own csi300.txt? #445

arisliang opened this issue May 27, 2021 · 5 comments
Labels
question Further information is requested

Comments

@arisliang
Copy link
Contributor

❓ Questions and Help

If download the demo 1d data using provided script, it would import a csi300.txt in instruments folder.

python scripts/get_data.py qlib_data --target_dir ~/.qlib/qlib_data/cn_data --region cn

When importing our own data say in csv format, how do we import this csi300.txt file as well? This file is not in usual csv format, so cannot be provided through CSV import I assume.

@arisliang arisliang added the question Further information is requested label May 27, 2021
@zhupr
Copy link
Collaborator

zhupr commented May 27, 2021

Import csi100 or csi300, reference: https://github.com/microsoft/qlib/blob/main/scripts/data_collector/cn_index/README.md

python collector.py --index_name CSI300 --qlib_dir <user qlib data dir> --method parse_instruments

@arisliang
Copy link
Contributor Author

Thanks, this works. What is the difference between parse_instruments and save_new_companies?

@zhupr
Copy link
Collaborator

zhupr commented May 27, 2021

parse_instruments: generate component stock changes with "index" history
save_new_companies: download only the "index" list of latest included stocks

@arisliang
Copy link
Contributor Author

Thanks for the explanation!

@you-n-g
Copy link
Collaborator

you-n-g commented May 28, 2021

@arisliang
Would you mind sending a PR to improve the docs about this Question?
Other users who have similar confusion will be grateful to you :)
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants