Risk Metrics Calculation
Seth HobsonCommunityCreated by Seth Hobson
- Skill
- Tool integration
- Business and productivity
- MIT
- No issues found
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This skill provides a structured approach to measuring and monitoring financial portfolio risk. It covers a range of quantitative metrics, including volatility, tail risk, drawdown analysis, and risk-adjusted performance measures. Designed for portfolio managers and analysts, it emphasizes the importance of using multiple metrics to capture different dimensions of risk, such as extreme losses and capital preservation, while avoiding common pitfalls like assuming normal distributions or ignoring tail risk.
What it does
- Calculates volatility metrics like standard deviation and beta.
- Computes tail risk measures including historical, parametric, and Cornish-Fisher VaR.
- Determines Expected Shortfall (CVaR) to assess extreme loss potential.
- Performs drawdown analysis including maximum and average drawdown calculations.
- Provides risk-adjusted return metrics such as Sharpe and Sortino ratios.
- Offers guidance on time horizons and best practices for risk reporting.
When to use it
- When measuring overall portfolio risk exposure.
- When establishing and monitoring risk limits for trading strategies.
- When building automated risk dashboards for performance attribution.
- When performing regulatory or strategic risk reporting.
- When determining appropriate position sizes based on risk tolerance.
Advantages
- Encourages a multi-metric approach to avoid underestimating risk.
- Includes advanced tail risk metrics beyond standard VaR.
- Supports various time horizons from intraday to annual analysis.
- Provides clear best practices to avoid common financial modeling errors.
- Facilitates robust stress testing and historical analysis.
Usage examples
- “Calculate the 95% historical VaR and CVaR for my portfolio returns series.”
- The agent will process the returns data to output the specific VaR value and the corresponding Expected Shortfall, providing a clearer picture of potential tail losses.
- “What is the maximum drawdown and current drawdown duration for this asset?”
- The agent will analyze the cumulative returns to identify the peak-to-trough decline and the duration of the current drawdown period.
Install
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/wshobson/risk-metrics-calculation/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip risk-metrics-calculation.zip -d .agents/skills
Documentation by Seth Hobson
Risk Metrics Calculation
Comprehensive risk measurement toolkit for portfolio management, including Value at Risk, Expected Shortfall, and drawdown analysis.
When to Use This Skill
Measuring portfolio risk
Implementing risk limits
Building risk dashboards
Calculating risk-adjusted returns
Setting position sizes
Regulatory reporting
Core Concepts
1. Risk Metric Categories
| Category | Metrics | Use Case |
|---|---|---|
| Volatility | Std Dev, Beta | General risk |
| Tail Risk | VaR, CVaR | Extreme losses |
| Drawdown | Max DD, Calmar | Capital preservation |
| Risk-Adjusted | Sharpe, Sortino | Performance |
2. Time Horizons
Intraday: Minute/hourly VaR for day traders
Daily: Standard risk reporting
Weekly: Rebalancing decisions
Monthly: Performance attribution
Annual: Strategic allocationDetailed patterns and worked examples
Detailed pattern documentation lives in references/details.md. Read that file when the navigation tier above is insufficient.
Best Practices
Do's
Use multiple metrics - No single metric captures all risk
Consider tail risk - VaR isn't enough, use CVaR
Rolling analysis - Risk changes over time
Stress test - Historical and hypothetical
Document assumptions - Distribution, lookback, etc.
Don'ts
Don't rely on VaR alone - Underestimates tail risk
Don't assume normality - Returns are fat-tailed
Don't ignore correlation - Increases in stress
Don't use short lookbacks - Miss regime changes
Don't forget transaction costs - Affects realized risk
Files
- ATTRIBUTION.mdAdded by AutoGineer1012 B
- LICENSELicence file added by AutoGineer1.0 KiB
- SKILL.md2.0 KiB
- references/details.md16.5 KiB
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Security
No issues found by our static scan· No issues found
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Created by
- Seth Hobson
- Publisher
- Seth Hobson (Community)
- Source
- wshobson/agents · plugins/quantitative-trading/skills/risk-metrics-calculation · commit 4bde316
- Licence
- MIT License (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by Seth Hobson.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download risk-metrics-calculation.zip