Agent skill

Portfolio Risk

by rongxinzy in rongxinzy/RongxinAI

投资组合风险管理工具。将投资论点转化为可执行的仓位管理方案:合理的仓位大小、对冲策略、风险暴露管理和监控规则. An agent skill from rongxinzy/RongxinAI.

AGPL-3.0Auto-check passed

Install Portfolio Risk

skills CLI
$ npx skills add rongxinzy/RongxinAI --skill portfolio-risk -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install rongxinzy/RongxinAI portfolio-risk --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/rongxinzy/RongxinAI.git skills-src && mkdir -p .claude/skills && cp -r skills-src/SKILLs/zhiyuan-expert-manager/presets/equity-research/skills/portfolio-risk .claude/skills/portfolio-risk && rm -rf skills-src

Use ~/.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/

Facts

Skill name
portfolio-risk
GitHub stars
154
Used in
1 other repo
Token cost
~623 tokens
SKILL.md length
164 words
Files
1
Skills in repo
94
Repo updated
First seen
Licence
AGPL-3.0

At a glance

投资组合风险管理工具。将投资论点转化为可执行的仓位管理方案:合理的仓位大小、对冲策略、风险暴露管理和监控规则. An agent skill from rongxinzy/RongxinAI.

  • Works in 6 steps: :投资论点确认 → :仓位大小(Position Sizing) → :对冲评估(如适用) → …
  • SKILL.md covers 功能说明, 核心原则, 工作流 and 输出格式, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Portfolio Risk is an agent skill from rongxinzy/RongxinAI. 投资组合风险管理工具。将投资论点转化为可执行的仓位管理方案:合理的仓位大小、对冲策略、风险暴露管理和监控规则。 触发词:仓位管理、position sizing、组合风险、portfolio risk、对冲策略、hedge、风险管理、加减仓、止损规则、风险控制

Its SKILL.md is about 620 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: An all-in-one local AI Agent workspace with a fully self-developed stack. The licence is AGPL-3.0.

Example prompts

  • “/portfolio-risk”

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. :投资论点确认
  2. :仓位大小(Position Sizing)
  3. :对冲评估(如适用)
  4. :风险暴露总结
  5. :监控规则
  6. :定期复盘计划

What it can do on your machine

Read from SKILL.md and the folder at commit 9c64865. It shows what the files ask for, not the result of running them.

  • Tool permissions

    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.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Portfolio Risk loads about 623 tokens when it runs. Until then it costs about 36 tokens; SKILL.md has 164 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~36
When it runs · the whole SKILL.md, loaded when a task matches
~623

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.

Safety

Auto-check passed

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); files beside SKILL.md are not scanned.

SKILL.md

The full file from rongxinzy/RongxinAI at commit 9c64865, republished under its AGPL-3.0 licence (© rongxinzy). 164 words, ~623 tokens.

