agentsclimarketplace

Portfolio optimization

Skill nexaforgelab/a-share-investment-skill-pack/skills/09_portfolio/portfolio_optimization

在约束下优化组合权重,控制跟踪误差、集中度、换手和冲击成本。From its SKILL.md

Install
npx -y skills add nexaforgelab/a-share-investment-skill-pack --skill portfolio_optimization

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

4.7 KB, ~1.6k tokens by cl100k_base, as published. Nobody here has run it

组合优化 Skill

Skill ID

a_share.portfolio_optimization.v1

功能定位

在约束下优化组合权重,控制跟踪误差、集中度、换手和冲击成本。

适用场景

组合再平衡、风险预算调整。

必填输入

  • as_of_date: 分析截止日期,必须使用当时已公开可得数据。
  • object_type: stock / industry / portfolio / market / theme / factor
  • object_id: 股票代码、行业名称、组合ID、主题名称或因子名称。
  • investment_horizon: intraday / 1w / 1m / 3m_6m / 1y_3y
  • benchmark: 沪深300、中证500、中证1000、行业指数或自定义基准。
  • data_bundle: 已加载的数据清单、来源、时间戳和质量评分。

可选输入

  • portfolio_context: 当前持仓、成本、权重、产品约束。
  • risk_budget: 单票、行业、风格、流动性和回撤约束。
  • previous_thesis: 历史投资假设、上次评级、上次目标价。
  • manual_notes: 研究员补充信息或人工调研纪要。

依赖 Skill

  • portfolio_construction

通用执行流程

  1. 校验输入参数,确认 as_of_date、对象、投资期限、基准、股票池和组合约束。
  2. 检查依赖数据是否齐全,并调用或引用数据质量审计结果。
  3. 按本 Skill 的专业框架进行分析,不跳步,不省略反证。
  4. 对所有关键判断打分:事实强度、影响程度、可验证性、时效性、组合相关性。
  5. 生成结构化 JSON、Markdown 报告和审计日志。
  6. 给出下游建议:进入哪个 workflow、是否需要人工复核、何时再次更新。

本 Skill 专业步骤

  1. 设定目标函数:最大信息比率、最小波动、最大效用或约束收益。
  2. 纳入协方差矩阵、行业和风格暴露、交易成本。
  3. 输出优化权重、边际贡献、敏感性和不可行约束。

判断与打分框架

  • fact_strength: 事实强度,公告/财报/交易所数据最高,二手新闻和传闻最低。
  • impact_score: 对盈利、估值、现金流、风险偏好、组合风险的影响程度。
  • time_sensitivity: 信息有效期和是否需要盘中处理。
  • verification_score: 是否可被其他数据源交叉验证。
  • portfolio_relevance: 对当前组合、候选池、禁投池的影响程度。

标准输出

同时输出两种形态:

  1. result.json:供下游 Agent / workflow 读取;
  2. report.md:供投研人员阅读。

result.json 至少包含:

{
  "skill_id": "a_share.portfolio_optimization.v1",
  "run_id": "test_run_0001",
  "as_of_date": "2026-05-22",
  "object_type": "portfolio",
  "object_id": "demo_portfolio",
  "conclusion": "待生成,禁止作为投资建议直接执行",
  "confidence": 0.0,
  "evidence": [],
  "counter_evidence": [],
  "risks": [],
  "action_suggestion": "research_only",
  "required_followups": [],
  "human_review_required": true,
  "data_quality_score": 0.0,
  "audit_trail": []
}

报告结构

# 组合优化报告

## 1. 一句话结论
## 2. 核心证据
## 3. 关键数据与图表建议
## 4. 正方观点
## 5. 反方观点
## 6. 风险与证伪条件
## 7. 对估值/盈利/组合/交易的影响
## 8. 后续跟踪指标
## 9. 人工复核事项
## 10. 审计日志

强制约束

  • 不得把传闻、新闻标题、管理层口头表述当成确定事实;所有关键结论必须标注证据来源与时间戳。
  • 不得使用未来函数:财务数据、公告、研报、价格、指数成分必须以 as_of_date 当时已公开可得为准。
  • 不得绕过人工复核直接给出实盘下单指令;涉及买入、卖出、加仓、减仓、禁投、强制平仓的结论必须输出 human_review_required: true
  • 数据缺失、数据冲突、来源不可靠时,必须降低置信度,并列出不可验证项。
  • 对 ST、*ST、停牌、退市整理、重大违法、财务造假、流动性不足标的,必须优先触发风险检查。
  • 报告中必须同时给出正方观点、反方观点、证伪条件和后续跟踪指标。

下游流转

  • 若输出影响投资评级、仓位或禁投状态,必须传递给 investment_memoportfolio_risk_monitorcompliance_check
  • 若发现数据异常,必须回流给 data_quality_auditdata_conflict_resolution
  • 若发现投资假设变化,必须回流给 thesis_review

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Gives 0 of the 12 instructions most performance cost skills give in ~1.6k tokens

Counted across 803 of the 1,058 authors here whose files we hold, read 2026-08-07

  • Keep skill files under 500 lines or tokensin 82 of 803, across 16 files
  • Use imperative form in instructionsin 80 of 803, across 9 files
  • Draft assertions while test runs are in progressin 75 of 803, across 9 files
  • Create two to three realistic test promptsin 74 of 803, across 9 files
  • Write skill descriptions to be pushyin 72 of 803, across 7 files
  • Save test cases to evals JSONin 72 of 803, across 6 files
  • Ask questions about edge cases and input formatsin 72 of 803, across 7 files
  • Save timing data immediately when runs completein 70 of 803, across 5 files
  • Include all trigger conditions in the skill descriptionin 69 of 803, across 3 files
  • Launch all test runs in a single turn or simultaneouslyin 69 of 803, across 3 files
  • Capture intent before writing a skillin 67 of 803, across 1 file
  • Import directly instead of barrel filesin 52 of 803, across 15 files

Said here and by no other author read

  • validate input parameters and constraints
  • check dependent data completeness and data quality audit
  • follow the analytical framework without skipping steps
  • score all key judgments on five specified dimensions
  • set the objective function
  • include covariance matrix exposures and transaction costs

Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.

Keep looking

Skills are one crate of 326,851. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.