mirror of
https://github.com/microsoft/qlib.git
synced 2026-06-30 01:21:18 +08:00
Collect Data From Yahoo Finance
Please pay ATTENTION that the data is collected from Yahoo Finance and the data might not be perfect. We recommend users to prepare their own data if they have high-quality dataset. For more information, users can refer to the related document
Examples of abnormal data
We have considered STOCK PRICE ADJUSTMENT, but some price series seem still very abnormal.
Requirements
pip install -r requirements.txt
Collector Data
Download data and Normalize data
python collector.py collector_data --source_dir ~/.qlib/stock_data/source --region CN --start 2020-11-01 --end 2020-11-10 --delay 0.1 --interval 1d
Download Data
python collector.py download_data --source_dir ~/.qlib/stock_data/source --region CN --start 2020-11-01 --end 2020-11-10 --delay 0.1 --interval 1d
Normalize Data
python collector.py normalize_data --source_dir ~/.qlib/stock_data/source --normalize_dir ~/.qlib/stock_data/normalize --region CN
Help
pythono collector.py collector_data --help
Parameters
- interval: 1m or 1d
- region: CN or US