PlugWiki

risk-metrics-calculation Skill for Claude: What It Does and How to Install It

Helps your assistant calculate portfolio risk metrics such as VaR, CVaR, Sharpe, Sortino and drawdown.

Installs
11.2K
on skills.sh
Stars
42.1K
on GitHub
Files
1
besides SKILL.md
Updated
Oct 2026
last repo commit

SKILL.md groups metrics into four categories (volatility, tail risk, drawdown, risk-adjusted), lists five time horizons from intraday to annual, and gives do and don't rules, such as not relying on VaR alone and not assuming normal returns.

Its "When to Use" list covers measuring portfolio risk, risk limits, risk dashboards, risk-adjusted returns, position sizes and regulatory reporting. Four implementation patterns (core metrics, portfolio risk, rolling metrics, stress testing) and a quick reference sit in references/details.md as Python using numpy, pandas and scipy. It bundles no scripts.

Good for

  • Quant developers building risk dashboards
  • Analysts measuring portfolio risk
  • Teams setting risk limits and position sizes

Install risk-metrics-calculation

Claude Code

  1. 1

    Copy this prompt.

    Install the risk-metrics-calculation skill in Claude Code. Run this command:
    
    /plugin marketplace add wshobson/agents
    /plugin install quantitative-trading@claude-code-workflows
    
    Then check that it loaded and tell me how to use it.
  2. 2

    Paste it into Claude Code. It shows the change and asks before running it.

Pick one route. The plugin routes install the whole quantitative-trading plugin: 2 agents and 2 skills (counted from the plugin folder in the repo tree, which has no hooks or MCP config files). The skills-only routes install just this skill, with no agents or commands. The code samples use Python with numpy, pandas and scipy.

From the project README. Source.

What's in the skill

When it loads

Calculate portfolio risk metrics including VaR, CVaR, Sharpe, Sortino, and drawdown analysis. Use when measuring portfolio risk, implementing risk limits, or building risk monitoring systems.

Sections in SKILL.md

  1. When to Use This Skill
  2. Core Concepts
  3. 1. Risk Metric Categories
  4. 2. Time Horizons
  5. Detailed patterns and worked examples
  6. Best Practices
  7. Do's
  8. Don'ts

Key facts

License
MIT
Installs on skills.sh
11,203 (Nov 2, 2026)
Last repo commit
Oct 30, 2026

What it includes

  • Volatility, tail risk, drawdown and risk-adjusted metrics with their use cases

    Volatility, tail risk, drawdown and risk-adjusted metrics with their use cases.

    Risk metric categories

  • Intraday, daily, weekly, monthly and annual risk views

    Intraday, daily, weekly, monthly and annual risk views.

    Time horizons

  • Use several metrics, watch tail risk, run rolling analysis, stress test

    Use several metrics, watch tail risk, run rolling analysis, stress test and document assumptions.

    Best practices

  • A RiskMetrics class: volatility, beta, three VaR methods, CVaR, drawdowns, Sharpe

    A RiskMetrics class: volatility, beta, three VaR methods, CVaR, drawdowns, Sharpe, Sortino, Calmar, Omega and information ratio (in references/details.md)

    Pattern 1: Core risk metrics

  • A PortfolioRisk class: marginal and component risk, risk parity weights

    A PortfolioRisk class: marginal and component risk, risk parity weights, diversification ratio, tracking error (in references/details.md)

    Pattern 2: Portfolio risk

  • Rolling volatility, Sharpe, VaR, max drawdown, beta and a volatility regime classifier

    Rolling volatility, Sharpe, VaR, max drawdown, beta and a volatility regime classifier (in references/details.md)

    Pattern 3: Rolling risk metrics

  • Five historical crisis windows, hypothetical shocks and a Monte Carlo test

    Five historical crisis windows, hypothetical shocks and a Monte Carlo test (in references/details.md)

    Pattern 4: Stress testing

  • A short usage snippet that prints Sharpe, max drawdown and VaR

    A short usage snippet that prints Sharpe, max drawdown and VaR (in references/details.md)

    Quick reference

From the official docs

Questions

What does the risk-metrics-calculation skill do?

It gives the assistant a risk-measurement guide and Python classes for VaR, CVaR, Sharpe, Sortino, drawdown, portfolio risk, rolling metrics and stress tests.

How do I install risk-metrics-calculation?

Use the install box at the top of this page. For Claude Code it lists the plugin route (/plugin marketplace add wshobson/agents, then /plugin install quantitative-trading@claude-code-workflows) and two skills-only commands: npx skills add wshobson/agents --skill risk-metrics-calculation and gh skill install wshobson/agents risk-metrics-calculation (GitHub CLI 2.90 or later), which skip the plugin's agents and commands.

Does it need data feeds or an API key?

SKILL.md and references/details.md name no API key or data feed. The code computes metrics from a returns series you supply, using numpy, pandas and scipy, so you need those Python packages and your own return data.

Is it safe?

Its folder holds two Markdown files and no scripts. The Python in references/details.md only calculates metrics from data you pass in; we found no broker, exchange or network code in the two files. Treat the numbers as only as good as your inputs, because the skill itself says to document assumptions such as distribution and lookback.

Is this financial advice?

No. This is our note, not something SKILL.md says: it is a guide to coding risk calculations, so VaR, Sharpe and the stress-test results depend on your data and assumptions and are not a recommendation to buy, sell or size a position.

Should I install the whole quantitative-trading plugin?

Only if you want the rest. The README documents a plugin route for Claude Code and Codex. The quantitative-trading plugin folder holds 2 agents and 2 skills, and its repo tree shows no hooks or MCP config files. The install box offers the plugin and the skills-only commands.

Does it work in Codex or Cursor?

The README documents Codex CLI as a plugin route and a skills-only install. For Cursor it points to a plugin marketplace and its setup docs, which we did not check, so follow the README there.

Is this skill from Anthropic?

No. It is in wshobson/agents, a community collection. The skill sits in the quantitative-trading plugin there, alongside and backtesting-frameworks.

Information

updated Nov 2, 2026

Repository
wshobson/agents
Folder
plugins/quantitative-trading/skills/risk-metrics-calculation

wshobson/agentsskills.sh

Sources

Docs, issue trackers and discussions this page is built from.

Show all 5
  1. risk-metrics-calculation SKILL.md · github.com
  2. wshobson/agents README · github.com
  3. quantitative-trading plugin.json · github.com
  4. wshobson/agents marketplace.json · github.com
  5. details.md · github.com

Updated Nov 2, 2026.