Tushare Data
zillionare/zillionare
面向中文自然语言的 Tushare 数据研究技能。用于把“看看这只股票最近怎么样”“帮我查财报趋势”“最近哪个板块最强”“北向资金在买什么”“给我导出一份行情数据”这类请求,转成可执行的数据获取、清洗、对比、筛选、导出与简要分析流程。适用于 A 股、指数、ETF/基金、财务、估值、资金流、公告新闻、板块概念与宏观数据等研究场景。
A股量化组合优化。当用户说"组合优化"、"portfolio optimization"、"均值方差"、"风险平价"、"最优权重"、"Black-Litterman"、"最小方差"、"最大夏普"、"怎么分配权重"、"等风险贡献"时触发。基于现代投资组合理论,对给定标的池进行量化权重优化,支持均值方差/最小方差/风险平价/等权等多种方法,输出最优配置权重和有效前沿。支持研报风格(formal)和快…
$ npx skills add aifinlab/FinClaw --skill a-share-portfolio-optimize -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install aifinlab/FinClaw a-share-portfolio-optimize --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/aifinlab/FinClaw.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/a-share-portfolio-optimize .claude/skills/a-share-portfolio-optimize && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "a-share-portfolio-optimize" agent skill from https://github.com/aifinlab/FinClaw/tree/main/skills/a-share-portfolio-optimize into .claude/skills/a-share-portfolio-optimize/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "a-share-portfolio-optimize", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/aifinlab/FinClaw/tree/main/skills/a-share-portfolio-optimizeType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add aifinlab/FinClaw --skill a-share-portfolio-optimize -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install aifinlab/FinClaw a-share-portfolio-optimize --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/aifinlab/FinClaw.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/a-share-portfolio-optimize .agents/skills/a-share-portfolio-optimize && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "a-share-portfolio-optimize" agent skill from https://github.com/aifinlab/FinClaw/tree/main/skills/a-share-portfolio-optimize into .agents/skills/a-share-portfolio-optimize/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "a-share-portfolio-optimize", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add aifinlab/FinClaw --skill a-share-portfolio-optimize -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install aifinlab/FinClaw a-share-portfolio-optimize --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/aifinlab/FinClaw.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/a-share-portfolio-optimize .cursor/skills/a-share-portfolio-optimize && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "a-share-portfolio-optimize" agent skill from https://github.com/aifinlab/FinClaw/tree/main/skills/a-share-portfolio-optimize into .cursor/skills/a-share-portfolio-optimize/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "a-share-portfolio-optimize", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/aifinlab/FinClaw.git --path skills/a-share-portfolio-optimize--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add aifinlab/FinClaw --skill a-share-portfolio-optimize -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install aifinlab/FinClaw a-share-portfolio-optimize --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/aifinlab/FinClaw.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/a-share-portfolio-optimize .gemini/skills/a-share-portfolio-optimize && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "a-share-portfolio-optimize" agent skill from https://github.com/aifinlab/FinClaw/tree/main/skills/a-share-portfolio-optimize into .gemini/skills/a-share-portfolio-optimize/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "a-share-portfolio-optimize", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install aifinlab/FinClaw a-share-portfolio-optimizeInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add aifinlab/FinClaw --skill a-share-portfolio-optimize -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/aifinlab/FinClaw.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/a-share-portfolio-optimize .github/skills/a-share-portfolio-optimize && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "a-share-portfolio-optimize" agent skill from https://github.com/aifinlab/FinClaw/tree/main/skills/a-share-portfolio-optimize into .github/skills/a-share-portfolio-optimize/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "a-share-portfolio-optimize", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add aifinlab/FinClaw --skill a-share-portfolio-optimize -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install aifinlab/FinClaw a-share-portfolio-optimize --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/aifinlab/FinClaw.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/a-share-portfolio-optimize .opencode/skills/a-share-portfolio-optimize && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "a-share-portfolio-optimize" agent skill from https://github.com/aifinlab/FinClaw/tree/main/skills/a-share-portfolio-optimize into .opencode/skills/a-share-portfolio-optimize/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "a-share-portfolio-optimize", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
a-share-portfolio-optimizeA股量化组合优化。当用户说"组合优化"、"portfolio optimization"、"均值方差"、"风险平价"、"最优权重"、"Black-Litterman"、"最小方差"、"最大夏普"、"怎么分配权重"、"等风险贡献"时触发。基于现代投资组合理论,对给定标的池进行量化权重优化,支持均值方差/最小方差/风险平价/等权等多种方法,输出最优配置权重和有效前沿。支持研报风格(formal)和快…
A Share Portfolio Optimize is an agent skill from aifinlab/FinClaw. A股量化组合优化。当用户说"组合优化"、"portfolio optimization"、"均值方差"、"风险平价"、"最优权重"、"Black-Litterman"、"最小方差"、"最大夏普"、"怎么分配权重"、"等风险贡献"时触发。基于现代投资组合理论,对给定标的池进行量化权重优化,支持均值方差/最小方差/风险平价/等权等多种方法,输出最优配置权重和有效前沿。支持研报风格(formal)和快速优化风格(brief)。
Its SKILL.md is about 820 tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including scripts and reference files (for example `references/portfolio-optimize-guide.md` and `scripts/portfolio_optimizer.py`).
It sits in Business, Finance & HR, covering Trading and backtesting. The licence is Apache-2.0.
4 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 9e62862. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Ships 1 file in scripts/ (Python), which the agent can run.
Shell commands in SKILL.md call:
pythonFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
A Share Portfolio Optimize loads about 820 tokens when it runs, and up to ~2.3k if it reads all its reference files. Until then it costs about 60 tokens; SKILL.md has 233 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.
The full file from aifinlab/FinClaw at commit 9e62862, republished under its Apache-2.0 licence (© aifinlab). 233 words, ~820 tokens.
.claude/skills/a-share-portfolio-optimize/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.SCRIPTS="$SKILLS_ROOT/cn-stock-data/scripts"
# 各资产日K线(用于计算收益率序列和协方差矩阵)
python "$SCRIPTS/cn_stock_data.py" kline --code [CODE] --freq daily --start [起始日期]
# 各资产最新行情
python "$SCRIPTS/cn_stock_data.py" quote --code [CODE1],[CODE2],[CODE3],...
# 无风险利率参照(十年期国债收益率,可手动指定,默认2.5%)
# 大盘基准(有效前沿对比)
python "$SCRIPTS/cn_stock_data.py" kline --code SH000300 --freq daily --start [起始日期]OPTIM="$SKILLS_ROOT/a-share-portfolio-optimize/scripts"
# 给定资产收益率矩阵,运行组合优化
python "$OPTIM/portfolio_optimizer.py" \
--returns_csv [收益率CSV路径] \
--method [min_var|max_sharpe|risk_parity|equal_weight] \
--rf 0.025 \
--long_only \
--max_weight 0.40Step 1: 输入资产池与约束
收集用户信息:
| 项目 | 说明 | 默认值 |
|---|---|---|
| 资产池 | 股票代码列表 | 用户提供 |
| 历史窗口 | 用于估计参数的历史区间 | 近1年(250交易日) |
| 优化方法 | min_var / max_sharpe / risk_parity / equal_weight / BL | max_sharpe |
| 无风险利率 | Rf | 2.5% |
| 约束条件 | 做多约束、个股上限、行业上限 | long_only, max 40% |
| 预期观点(BL) | 用户主观收益预期(仅BL模型需要) | - |
Step 2: 数据获取与收益率/风险估计
| 代码 | 名称 | 年化收益(%) | 年化波动(%) | 夏普比 | 最大回撤(%) |
|---|
相关系数矩阵热力图描述(哪些资产高度正相关、哪些负相关/低相关提供分散化收益)。
Step 3: 组合优化求解
根据用户选择的方法执行优化:
方法 A: 均值方差 / 最大夏普 (MVO - Max Sharpe)
方法 B: 最小方差 (Min Variance)
方法 C: 风险平价 (Risk Parity)
方法 D: 等权 (Equal Weight)
方法 E: Black-Litterman (可选)
调用 portfolio_optimizer.py 执行计算,输出最优权重。
Step 4: 结果展示与有效前沿
最优权重:
| 代码 | 名称 | 权重(%) | 风险贡献(%) |
|---|
组合预期指标:
| 指标 | 最优组合 | 等权组合 | 沪深300 |
|---|---|---|---|
| 预期年化收益(%) | |||
| 预期年化波动(%) | |||
| 夏普比 | |||
| 最大回撤(%) |
有效前沿描述:
Step 5: 输出
| 维度 | formal(量化研报风格) | brief(快速优化风格) |
|---|---|---|
| 篇幅 | 4-6 页 | 1-2 页 |
| 统计分析 | 完整收益/风险/相关性矩阵 | 关键指标摘要 |
| 优化方法 | 多方法对比 + 有效前沿 | 单一方法结果 |
| 权重输出 | 完整表格 + 风险贡献分解 | 权重饼图描述 |
| 敏感性 | 参数敏感性分析 | 不含 |
| 理论说明 | 含模型原理简述 | 不含 |
| 免责声明 | 需要 | 不需要 |
© aifinlab, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 2 other files (scripts, references) in skills/a-share-portfolio-optimize of aifinlab/FinClaw.
Open the folder on GitHubat commit 9e62862
A Share Portfolio Optimize next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| A Share Portfolio Optimize this skillaifinlab/FinClaw | 254 | — | ~820 | Automated safety check: Pass | Apache-2.0 | |
| Tushare Datazillionare/zillionare | 321 | 2 repos | ~2.3k | Automated safety check: Pass | None | |
| Tradingview MCPatilaahmettaner/tradingview-mcp | 5k | — | ~1.3k | Automated safety check: Pass | MIT | |
| Digital Oraclekomako-workshop/digital-oracle | 875 | — | ~5.9k | Automated safety check: Pass | MIT | |
| Polyclawchainstacklabs/polyclaw | 359 | 1 repos | ~2k | Automated safety check: Pass | Apache-2.0 | |
| Markdownfacioquo/stock-indicators-dotnet | 1.2k | — | ~812 | Automated safety check: Pass | Apache-2.0 |
zillionare/zillionare
面向中文自然语言的 Tushare 数据研究技能。用于把“看看这只股票最近怎么样”“帮我查财报趋势”“最近哪个板块最强”“北向资金在买什么”“给我导出一份行情数据”这类请求,转成可执行的数据获取、清洗、对比、筛选、导出与简要分析流程。适用于 A 股、指数、ETF/基金、财务、估值、资金流、公告新闻、板块概念与宏观数据等研究场景。
atilaahmettaner/tradingview-mcp
AI Trading Intelligence — live prices, 30+ technical indicators, backtesting (6 strategies), walk-forward overfitting detection, trade logs, equity curves, licensed news sentiment (Marketaux), and…
komako-workshop/digital-oracle
Answer prediction questions using market trading data, not opinions.
chainstacklabs/polyclaw
Trade on Polymarket via split + CLOB execution. An agent skill from chainstacklabs/polyclaw.
facioquo/stock-indicators-dotnet
Format and lint Markdown in this repository against GitHub Flavored Markdown and its markdownlint-cli2 configuration — headers, lists, code fences, callouts (VitePress containers on docs-site pages…
MobiusQuant/OpenMobius-skill
Provides multi-school trading Q&A, chart/OHLCV analysis, annotation, and fresh-market workflows covering ICT/SMC, ChanLun, Wyckoff, Price Action, Order Flow, VSA, and Elliott Wave.
aifinlab/FinClaw
A skill your agent uses when the user asks for help with corporate credit due diligence, enterprise credit investigation, pre-loan review, borrower analysis, document collection, management…
aifinlab/FinClaw
A skill your agent uses when you need a bank corporate-risk monitoring assistant for enterprise litigation/penalty/enforcement scanning (处罚/诉讼/被执行/失信等).
aifinlab/FinClaw
A skill your agent uses when you need a bank corporate client operating-volatility monitoring assistant (经营监测/指标波动/预警解释).
aifinlab/FinClaw
A skill your agent uses when you need a bank post-loan visit follow-up assistant to turn visit notes/materials into a structured memo (摘要/关键更新/风险观察/用途核验/行动项).
aifinlab/FinClaw
A skill your agent uses when you need a bank corporate credit issue-list assistant (问题清单/补件清单/催办台账).
aifinlab/FinClaw
A skill your agent uses when you need a bank corporate credit approval-opinion drafting assistant (审批意见/条款建议/有条件同意).
Categories
A股量化组合优化。当用户说"组合优化"、"portfolio optimization"、"均值方差"、"风险平价"、"最优权重"、"Black-Litterman"、"最小方差"、"最大夏普"、"怎么分配权重"、"等风险贡献"时触发。基于现代投资组合理论,对给定标的池进行量化权重优化,支持均值方差/最小方差/风险平价/等权等多种方法,输出最优配置权重和有效前沿。支持研报风格(formal)和快…. A Share Portfolio Optimize is an agent skill from aifinlab/FinClaw.
A Share Portfolio Optimize fits situations like: tasks that involve Trading and backtesting.
Run `npx skills add aifinlab/FinClaw --skill a-share-portfolio-optimize -a claude-code`. Or copy the skill folder (skills/a-share-portfolio-optimize in aifinlab/FinClaw) into .claude/skills/a-share-portfolio-optimize in your project. Claude Code loads it when a task matches its description.
Run `npx skills add aifinlab/FinClaw --skill a-share-portfolio-optimize -a codex`. Or copy the skill folder (skills/a-share-portfolio-optimize in aifinlab/FinClaw) into .agents/skills/a-share-portfolio-optimize in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add aifinlab/FinClaw --skill a-share-portfolio-optimize -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/a-share-portfolio-optimize, .gemini/skills/a-share-portfolio-optimize, .github/skills/a-share-portfolio-optimize and .opencode/skills/a-share-portfolio-optimize in your project.
Going by SKILL.md and its folder, A Share Portfolio Optimize needs Python for the scripts in its folder and the command-line tools its instructions call (python). Our summary lists: Python 3.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.
A Share Portfolio Optimize is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 820 tokens (SKILL.md is roughly 3.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.5k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with A Share Portfolio Optimize: Tushare Data (zillionare/zillionare, 321 stars), Tradingview MCP (atilaahmettaner/tradingview-mcp, 5k stars), Digital Oracle (komako-workshop/digital-oracle, 875 stars) and Polyclaw (chainstacklabs/polyclaw, 359 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
aifinlab (a GitHub user) maintains it in aifinlab/FinClaw, which has 254 GitHub stars. The repository holds 74 skills in this directory. The repository was last updated on May 13, 2026.
Source: aifinlab/FinClaw on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.