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
Multi-factor portfolio health guardian producing a health matrix, crowding alerts, retire/rebuild candidates, IC decay curves, and a research-only effectiveness backtest L4 page.
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 社区项目
agent-alpha-portfolio-guardian:面向研究员与 AI Agent 编排场景,把 factor evaluate / decay、拥挤盯盘与聪明钱画像整理成 组合级健康度报告包。不自动下单,不输出无条件买卖指令,也不承诺收益。未经维护者审核前,不代表 QuantSkills 官方背书。
当前多因子组合里,哪些因子仍健康,哪些过热或衰减,哪些应进入观察 / 降权 / 退休 / 重构研究?
| 问题 | 产出 |
|---|---|
| 哪些还健康、哪些在衰减? | 因子健康度矩阵 |
| 有没有过热/踩踏风险? | 拥挤度警示 |
| 该观察、降权、重构还是移出? | 退休 / 重构 / 降权候选清单 |
| 信号还能用多久? | IC 衰减曲线 |
| 守卫规则历史上靠不靠谱? | 有效性回测 L4 |
行为入口:AGENTS.md。规则细节:references/decision-rules.md。
alpha-* 生产因子包skill-factor-evaluate / skill-factor-decay 的主分与衰减计算flowchart LR
c["portfolio.yaml"] --> e["evaluate<br/>ScoreReport"]
c --> d["decay<br/>DecayReport"]
c --> k["crowding<br/>snapshot"]
c --> s["smart-money<br/>旁证"]
e --> r["规则引擎"]
d --> r
k --> r
s --> r
r --> o["四件套 + 可选回测 L4"]
o --> human["人工研究决策"]
r -. 不下单·不接券商 .-> human
方式一:读样例 — reports/samples/mock_run/runtime_report.md、health_matrix.csv;回测页 reports/samples/backtest_mock/l4.html。
方式二:对话触发
用 alpha-portfolio-guardian 对当前多因子组合做健康度守卫;
读取已挂好的 ScoreReport / DecayReport,缺口标注降级,不要编造数值。
方式三:本机 CLI
py -3.10 -m pip install -r requirements.txt
# live 且需在线取数时设置 PANDA_DATA_USERNAME / PANDA_DATA_PASSWORD(勿提交密钥)
python -m runtime self-test
python -m runtime --mock
Copy-Item config\portfolio.example.yaml config\portfolio.yaml
python -m runtime --portfolio config/portfolio.yaml --live
python -m runtime backtest --allow-simulate
python -m runtime clean
同级建议具备:skill-factor-evaluate、skill-factor-decay、agent-crowding-risk-monitor、skill-smart-money-profiler。已有带 Pandadata 溯源的依赖产物时,本 Agent 可不持有凭证。
Copy-Item config\portfolio.example.yaml config\portfolio.yaml
| 字段 | 含义 |
|---|---|
as_of | 结论锚定日;null = 运行日 |
as_of_calendar | mode=off|soft|hard,exchange,snap_to_prev |
universe / horizon_eval | 组合内须一致 |
source_mode | live / mock / degraded |
data_source | 正式运行填 Pandadata |
factors[] | 见下 |
crowding / smart_money | 桥接路径与开关 |
thresholds / rules_version | 规则阈值与版本 |
factors:
- factor_id: F001
name: momentum_20
score_report_path: deps/F001_score.json # 推荐
decay_report_path: deps/F001_decay.json
exposure_symbols: ["600519.SH"]
优先级:显式报告路径 → 信号旁路 *_score.json / *_decay.json → mock 合成(仅自测)。
| 命令 | 作用 |
|---|---|
python -m runtime --mock | mock 全链路 |
python -m runtime --portfolio config/portfolio.yaml --live | 正式研究态 |
python -m runtime self-test | 单测 + 样例刷新 |
python -m runtime validate <run_dir> | 校验产物 |
python -m runtime publish --from <run_dir> | 写发布快照 |
python -m runtime backtest --from-panel-store | 用 live 累积面板回测 |
python -m runtime backtest --metrics-panel a.csv [--fwd-panel b.csv] | 历史面板回测 |
python -m runtime backtest --allow-simulate | 模拟回测(自测) |
python -m runtime clean | 清理 reports/runtime_out/ |
回测必须三选一(禁止静默猜源)。仅 live/degraded 会把 health_matrix 追加到 data/panels/;mock 不入库。无 --fwd-panel 时默认用下一期 rank_ic 近似后验。
推荐流程:准备 evaluate/decay(及可选 crowding / smart-money)→ 填 portfolio.yaml → --live → 读报告 → validate → 可选 publish / backtest。
研究态:reports/runtime_out/<run_id>/
| 文件 | 用途 |
|---|---|
runtime_report.md | 主报告 |
health_matrix.csv | 健康度表 |
crowding_alerts.json | 拥挤警示 |
retire_rebuild_candidates.csv | 动作候选 |
ic_decay_curves.json + charts/ | 衰减曲线 |
agent_snapshot.json / handoff_card.md | 下游交接 |
run_summary.json / validation.json | 摘要与门禁 |
deps/ | 依赖产物索引 |
常见 signal:keep / watch / deweight / retire_candidate / rebuild_candidate / insufficient(看 gap_notes)。原因码见 references/decision-rules.md。
发布:python -m runtime publish --from ... → reports/publish/<as_of>/<data_version>/。
回测:reports/backtest/<run_id>/(l4.html、backtest_report.md、bucket_stats.csv、accuracy.json 等)。也可 python scripts/export_l4_backtest.py --run-dir ...。这是守卫规则有效性,不是 Alpha 生产全套 IC 回测。
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.
alpha-portfolio-guardian@quantskills is listed by quantskills/registry — review the source before installing
npx claudepluginhub quantskills/registry --plugin alpha-portfolio-guardianPlugins from other owners that cover similar ground