qlib-sync: China A-share data
v0.2.0Install, update, and read a local Qlib China A-share daily dataset, with checksums and rollback.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
cn_status
Report the local A-share data's latest trading date, size, and stock pools, and whether the community release has newer data (set offline=True to skip the network check).
| Parameter | Type | Description |
|---|---|---|
offline | boolean |
cn_update
Install or update the local A-share data from the community release. Returns quickly when already current. Otherwise downloads about 550 MB, checks it with the dataset maintainers' own validator, and swaps it in; this takes roughly a minute. A release that cannot be verified is refused, and on any failure the previous data is restored. The result lists new trading days, listed/delisted symbols, and `verified`.
| Parameter | Type | Description |
|---|---|---|
force | boolean |
cn_health_check
Validate the local data's structure and perform a real Qlib read; returns ok, errors, checks.
cn_get_prices
Daily bars for up to 20 A-share symbols between start and end (YYYY-MM-DD, inclusive; end defaults to the latest date). fields: any of open, high, low, close, vwap, volume, amount, change, factor (default open, high, low, close, volume, change). change is the daily return as a fraction (0.01 = +1%). price_basis="raw" gives real traded prices and share volume; "adjusted" gives Qlib's split- and dividend-adjusted series. Rows are capped by max_rows.
| Parameter | Type | Description |
|---|---|---|
start * | string | |
symbols * | array | |
end | ||
fields | ||
max_rows | integer | |
price_basis | string |
cn_list_pool
Members of a stock pool on a date (default: the latest date). Pools: all, csi100, csi300, csi500, csi800, csi1000, csiall, plus any local pools; cn_status lists what exists.
| Parameter | Type | Description |
|---|---|---|
date | ||
pool | string |