| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Chinese blog about this project: 量化系列2 - 众包数据集
Table of contents generated with markdown-toc
To: dmnsn7 Who provided tushare token and make daily update possible.
To continue maintain the CI/CD pipeline for this project, we need VPS with 30G+ memory, 4 core+ CPU and good connection to dolthub and github.
If you are willing to sponsor the running environment, please contact me directly.
If you are willing to sponsor the VPS fee, you can donate in this page: https://mp.weixin.qq.com/s/Athd5hsiN_hIKKgxIiO_ow
Thanks for everyone's help.
wget "https://github.com/chenditc/investment_data/releases/download/<release-tag>/qlib_bin.tar.gz" wget "https://github.com/chenditc/investment_data/releases/download/<release-tag>/qlib_bin.manifest.json" python3 qlib/validate_archive.py \ --archive qlib_bin.tar.gz \ --manifest qlib_bin.manifest.json \ --expected-tag "<release-tag>" \ --require-publishable tar -zxvf qlib_bin.tar.gz -C ~/.qlib/qlib_data/cn_data --strip-components=1
If you want to contribute to the set of scripts or the data, here is what you should do to set up a dev environment.
Follow https://github.com/dolthub/dolt
Raw data hosted on dolt: https://www.dolthub.com/repositories/chenditc/investment_data
To download as dolt database:
dolt clone chenditc/investment_data
docker run \ -v /<some output directory>:/output \ -it --rm chenditc/investment_data bash dump_qlib_bin.sh
The standalone diagnostic grammar is bash dump_qlib_bin.sh [WORKING_DIR [QLIB_REPOSITORY]]. It always creates and validates qlib_bin.tar.gz together with qlib_bin.manifest.json. A standalone manifest has image_digest:null, so it is suitable for local inspection but cannot be published as a release asset.
You can use the following parameter to mount an existing dolt chenditc/investment_data folder to the container.
-v /<dolt directory>:/dolt
You will need tushare token to use tushare api. Get tushare token from https://tushare.pro/
export TUSHARE=<Token> bash daily_update.sh
docker run -v /<some output directory>:/output -it --rm chenditc/investment_data \ bash -lc 'bash daily_update.sh && bash dump_qlib_bin.sh'
Release publication is authorized only by the digest-pinned workflow on main. Dispatch the normal publisher with:
gh workflow run upload_release.yml --repo chenditc/investment_data --ref main -f operation=publish
upload_release.sh is workflow-internal and rejects direct/local/container publication. The workflow validates the ten-field manifest and the complete archive before any release mutation, then redownloads and validates both canonical assets.
A full repository revert is ordered and fail-closed:
The revert may move the convenience latest image and therefore affect data update, but it cannot publish while the upload workflow is disabled. Draining is mandatory because a full revert may remove the shared lock and concurrency group. Already accepted release assets are untouched. An interrupted historical repair may complete only through the fixed repair-2026-07-20 operation, and the stale backup is never auto-restored. The deployed monitor is separate external state; roll it back only with the tracked ops/investment-data-project-monitor/deploy.sh rollback, never as part of the repository revert.
tar -zxvf qlib_bin.tar.gz -C ~/.qlib/qlib_data/cn_data --strip-components=1
The database table on dolthub is named with prefix of data source, for example ts_a_stock_eod_price. The meaning of the prefix:
The initial date for each stock might be different, when we calculate the adjusted price, we are using the first date price as adjust factor = 1.0.
In order to merge different data sources, we need to rescale the adjust factor, so that each data source will have the same adjusted price.
Each data source will have a dedicated link table, which is generated by:
Data validation needs to run to verify if the adjust factor match between each data source:
To add a new stock index, we need to change:
Please raise an issue to discuss the plan, example issue: #11
It should includes:
If the data is not clean, we might try hard to dig insight from it and find incorrect insight. So we want high quality data instead of just data.
| Back | FazBrowse Home | New Git URL |