Public Entry Point
The public dry run does not open a database or download data:
python scripts/run_pipeline.py --list-stages
For users with equivalent, legally obtained data, the ordered command map is:
python src/init_database.py --db data/db/huatai_quant.db
python src/replicate_tradable_universe.py --skip-pull --raw-dir data/raw --processed-dir data/processed
python src/construct_term_structure_factors.py --db data/db/huatai_quant.db
python src/construct_momentum_factors.py --db data/db/huatai_quant.db
python src/construct_inventory_factors.py --db data/db/huatai_quant.db --write-db
python src/construct_position_factors.py --db data/db/huatai_quant.db
python src/reproduce_figures_8_10.py --db data/db/huatai_quant.db
python src/reproduce_figures_56_58.py --db data/db/huatai_quant.db
python src/reproduce_figures_59_63.py --db data/db/huatai_quant.db
The remaining factor families and report figures use the matching scripts in src/. Run scripts/run_pipeline.py --list-stages for the complete stage-to-script map.
Data Flow
Licensed futures / spot / holdings inputs
|
v
SQLite contract tables
|
v
Dynamic tradable universe (daily, Friday snapshots)
|
v
Term structure | momentum | inventory | position | volatility factors
|
v
Friday cross-sectional quintiles and next-period daily returns
|
v
IC diagnostics, industry-neutral checks, robustness, multi-factor portfolios
|
v
Aggregate public evidence, supplementary report, static site
Boundaries
data/ is intentionally empty except for its contract documentation. Scripts default to a local SQLite path but no database is committed. The results bundle contains only portfolio-level summaries, tables, and author-generated figures; it contains no contract-level observations or licensed research text.