Guide · Agent skill
How to use the Portfolio Risk Metrics agent skill
Updated · written with AI from the project's own documentation and checked against our catalogue data
The risk-metrics-calculation skill is an agent skill for measuring portfolio risk. Once it is installed, an agent that supports skills can explain and calculate Value at Risk (VaR), Expected Shortfall (CVaR), Sharpe and Sortino ratios, and drawdown analysis. This guide is for readers who have not used agent skills before, and it covers installation, how to ask for help, examples, requirements, and safety limits.
Quick start
- 1Download the ZIP. Download the risk-metrics-calculation skill as a ZIP file from this page.
- 2Unzip into a skills folder. Unzip it into ~/.claude/skills/ for personal use, or into .claude/skills/ inside a project.
- 3Or upload in the Claude apps. In the Claude apps, go to Settings → Capabilities → Skills and upload the ZIP.
- 4Ask a risk question. Describe the task in plain language, such as measuring portfolio risk or explaining VaR and CVaR.
- 5Check the assumptions. Confirm the return frequency, lookback, confidence level and distribution assumptions in the answer.
- 6Verify before acting. Review outputs independently before using them for trading, sizing or compliance.
What the skill makes the agent do
The skill gives the agent a working knowledge of common portfolio risk measures. Its description says it calculates VaR, CVaR, Sharpe, Sortino, and drawdown analysis, and it is meant for measuring portfolio risk, implementing risk limits, or building risk monitoring systems.
The skill also covers how these measures are used. It groups metrics into volatility (standard deviation, beta), tail risk (VaR, CVaR), drawdown (max drawdown, Calmar), and risk-adjusted performance (Sharpe, Sortino), and it lists time horizons from intraday to annual.
- Tail risk: VaR and CVaR for extreme losses
- Drawdown: max drawdown and Calmar for capital preservation
- Risk-adjusted returns: Sharpe and Sortino
- Cautions: do not rely on VaR alone, do not assume normal returns, use enough historical data
Install the skill from the ZIP download
Download the skill as a ZIP file from the page where you found this guide. Then unzip it into one of these locations, depending on how you want to use it:
- Personal skills folder: ~/.claude/skills/ (available across your projects)
- Project skills folder: .claude/skills/ inside a specific project
- Claude apps: upload the ZIP under Settings → Capabilities → Skills
Trigger the skill with natural requests
You do not need a special command. Describe the task in plain language that matches the skill's purpose: measuring portfolio risk, setting risk limits, or building a risk monitoring system. The skill is also tied to requests about risk-adjusted returns and position sizing.
The skill's files include a reference document with worked examples. The skill points the agent to that file when the main guidance is not enough, so asking for a detailed calculation can bring in those examples.
- "Explain the difference between VaR and CVaR for my portfolio returns."
- "Help me structure a drawdown analysis for this equity curve."
- "Show how to calculate the Sortino ratio with a 0% downside threshold."
- "What lookback period should I use for a 99% daily VaR?"
What you need before you start
The source lists no required software, packages, or accounts. The skill does not run scripts and does not use the network. The example code in the reference file uses Python libraries such as numpy, pandas and scipy, so you will need those if you want to run that code yourself.
- Historical return data, if you want calculations on your own portfolio
- Python with numpy, pandas and scipy, if you plan to run the reference code
Safety notes: scripts and network
The skill runs no scripts and uses no network access, according to its listing. It is written guidance and example code for the agent to use. It is not a validated risk system, and its outputs should be checked independently before anyone acts on them.
- Do not use outputs alone for live trading or position-sizing decisions.
- Do not rely on the skill for regulatory or compliance reporting. It mentions this use but does not specify rules, so an expert must verify any output.
- Check every calculation against your own data and method.
Tips for better results
Give the agent the details that change the answer: the return frequency, the lookback window, the confidence level, and any risk-free rate. The skill's own guidance says to document assumptions such as distribution and lookback.
- Use several metrics together, since no single metric captures all risk.
- Use CVaR alongside VaR, because VaR alone underestimates tail risk.
- Use rolling analysis, because risk changes over time.
- Avoid short lookbacks, which can miss regime changes.
- Include transaction costs, which affect realized risk.
What people use it for
- Explaining how VaR and CVaR differ for a set of portfolio returns
- Structuring a drawdown analysis for an equity curve
- Helping a developer plan risk-limit checks for a trading tool
- Teaching students how Sharpe and Sortino ratios are defined and used
- Outlining a risk dashboard with volatility, tail risk and drawdown metrics
Frequently asked questions
How do I install the risk-metrics-calculation skill?
Download the skill ZIP from this page and unzip it into ~/.claude/skills/ for personal use, or into .claude/skills/ in a project. In the Claude apps, you can instead upload the ZIP under Settings → Capabilities → Skills.
What do I need to run the risk-metrics-calculation skill?
The listing lists no requirements. The skill runs no scripts and uses no network. Its reference code uses Python with numpy, pandas and scipy if you want to run it yourself.
Is the risk-metrics-calculation skill free?
The skill is published under the MIT licence, as shown on its listing. Check the licence file in the source repository for the full terms.
Can I use this skill for regulatory reporting?
No, not on its own. The skill mentions regulatory reporting but does not specify the rules, so any output needs expert verification before use in compliance work.
Can I use it to decide position sizes for live trading?
The skill is general guidance and not a validated risk system. Do not make live trading or position-sizing decisions from its outputs without independent review.
Why does the skill say not to rely on VaR alone?
The skill's guidance says VaR underestimates tail risk, so it recommends using CVaR alongside VaR and several other metrics.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
This skill suits analysts and portfolio managers who want help structuring risk calculations, developers building risk dashboards or limit checks, and students learning how VaR, CVaR and Sharpe are defined. It is not suited to live trading or position-sizing decisions without independent review, or to regulatory reporting, where outputs need expert checking.
Download the skill