A Share Portfolio Optimize

v1.0.0

A股量化组合优化。当用户说"组合优化"、"portfolio optimization"、"均值方差"、"风险平价"、"最优权重"、"Black-Litterman"、"最小方差"、"最大夏普"、"怎么分配权重"、"等风险贡献"时触发。基于现代投资组合理论,对给定标的池进行量化权重优化,支持均值方差/最小方差/风...

0· 68·0 current·0 all-time
MIT-0
Download zip
LicenseMIT-0 · Free to use, modify, and redistribute. No attribution required.
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
The name/description describe portfolio optimization and the repository contains a portfolio_optimizer.py implementing MVO, min-variance, risk-parity, equal-weight and Black‑Litterman — all coherent with the stated purpose. The SKILL.md references fetching market data via a cn-stock-data helper script, which is a plausible data dependency for this skill.
Instruction Scope
SKILL.md provides concrete commands to fetch K‑line/quote data (via cn_stock_data.py) and to run portfolio_optimizer.py on a returns CSV. The instructions do not ask the agent to read unrelated system files, environment secrets, or to transmit outputs to unexpected external endpoints. They do assume a separate data‑fetching script (cn-stock-data) is available.
Install Mechanism
There is no install spec (instruction-only with included script), which avoids downloading arbitrary remote code. However the Python script imports scipy, numpy and pandas — these runtime dependencies are not declared in SKILL.md/metadata. You should ensure the runtime environment provides those packages.
Credentials
The skill requests no environment variables, no credentials, and no config paths. There are no hidden secret usages in the provided code or instructions.
Persistence & Privilege
always:false and default invocation rules; the skill does not request permanent system privileges or modify other skills. It only reads input CSVs and writes results; nothing indicates it alters agent/system configuration.
Assessment
This skill appears to do exactly what it claims: offline portfolio optimization using historical returns. Before installing/running: (1) ensure Python dependencies (numpy, pandas, scipy) are available; the package list is not declared in the metadata; (2) confirm you have the returns CSV or the referenced cn-stock-data helper — review that helper script if you will let the skill fetch market data (it may perform network requests); (3) avoid supplying sensitive credentials or private files unless you understand where outputs will be stored/transmitted; (4) be aware Black‑Litterman requires user views (subjective inputs) and that historical‑data based optimizations have well‑known estimation risks — treat outputs as advisory and check constraints (e.g., max_weight, long_only) before trading.

Like a lobster shell, security has layers — review code before you run it.

latestvk97837c1m9mbvm01nexsqjz34x83v0n1

License

MIT-0
Free to use, modify, and redistribute. No attribution required.

Comments