mirror of
https://github.com/microsoft/qlib.git
synced 2026-06-06 05:51:17 +08:00
* updated readme of yahoo collector where region parameter was incorrect * changes update readme of yahoo collector where region parameter was incorrect * update readme of yahoo collector update readme of yahoo collector where region parameter was incorrect * updated changes * updated readme of cn1d data Co-authored-by: Gaurav Chauhan01/HO/Analytics/General <Gaurav.Chauhan01@bajajallianz.in>
Download Qlib Data
Download CN Data
# daily data
python get_data.py qlib_data --target_dir ~/.qlib/qlib_data/cn_data --region cn
# 1min data (Optional for running non-high-frequency strategies)
python scripts/get_data.py qlib_data --target_dir ~/.qlib/qlib_data/qlib_cn_1min --region cn --interval 1min
Download US Data
python get_data.py qlib_data --target_dir ~/.qlib/qlib_data/us_data --region us
Download CN Simple Data
python get_data.py qlib_data --name qlib_data_simple --target_dir ~/.qlib/qlib_data/cn_data --region cn
Help
python get_data.py qlib_data --help
Using in Qlib
For more information: https://qlib.readthedocs.io/en/latest/start/initialization.html
US data
Need to download data first: Download US Data
import qlib
from qlib.config import REG_US
provider_uri = "~/.qlib/qlib_data/us_data" # target_dir
qlib.init(provider_uri=provider_uri, region=REG_US)
CN data
Need to download data first: Download CN Data
import qlib
from qlib.config import REG_CN
provider_uri = "~/.qlib/qlib_data/cn_data" # target_dir
qlib.init(provider_uri=provider_uri, region=REG_CN)