Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By quantskillsGPL-3.0In 1 marketplace
Evaluates out-of-sample net value after factor-drift alerts and response actions.
Claude hands work to one, or you mention it with @.
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
简体中文 | English
QuantSkills
skill-*项目:评估因子漂移预警后的降权、重训或换信号是否产生扣除交易成本后的样本外增量。
很多量化项目可以计算 PSI、KS、CUSUM、IC 或健康概率,却没有回答更重要的决策问题:出现预警之后,采取什么动作,扣除换手和交易成本后是否真的比冻结基线更有价值?
本项目将预警、处置动作、成熟标签、模型训练边界、交易成本、误报成本和恢复延迟放在同一套样本外评估中,比较以下方案:
本仓库同时包含可复用的 Skill 声明和该项目的完整实现代码。根目录 SKILL.md 是 Skill 声明;project/ 是可执行的研究实现、测试、配置、结果快照和 QuantStudio 证据包。
项目当前是一个回顾性纠错研究,不是前瞻注册,也不是交易授权。使用 2024 年校准、2025 年起的评估窗口和至少 5 个周度观测的成熟标签门槛,收益标签持有 4 个周度观测后才可用于预警。
主要描述性结果如下,收益已扣交易费和借券费:
| 方案 | 多头累计净收益 | 对冲累计净收益 |
|---|---|---|
| 不处理 Ridge | +23.65% | -9.79% |
| 固定半仓 | +12.16% | -4.81% |
| 成熟 IC → 重训 | +28.68% | -5.92% |
| 成熟 IC → 换信号 | +31.59% | -5.13% |
| 漂移入口 → 重训 | +35.28% | -1.95% |
| 健康入口 → 换信号 | +30.85% | -5.90% |
这些数字是历史样本中的描述性结果,不能直接解释为未来收益。24 个假设经多重比较后,保守 BH 最小值为 0.5679,BH ≤ 0.10 的结果数为 0;循环块 Reality Check 正向 p 值为 0.3803。因此本项目没有把某个动态动作宣布为稳定最优策略。
当前研究决策是保留监控和审计链路,继续做纸面验证,暂不自动下单;先解决缺失收益标签、上游发布时间、真实成交和参数稳定性问题。
本 Skill 适用于:
本 Skill 只消费上游漂移和健康监控产生的预警,不重新实现 PSI、KS、CUSUM 等监控仪表盘。相关上游组件见:
本项目按 QuantSkills skill-template 的 catalog-contract v2 组织:
| 运行时 | 入口或适配文件 |
|---|---|
| Codex | SKILL.md |
| Claude Code | SKILL.md |
| Cursor | agents/cursor-rule.mdc → SKILL.md |
| Hermes | agents/portable-loader.md → SKILL.md |
| OpenClaw | agents/openai.yaml → SKILL.md |
| 项目执行 | project/scripts/run_package.py |
| QuantStudio | project/runs/quantstudio_platform_entry/ 中的真实入口证据 |
该适配器记录输入文件哈希和字段结构,不会假装完成完整回测:
python scripts/closed_loop_evaluation.py `
--panel data/panel.csv `
--alerts data/alerts.csv `
--output outputs/closure
进入 project/ 后执行:
cd project
python -m unittest discover -s tests -v
python scripts/run_package.py
项目要求 Python 3.11+,依赖见 project/requirements.txt 和 project/requirements-lock.txt。原项目的可复现解释器为 E:/envs/LLM/python.exe:
cd project
& E:/envs/LLM/python.exe -m unittest discover -s tests -v
& E:/envs/LLM/python.exe scripts/run_package.py
如果只运行部分步骤,流水线必须保留 full_run=false,不能把部分结果改写成完整成功。
原始市场面板和模型文件不随本仓库发布。请按照 project/DATA_CONTRACT.md 提供经过授权的本地快照,并保存:
(date, symbol) 唯一键;不要根据未来收益是否缺失来筛选选股池;缺失标签必须按配置显式处理,并进行敏感性分析。
.
├── SKILL.md # 根目录 Skill 声明和 QuantSkills 元数据
├── catalog.yaml # catalog-contract v2 清单
├── agents/ # 各运行时的薄适配入口
├── references/ # 数据、输出和来源边界约定
├── scripts/closed_loop_evaluation.py# 输入形状与哈希审计骨架
├── project/ # 完整项目实现
│ ├── scripts/ # 引擎、监控、重训、分析、报告和验收
│ ├── config/ # 冻结分析计划和模型配置
│ ├── tests/ # 泄漏、核算、边界和统计回归测试
│ ├── results/v2/ # 紧凑结果快照
│ ├── runs/_pipeline/ # 每个步骤的命令、输入、日志和状态
│ └── runs/quantstudio_platform_entry/ # QuantStudio 真实入口证据
├── README.md # 本文件
├── README.en.md # 英文说明
└── LICENSE # GPL-3.0-only
核心实现包括:
project/scripts/engine_v2.py:成熟标签门槛、滚动训练隔离、四相位账户、买卖和权重漂移换手、交易成本、回撤、动作臂和右删失事件;project/scripts/run_monitor_entries.py:调用项目内漂移和健康 Skill,并记录入口哈希、输入哈希和输出;project/scripts/analyze_v2.py:IID 与循环块 bootstrap、BH 多重比较和 White-style Reality Check;project/scripts/health_robustness_v2.py:健康参数扰动和稳定性报告;project/scripts/report_v2.py:结果报告和可视化页面;project/scripts/verify_v2.py、project/scripts/self_audit.py:验收检查和选题要求评分;project/scripts/run_package.py:可复现流水线入口,失败时保留失败状态。用户要求运行平台必须是 QuantStudio。本项目已从 QuantStudio 的 quantstudio profile/session、项目路径 E:\period5_package\period5_package 执行,并留下输入与输出记录。证据位于 project/runs/quantstudio_platform_entry/:
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
factor-drift-closure@quantskills is listed by quantskills/registry — review the source before installing
npx claudepluginhub quantskills/registry --plugin factor-drift-closurePlugins from other owners that cover similar ground