docs: 修正数据采集层根因——从来就没有全市场日常采集cron(6月靠回填撑着,7月扫描池缩减暴露),sector_index_daily从未有写入者,news采集脚本存在但未注册
This commit is contained in:
@@ -81,35 +81,41 @@
|
||||
|
||||
### 🔴 缺口 1:stock_daily 无全市场日K采集 cron
|
||||
|
||||
**现状**:stock_daily 共 919 万行 / 4272 只 distinct,但 **2026-08 起每天只更新 122 只**(应该是全市场 4000+)。
|
||||
**现状**:stock_daily 共 919 万行 / 4272 只 distinct,但分月分布暴露根因——
|
||||
- 2026-01~06:每月 4255-4268 只(历史回填撑着)
|
||||
- **2026-07:529 只(骤降)**
|
||||
- **2026-08:122 只(再降)**
|
||||
|
||||
**根因**:没有专门的"全市场日K采集"cron。stock_daily 的更新靠各 scanner 顺带写(只覆盖各自扫描池),无人负责全市场刷新。
|
||||
**根因**(2026-08-12 实证修正):**从来就没有"全市场日K采集"cron**。stock_daily 唯一 INSERT 写入者是 `migrate_all.py`(一次性数据迁移脚本),`market_screener`/`accumulation_scanner` 均不写,`fetch_tx_klines` 只读不写。6 月的 4268 只是历史回填数据,7 月起只剩 scanner 顺带写的扫描池(529→122 只,在缩)。
|
||||
|
||||
**影响**:
|
||||
- p_oversold 扫描器个股 K 线只能 `fetch_tx_klines` 自己拉腾讯行情(不能读本地)
|
||||
- 回测/策略用旧 K 线数据,最新行情缺失
|
||||
|
||||
**修复建议**:注册全市场日K采集 cron(收盘后跑,比如 `10 16 * * 1-5`),用 fetch_tx_klines 批量刷 4272 只到 stock_daily。
|
||||
**修复建议**:新建全市场日K采集 cron(收盘后 `10 16 * * 1-5`),fetch_tx_klines 批量刷 4000+ 只到 stock_daily(限速+分批+单例守卫+600s 护栏)。
|
||||
|
||||
### 🔴 缺口 2:stock_news 无采集 cron(8/4 停更)
|
||||
|
||||
**现状**:stock_news 403 万行,最新 2026-08-04——**已停更 3 天**。
|
||||
**现状**:stock_news 403 万行(2016-01~2026-08-04),**8/4 停更 3 天**。
|
||||
|
||||
**根因**:news_collector.py 和 ths_news.py 写入者存在,但**均未注册 cron**(66 个 cron 里无 news 相关)。
|
||||
**根因**:news_collector.py(东财翻页)和 ths_news.py(同花顺)写入者存在且可用(支持 --backfill/--daily),但**均未注册 cron**(66 个 cron 里无 news 相关)。
|
||||
|
||||
**影响**:p_oversold 的 news3 因子用 3 天前新闻数据,信号质量下降。
|
||||
|
||||
**修复建议**:注册 news_collector cron(盘前/盘中多次),恢复新闻采集。
|
||||
**修复建议**:注册 news_collector cron(盘前 `0 9 * * 1-5 --daily` 增量 + 周末 `--backfill` 回填),恢复新闻采集。
|
||||
|
||||
### 🔴 缺口 3:sector_index_daily 无采集 cron(8/4 停更)
|
||||
|
||||
**现状**:sector_index_daily 57.9 万行,最新 2026-08-04——**已停更 3 天**。
|
||||
**现状**:sector_index_daily 57.9 万行(2016-07~2026-08-04),分月分布——
|
||||
- 2026-01~06:每月 296 行业(回填撑着)
|
||||
- **2026-07:137 行业(腰斩)**
|
||||
- **2026-08:8 行业(崩溃)**
|
||||
|
||||
**根因**:找不到 INSERT 写入者(grep 无结果),无专门采集 cron。sector_enrich_cninfo 只写 sector_snapshots,不写 index_daily。
|
||||
**根因**:**从未有 INSERT 写入者**(grep insert/executemany/replace/to_sql/append 全无结果)——57.9 万行纯历史回填,之后无人维护,7 月彻底停。
|
||||
|
||||
**影响**:p_oversold 的 sec_ret20 因子用 3 天前行业数据。
|
||||
|
||||
**修复建议**:注册 sector_index_daily 采集 cron(或让 market_watch/sector_enrich 顺带写 index_daily)。
|
||||
**修复建议**:新建 sector_index_daily 采集 cron(收盘后跑),akshare/东财拉 296 行业指数写入(ak.stock_board_industry_summary_ths 已有用法参考 market_watch.py)。
|
||||
|
||||
### 🟡 缺口 4:functional 自检 premarket fail
|
||||
|
||||
|
||||
Reference in New Issue
Block a user