pip install .[all]
# or install the base package
pip install .To build from source with version tags, ensure setuptools-scm is available:
pip install setuptools-scmcjdata download --db path\to\data.db --start-date 20080101 --end-date 20251110This pulls xtquant reference data plus baostock daily bars into the SQLite database.
Options:
--start-date— Start date inYYYYMMDDformat (default:20080101)--end-date— End date inYYYYMMDDformat (default: today)--skip-xtquant— Skip the xtquant stage--skip-baostock— Skip the baostock stage--skip-daily— Skip ETF and stock daily market data downloads--skip-dupont— Skip DuPont financial metrics download--only-dupont— Only download DuPont data (equivalent to--skip-xtquant --skip-daily)--smoke-test— Only download the first 5 stocks; useful for verifying code changes without a full run
cjdata update --db path\to\data.db --end-date 20251110Fetches only new bars since the last recorded date for each stock.
Options:
--end-date— End date inYYYYMMDDformat (default: today)--skip-xtquant— Skip the xtquant stage--skip-baostock— Skip the baostock stage--skip-daily— Skip ETF and stock daily market data downloads--skip-dupont— Skip DuPont financial metrics download--only-dupont— Only update DuPont data (equivalent to--skip-xtquant --skip-daily)--smoke-test— Only download the first 5 stocks; useful for verifying code changes without a full run
cjdata download --db path\to\data.db --only-dupont --start-date 20180101 --end-date 20251110By default, both daily data and DuPont metrics are downloaded. Use --only-dupont for a DuPont-only refresh.
cjdata download --db smoke.db --smoke-test
cjdata update --db smoke.db --smoke-testLimits each pipeline to the first 5 stocks, allowing quick validation that code changes do not introduce regressions.
You can run any command via the module entry point:
python -m cjdata download --db path\to\data.db