portfolio-risk-manager

portfolio-risk-manager is a skill for Claude Code, Codex from seaworld008/Commonly-used-high-value-skills. It costs 34 tokens per session (2,165 once invoked), scanned A, original, MIT.

A portfolio risk analysis guide for reviewing investments as a group. It examines concentration, exposure, beta, volatility, tracking error, and other ways a portfolio can become unbalanced.

In plain words
What is it for?
Use it before reallocating capital, during portfolio reviews, for position sizing, investor updates, and analysis after large market moves.
Why use it?
It turns a list of holdings into a view of where the portfolio may be overly dependent on one asset, sector, region, or market movement.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it before reallocating capital, during portfolio reviews, for position sizing, investor updates, and analysis after large market moves.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/seaworld008/commonly-used-high-value-skills/portfolio-risk-manager
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add seaworld008/Commonly-used-high-value-skills --skill portfolio-risk-manager
Clone the repo
git clone --depth 1 https://github.com/seaworld008/Commonly-used-high-value-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for portfolio-risk-manager

README.md
[![agentmods](https://agentmods.dev/badge/skills/seaworld008/commonly-used-high-value-skills/portfolio-risk-manager/github.svg)](https://agentmods.dev/skills/seaworld008/commonly-used-high-value-skills/portfolio-risk-manager)
Your own site
<a href="https://agentmods.dev/skills/seaworld008/commonly-used-high-value-skills/portfolio-risk-manager"><img src="https://agentmods.dev/badge/skills/seaworld008/commonly-used-high-value-skills/portfolio-risk-manager/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for portfolio-risk-manager

Your own site · 80×15
<a href="https://agentmods.dev/skills/seaworld008/commonly-used-high-value-skills/portfolio-risk-manager"><img src="https://agentmods.dev/badge/skills/seaworld008/commonly-used-high-value-skills/portfolio-risk-manager.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 34 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,165 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium MCP Rug Pull · line 26
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00034 $0.02165
Opus 5 $0.00017 $0.01082
Sonnet 5 $0.00007 $0.00433
Haiku 4.5 $0.00003 $0.00216

Measured 9d ago against content hash 907d765cddf3, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

portfolio-risk-manager scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/build_optimizer_inputs.py, scripts/portfolio_risk.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

openclaw-skills/portfolio-risk-manager/SKILL.md · 141 lines

How it starts

The opening of the file, as written. The whole thing — 141 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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

像专业的风险会议(Risk Meeting)一样汇总投资组合:分析集中度(Concentration)、敞口(Exposure)、贝塔(Beta)、波动率(Volatility),识别组合在哪些领域过度倾斜。本技能旨在将杂乱的持仓清单转化为具有前瞻性的风险视图,辅助投资经理在调仓前进行全方位的“健康体检”。

安装与前提条件

# 确保已安装投资组合分析与统计库
pip install pandas numpy pyportfolioopt scipy
# 准备持仓数据
npx clawhub install portfolio-risk-manager

触发条件 / When to Use

  • 每周 PM 评审 (Weekly PM Review):在每周一开盘前,对整个组合的风险暴露进行全量扫描。
  • 调仓前风险核查 (Pre-trade Sanity Check):在大幅增加某个标的或行业的权重前,评估其对组合整体风险的影响。
  • 致投资者信准备 (Investor Letter Prep):需要向投资者清晰地说明目前持仓的风险属性(如:低 Beta、高分红、区域倾斜)。
  • 仓位规模讨论 (Position Sizing):根据波动率逆向计算每个标的应占的最优权重。
  • 极端行情复盘:当市场发生剧烈波动时,快速计算组合的 VaR(在职风险值)并制定防御方案。

核心能力 / Core Capabilities

1. 集中度与多维敞口分析 (Exposure Analysis)

  • 操作步骤
    1. 统计前 10 大持仓的权重(Top 10 Weight)。
    2. 行业 (Sector)地区 (Region)市值 (Market Cap)风格 (Style) 进行穿透式汇总。
    3. 识别“非意图敞口”(Accidental Exposure),即由于多个标的同属一个子行业而导致的隐性集中风险。
  • 最佳实践:单一标的权重通常不应超过 10%,单一行业敞口不应超过 25%,除非该策略是高集中度的特定风格。

2. 系统性与特有风险测算 (Beta & Volatility)

  • 操作步骤
    1. 运行 scripts/portfolio_risk.py
    2. 计算加权贝塔(Weighted Beta):评估组合对大盘波动的敏感度。
    3. 拆解风险来源:区分 系统性风险 (Systematic Risk)特有风险 (Idiosyncratic Risk)
    4. 计算 跟踪误差 (Tracking Error):衡量组合相对于基准的偏离程度。
  • 最佳实践:在熊市环境下,重点关注 Beta 的漂移情况。

3. 相关性矩阵与多元化分析 (Correlation Analysis)

  • 操作步骤
    1. 计算所有持仓之间的相关性矩阵(Correlation Matrix)。
    2. 识别“假多元化”:表面上买了 20 只股票,但如果它们的相关系数都在 0.8 以上,实质上是一个高风险头寸。
  • 最佳实践:通过寻找相关性低于 0.3 的资产来优化夏普比率。

4. 压力测试与情景模拟 (Stress Testing)

  • 操作步骤
    1. 模拟极端情景:如“利率上升 100bp”、“纳斯达克回调 10%”、“原油价格翻倍”。
    2. 预估组合在这些情景下的最大跌幅。
    3. 输出“VaR (Value at Risk)”报告。

常用命令/模板 / Common Patterns

投资组合 JSON 模板 (Portfolio JSON)

{
  "portfolio_name": "Growth_Strategy_2026",
  "base_currency": "USD",
  "holdings": [
    { "ticker": "NVDA", "weight": 0.12, "beta": 1.65, "sector": "Semiconductors" },
    { "ticker": "MSFT", "weight": 0.10, "beta": 1.15, "sector": "Software" },
    { "ticker": "JPM", "weight": 0.08, "beta": 0.95, "sector": "Finance" }
  ],
  "benchmark": "S&P 500"
}

Read the full file on GitHub · 141 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 141 lines · 34 tokens per session scan A 907d765cddf3

Subscribe to this mod's changes

portfolio-risk-manager is a skill published in the GitHub repository seaworld008/Commonly-used-high-value-skills (70 stars, last pushed 5d ago), licensed MIT. It adds 34 tokens to every session and 2,165 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.