Download SKILL.mdSave it as .claude/skills/portfolio-risk/SKILL.md (or your agent's skills folder).
name
portfolio-risk
description
投资组合风险管理工具。将投资论点转化为可执行的仓位管理方案:合理的仓位大小、对冲策略、风险暴露管理和监控规则。 触发词:仓位管理、position sizing、组合风险、portfolio risk、对冲策略、hedge、风险管理、加减仓、止损规则、风险控制

投资组合风险管理(Portfolio Risk)

功能说明

将投资论点和交易建议转化为完整的风险管理方案。核心目标:确定合适的仓位大小、设计适当的对冲(如需要)、明确保留的风险敞口,以及制定持续的监控和调整规则。

核心原则

  1. 仓位大小由最紧约束决定:流动性、波动率、集中度、止损预算等约束中,取最严的那个
  2. 对冲和仓位不独立:对冲改变了有效敞口,须综合考虑
  3. 规则先于情绪:在冷静时制定规则,在波动时执行规则
  4. Alpha vs 非预期风险:识别你有意承担的风险(alpha 来源)和无意承担的风险(需要对冲/规避)

工作流

Phase 1:投资论点确认
  1. 确认底层投资论点和方向(来自 long-short-pitch 或其他分析)
  2. 明确预期持有期限
  3. 确认信心水平和证据完备度
  4. 识别 alpha 来源:你赚钱是因为什么风险暴露?
Phase 2:仓位大小(Position Sizing)
约束检查清单
约束类型具体限制隐含最大仓位
止损预算单笔最大亏损 ≤ 组合 X%仓位 = 预算 / 预期最大跌幅
波动率单仓位贡献波动 ≤ X%根据个股波动率反推
流动性退出时间 ≤ X 天仓位 ≤ X天 × 日均成交 × 参与率
集中度单仓位 ≤ 组合 X%硬上限
相关性同类敞口合计 ≤ X%考虑已有相关仓位
最终仓位 = min(各约束隐含上限)
Phase 3:对冲评估(如适用)
  1. 需要对冲什么:
    • Beta / 系统性风险
    • 行业 / 因子风险
    • 事件尾部风险
    • 外汇风险
  2. 对冲工具选择:
    • 行业 ETF 做空
    • 指数期货
    • 期权保护(Put 买入 / Collar)
    • 配对交易(做空同行业弱势标的)
  3. 对冲成本与收益:
    • 对冲成本 / Carry
    • 保护程度
    • 对 Alpha 的影响(是否过度对冲丢失收益)
  4. 不对冲的替代方案:
    • 缩小仓位达到同等风险
    • 成本对比
Phase 4:风险暴露总结
有意保留的敞口(Alpha来源):
• [描述你有意承担的风险]

已对冲/规避的敞口:
• [描述已对冲的风险]

残余/未对冲的敞口:
• [描述仍然承担但未对冲的风险及原因]
Phase 5:监控规则

制定明确的"如果X发生,则执行Y"规则:

触发条件行动优先级
股价跌破 ¥XX(止损)减仓至 X% 或清仓强制
论点证伪条件触发3 日内清仓强制
目标价达到减仓至 X%纪律
波动率突然放大 >X%审视仓位是否过大审视
流动性恶化提前启动退出审视
催化剂落地且正面可加仓至 X%机会
估值重新达到吸引力可回补至 X%机会
对冲到期/失效评估续作或裸持纪律
Phase 6:定期复盘计划
  • 每 [周/月] 检查一次论点是否仍然成立
  • 业绩发布后 24 小时内更新评估
  • 仓位超过 X% 时增加监控频率

输出格式

风险管理方案总结
═══════════════════════════════════════
风险管理方案 | [标的名称] ([代码])
方向: [Long/Short]
日期: YYYY-MM-DD
═══════════════════════════════════════

## 仓位建议
- 建议仓位: 组合的 X%
- 约束性因素: [最紧约束是什么]
- 入场方式: [一次/分批] 在 [价格区间]
- 预期持有期: X 个月

## 对冲方案
- 对冲工具: [具体描述]
- 对冲成本: 年化 X%
- 保护程度: 下行 X% 以上得到保护
- 有效敞口: 仓位 X% - 对冲后 = 净敞口 X%

## 风险回报
- 目标收益: +XX%(X 个月)
- 最大预期亏损: -XX%(止损触发)
- 风险回报比: X:1
- 概率加权期望: +XX%

## 监控规则
[按上述表格列出]

## 退出计划
- 止盈: [条件和目标]
- 止损: [条件和水平]
- 时间止损: [如果 X 个月内论点未兑现]
═══════════════════════════════════════

注意事项

  • 仓位大小是风险管理的第一道防线,比对冲更重要
  • "不对冲 + 小仓位"往往优于"大仓位 + 昂贵对冲"
  • 对冲可能引入新的风险(基差风险、保证金风险)
  • 监控规则必须在建仓前制定,不是事后再想
  • 止损是纪律问题,不是预测问题——不需要论证"会不会跌到止损"
  • 对冲不能消除所有风险,只能改变风险的形态和成本
  • 流动性是非线性的:正常时期的流动性不代表压力时期
  • 本工具输出研究参考,不构成个人投资建议

© rongxinzy, AGPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in SKILLs/zhiyuan-expert-manager/presets/equity-research/skills/portfolio-risk of rongxinzy/RongxinAI.

Open the folder on GitHubat commit 9c64865

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in rongxinzy/RongxinAI, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Portfolio Risk 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.

Portfolio Risk compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Portfolio Risk this skillrongxinzy/RongxinAI1541 repos~623Automated safety check: PassAGPL-3.0
Portfolio Risk Metricswshobson/agents40k12 repos~502Automated safety check: PassMIT
Trader Riskruvnet/ruflo74k—~358Automated safety check: NotesMIT
Portfolioanthropics/claude-for-legal9.6k3 repos~5.3kAutomated safety check: PassApache-2.0
Trader Portfolioruvnet/ruflo74k—~475Automated safety check: NotesMIT
Positioning Ideasphuryn/pm-skills27k—~751Automated safety check: PassMIT

Similar skills

  • Portfolio Risk Metrics

    wshobson/agents

    Covers portfolio risk measurement with VaR, CVaR, Sharpe, Sortino and drawdown, plus guidance on limits, stress tests and tail risk.

    40k GitHub starsUsed in 12 repos~502 tokens
    Business, Finance & HRAuto-check passed
  • Trader Risk

    ruvnet/ruflo

    Assess portfolio risk using npx neural-trader — VaR, CVaR, Sharpe, position sizing, circuit breaker status

    74k GitHub stars~358 tokensUpdated yesterday
    Auto-check: notes
  • Portfolio

    anthropics/claude-for-legal

    Official

    Track the IP portfolio — registrations, renewals, maintenance fees, and use declarations.

    9.6k GitHub starsUsed in 3 repos~5.3k tokens
    Legal & ComplianceAuto-check passed
  • Trader Portfolio

    ruvnet/ruflo

    Optimize portfolio allocation using npx neural-trader mean-variance engine with risk constraints and rebalancing plan

    74k GitHub stars~475 tokensUpdated yesterday
    Auto-check: notes
  • Positioning Ideas

    phuryn/pm-skills

    Brainstorm product positioning ideas differentiated from competitors.

    27k GitHub stars~751 tokensUpdated 2 days ago
    Marketing & SEOAuto-check passed
  • Measures portfolio and backtest risk with VaR, CVaR, maximum drawdown, Monte Carlo simulation, tail modeling and stress tests, using one tested risk module.

    35k GitHub stars~3.8k tokensUpdated yesterday
    Business, Finance & HRAuto-check passed

More from rongxinzy/RongxinAI

All 94 skills in this repo
  • SaaS Metrics Coach

    rongxinzy/RongxinAI

    SaaS financial health advisor. An agent skill from rongxinzy/RongxinAI.

    154 GitHub starsUsed in 2 repos~1.3k tokens
    Auto-check passed
  • Churn Prevention

    rongxinzy/RongxinAI

    Reduce voluntary and involuntary churn through cancel flow design, save offers, exit surveys, and dunning sequences.

    154 GitHub starsUsed in 3 repos~2.6k tokens
    Auto-check passed
  • Presentation Studio

    rongxinzy/RongxinAI

    The only skill for creating a new PowerPoint deck. An agent skill from rongxinzy/RongxinAI.

    154 GitHub stars~2.1k tokensUpdated yesterday
    Auto-check passed
  • Zhiyuan Expert Manager

    rongxinzy/RongxinAI

    ZhiYuan Agent expert package lifecycle manager for the pi engine.

    154 GitHub stars~1.9k tokensUpdated yesterday
    Auto-check passed
  • Ziwei Doushu

    rongxinzy/RongxinAI

    Professional Ziwei Doushu consultation skill with an offline calculation engine.

    154 GitHub stars~746 tokensUpdated yesterday
    Auto-check passed
  • Lark Mail

    rongxinzy/RongxinAI

    飞书邮箱:Use when user mentions 起草邮件、写邮件、草稿、发送/回复/转发邮件、查阅邮件、看邮件、搜索邮件、邮件文件夹、邮件标签、邮件联系人、监听新邮件、邮件收信规则等;use for mail/email intent only.

    154 GitHub starsUsed in 3 repos~4.1k tokens
    Auto-check: warnings

Questions about Portfolio Risk

What does Portfolio Risk do?

投资组合风险管理工具。将投资论点转化为可执行的仓位管理方案:合理的仓位大小、对冲策略、风险暴露管理和监控规则. An agent skill from rongxinzy/RongxinAI. Portfolio Risk is an agent skill from rongxinzy/RongxinAI.

How do I install Portfolio Risk in Claude Code?

Run `npx skills add rongxinzy/RongxinAI --skill portfolio-risk -a claude-code`. Or copy the skill folder (SKILLs/zhiyuan-expert-manager/presets/equity-research/skills/portfolio-risk in rongxinzy/RongxinAI) into .claude/skills/portfolio-risk in your project. Claude Code loads it when a task matches its description.

How do I install Portfolio Risk in Codex?

Run `npx skills add rongxinzy/RongxinAI --skill portfolio-risk -a codex`. Or copy the skill folder (SKILLs/zhiyuan-expert-manager/presets/equity-research/skills/portfolio-risk in rongxinzy/RongxinAI) into .agents/skills/portfolio-risk in your project. Codex loads it when a task matches its description.

Can I use Portfolio Risk in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add rongxinzy/RongxinAI --skill portfolio-risk -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/portfolio-risk, .gemini/skills/portfolio-risk, .github/skills/portfolio-risk and .opencode/skills/portfolio-risk in your project.

What does Portfolio Risk need to run?

SKILL.md names no scripts, command-line tools or credentials: Portfolio Risk is instructions for the agent only.

Does Portfolio Risk access the network?

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.

Is Portfolio Risk safe to install?

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. Review the folder before installing.

What licence does Portfolio Risk use?

Portfolio Risk is published under the AGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Portfolio Risk use?

About 623 tokens (SKILL.md is roughly 2.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Portfolio Risk?

Skills that share tags, products or a category with Portfolio Risk: Portfolio Risk Metrics (wshobson/agents, 40k stars), Trader Risk (ruvnet/ruflo, 74k stars), Portfolio (anthropics/claude-for-legal, 9.6k stars) and Trader Portfolio (ruvnet/ruflo, 74k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Portfolio Risk?

rongxinzy (a GitHub organization) maintains it in rongxinzy/RongxinAI, which has 154 GitHub stars. The repository holds 94 skills in this directory. The repository was last updated on October 10, 2026.

Source: rongxinzy/RongxinAI on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.