From 8f3ce48d1ebbb4256702cfedf7a149c2f29eac8e Mon Sep 17 00:00:00 2001 From: claude_dev Date: Sat, 12 Sep 2026 08:59:55 +0800 Subject: [PATCH] =?UTF-8?q?feat(ak):=20ak-weekly=20=E5=91=A8=E5=85=AD?= =?UTF-8?q?=E6=A1=A3=E8=BF=BD=E5=8A=A0=20margin=20=E5=85=A8=E5=8F=B2?= =?UTF-8?q?=E5=9B=9E=E8=A1=A5=E5=85=9C=E5=BA=95+=E9=80=80=E5=BD=B9?= =?UTF-8?q?=E5=83=B5=E5=B0=B8=20northbound=E2=80=94=E2=80=94=E6=B7=B1?= =?UTF-8?q?=E5=8C=97=E6=AE=B5TMC=E6=9C=80=E8=BF=91=E4=B8=A4=E6=97=A5?= =?UTF-8?q?=E5=9D=97=E7=AA=97=E7=9A=84=E6=97=A7=E7=BC=BA=E5=8F=A3=E6=AF=8F?= =?UTF-8?q?=E5=91=A8=E5=85=AD=E6=95=B4=E6=AE=B5=E7=BF=BB=E9=A1=B5=E5=B9=82?= =?UTF-8?q?=E7=AD=89=E8=A1=A5=E9=BD=90;northbound(EM=E4=B8=AA=E8=82=A1?= =?UTF-8?q?=E5=8C=97=E5=90=91=E6=8C=81=E8=82=A12024-08=E5=B7=B2=E4=B8=8B?= =?UTF-8?q?=E7=BA=BF)=E6=AF=8F=E5=91=A82883=E7=A9=BA=E8=B7=91=E5=8D=95?= =?UTF-8?q?=E4=BD=8D=E7=A7=BB=E9=99=A4,=E5=8C=97=E5=90=91=E8=BD=ACHKEX?= =?UTF-8?q?=E5=AE=98=E6=96=B9=E6=B8=A0=E9=81=93(spec=20=C2=A720.4)=20[vps]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/data_platform/ak_stock_wrapper.ps1 | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/scripts/data_platform/ak_stock_wrapper.ps1 b/scripts/data_platform/ak_stock_wrapper.ps1 index a750053..3a0ea1b 100644 --- a/scripts/data_platform/ak_stock_wrapper.ps1 +++ b/scripts/data_platform/ak_stock_wrapper.ps1 @@ -1,8 +1,10 @@ # ak_stock_wrapper.ps1 — sanguo-ak-weekly schtask wrapper (weekly 周六03:00 akshare per-stock 慢) -# --force 全量刷新; 顺序=gdhs,share_capital,top_holders,northbound (09-06 调序: -# 09-05 northbound 1117/2883 无数据标的连败触发断路器, 饿死后续 3 类型—— -# 最大最险的 northbound 挪最后, 即使再断路也不连累前面); +# --force 全量刷新; 顺序=gdhs,share_capital,top_holders (09-06 调序把最大最险的挪最后; +# 2026-09-12 移除 northbound: EM 沪深港通个股持股 2024-08 后已全量下线, +# 每周六 2883 单位全空跑纯烧时——北向改 HKEX 官方渠道, 见融合 spec §20.4); # gdhs=股东户数 per-period 全市场单次 (09-02 入列, 披露守卫>90天季度末, marker 去重无新期零网络) +# margin 回补兜底 (2026-09-12 §20): 深北段 TMC 只保留最近两日块, nightly +# T-2~T 窗漏的旧缺口每周六整段翻页幂等补齐 (state 断点续传) $env:http_proxy = '' $env:https_proxy = '' $env:all_proxy = '' @@ -11,5 +13,9 @@ $ts = Get-Date -Format 'yyyyMMdd_HHmmss' $logDir = 'C:\sanguo_vnpy_v2\data\migration_logs' if (-not (Test-Path $logDir)) { New-Item -ItemType Directory -Path $logDir -Force | Out-Null } $log = Join-Path $logDir "ak_stock_$ts.txt" -C:\Python310\python.exe -X utf8 C:\sanguo_vnpy_v2\scripts\data_platform\akshare_static_download.py --types gdhs,share_capital,top_holders,northbound --force *>> $log -exit $LASTEXITCODE +C:\Python310\python.exe -X utf8 C:\sanguo_vnpy_v2\scripts\data_platform\akshare_static_download.py --types gdhs,share_capital,top_holders --force *>> $log +$rc1 = $LASTEXITCODE +$bfLog = Join-Path $logDir "margin_backfill_$ts.txt" +C:\Python310\python.exe -X utf8 C:\sanguo_vnpy_v2\scripts\data_platform\akshare_static_download.py --margin-backfill *>> $bfLog +$rc2 = $LASTEXITCODE +if ($rc1 -ne 0 -or $rc2 -ne 0) { exit 1 } else { exit 0 }