1
系统开发/项目简介
xiaowu edited this page 2026-08-25 15:16:44 +08:00
This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

项目简介

是什么

quanxiel = 量化交易研究项目。从 Tushare 拉取 A 股行情/财务数据存入 PostgreSQL,做因子研究、策略回测。

目录结构

quantitative_data/          # 数据采集与入库(主要)
  ├── importer.py           # 导入核心:全量导入、按日期/按股票拉取
  ├── incremental_import.py # 增量导入脚本(每日/每周)
  ├── config.py             # 配置(读 .env)
  ├── schema.sql            # 建表 DDL
  ├── requirements.txt      # 依赖清单
  ├── tushare_api_reference.md  # Tushare 接口参考(实测版)
  ├── tushare_api_check.py  # 接口自检脚本
  └── .env                  # 敏感配置(不入库)
alpha/                      # 策略/因子/回测(在开发中)

数据表

表 内容 更新频率
stock_basic 股票列表(含退市) 每日
trade_cal 交易日历 每日
daily 日线行情 每日
daily_basic 每日指标(估值/换手) 每日
adj_factor 复权因子 每日
moneyflow 资金流向 每日
index_daily 指数日线 每日
income/balancesheet/cashflow 三大报表 每周
fina_indicator 财务指标 每周

技术栈

  • 数据库:PostgreSQL(Docker,黑群晖 192.168.27.11:5438,库名 quant_db)
  • 数据源:Tushare Pro(5120 积分,VIP 财务接口可用)
  • 运行环境:小强容器(openclaw-1)venv /opt/quant-venv