Risk Measurement and Stress Testing
HKUDS/Vibe-Trading
Measures portfolio and backtest risk with VaR, CVaR, maximum drawdown, Monte Carlo simulation, tail modeling and stress tests, using one tested risk module.
Covers portfolio risk measurement with VaR, CVaR, Sharpe, Sortino and drawdown, plus guidance on limits, stress tests and tail risk.
$ npx skills add wshobson/agents --skill risk-metrics-calculation -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install wshobson/agents risk-metrics-calculation --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/wshobson/agents.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/quantitative-trading/skills/risk-metrics-calculation .claude/skills/risk-metrics-calculation && rm -rf skills-srcUse ~/.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/
Install the "risk-metrics-calculation" agent skill from https://github.com/wshobson/agents/tree/main/plugins/quantitative-trading/skills/risk-metrics-calculation into .claude/skills/risk-metrics-calculation/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "risk-metrics-calculation", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/wshobson/agents/tree/main/plugins/quantitative-trading/skills/risk-metrics-calculationType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add wshobson/agents --skill risk-metrics-calculation -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install wshobson/agents risk-metrics-calculation --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/wshobson/agents.git skills-src && mkdir -p .agents/skills && cp -r skills-src/plugins/quantitative-trading/skills/risk-metrics-calculation .agents/skills/risk-metrics-calculation && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "risk-metrics-calculation" agent skill from https://github.com/wshobson/agents/tree/main/plugins/quantitative-trading/skills/risk-metrics-calculation into .agents/skills/risk-metrics-calculation/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "risk-metrics-calculation", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add wshobson/agents --skill risk-metrics-calculation -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install wshobson/agents risk-metrics-calculation --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/wshobson/agents.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/plugins/quantitative-trading/skills/risk-metrics-calculation .cursor/skills/risk-metrics-calculation && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "risk-metrics-calculation" agent skill from https://github.com/wshobson/agents/tree/main/plugins/quantitative-trading/skills/risk-metrics-calculation into .cursor/skills/risk-metrics-calculation/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "risk-metrics-calculation", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/wshobson/agents.git --path plugins/quantitative-trading/skills/risk-metrics-calculation--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add wshobson/agents --skill risk-metrics-calculation -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install wshobson/agents risk-metrics-calculation --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/wshobson/agents.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/plugins/quantitative-trading/skills/risk-metrics-calculation .gemini/skills/risk-metrics-calculation && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "risk-metrics-calculation" agent skill from https://github.com/wshobson/agents/tree/main/plugins/quantitative-trading/skills/risk-metrics-calculation into .gemini/skills/risk-metrics-calculation/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "risk-metrics-calculation", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install wshobson/agents risk-metrics-calculationInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add wshobson/agents --skill risk-metrics-calculation -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/wshobson/agents.git skills-src && mkdir -p .github/skills && cp -r skills-src/plugins/quantitative-trading/skills/risk-metrics-calculation .github/skills/risk-metrics-calculation && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "risk-metrics-calculation" agent skill from https://github.com/wshobson/agents/tree/main/plugins/quantitative-trading/skills/risk-metrics-calculation into .github/skills/risk-metrics-calculation/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "risk-metrics-calculation", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add wshobson/agents --skill risk-metrics-calculation -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install wshobson/agents risk-metrics-calculation --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/wshobson/agents.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/plugins/quantitative-trading/skills/risk-metrics-calculation .opencode/skills/risk-metrics-calculation && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "risk-metrics-calculation" agent skill from https://github.com/wshobson/agents/tree/main/plugins/quantitative-trading/skills/risk-metrics-calculation into .opencode/skills/risk-metrics-calculation/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "risk-metrics-calculation", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
risk-metrics-calculationCovers portfolio risk measurement with VaR, CVaR, Sharpe, Sortino and drawdown, plus guidance on limits, stress tests and tail risk.
Risk is grouped into four metric families: volatility (standard deviation and beta), tail risk (VaR and CVaR), drawdown (maximum drawdown and Calmar) and risk-adjusted return (Sharpe and Sortino). The skill is a reference for choosing and calculating them for a portfolio, and lists use cases from setting risk limits and position sizes to dashboards and regulatory reporting.
It also lays out time horizons, from intraday VaR for day traders to daily reporting and weekly rebalancing decisions, and keeps its worked patterns in references/details.md for when the overview is not enough.
Its guidance favors using several metrics instead of one, treating CVaR as a complement to VaR because VaR understates tail risk, running rolling analysis and stress tests, and writing down assumptions such as the distribution and lookback. It warns against assuming normal returns, ignoring correlation in stress periods, using short lookbacks and forgetting transaction costs. It describes measurement methods, not investment advice.
2 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 46891e7. It shows what the files ask for, not the result of running them.
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.
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.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Portfolio Risk Metrics loads about 502 tokens when it runs, and up to ~4.7k if it reads all its reference files. Until then it costs about 54 tokens; SKILL.md has 168 words of instructions outside code blocks.
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.
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.
The full file from wshobson/agents at commit 46891e7, republished under its MIT licence (© wshobson). 168 words, ~502 tokens.
.claude/skills/risk-metrics-calculation/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.Comprehensive risk measurement toolkit for portfolio management, including Value at Risk, Expected Shortfall, and drawdown analysis.
| 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 |
Intraday: Minute/hourly VaR for day traders
Daily: Standard risk reporting
Weekly: Rebalancing decisions
Monthly: Performance attribution
Annual: Strategic allocationDetailed pattern documentation lives in references/details.md. Read that file when the navigation tier above is insufficient.
© wshobson, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 1 other file (references) in plugins/quantitative-trading/skills/risk-metrics-calculation of wshobson/agents.
Open the folder on GitHubat commit 46891e7
We found 23 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 12 other GitHub owners. This page covers the copy in wshobson/agents, which our catalogue first saw on October 7, 2026.
Portfolio Risk Metrics 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Portfolio Risk Metrics this skillwshobson/agents | 40k | 12 repos | ~502 | Automated safety check: Pass | MIT | |
| Risk Measurement and Stress TestingHKUDS/Vibe-Trading | 35k | — | ~3.8k | Automated safety check: Pass | MIT | |
| Correlation and Cointegration AnalysisHKUDS/Vibe-Trading | 35k | — | ~10k | Automated safety check: Pass | MIT | |
| Correlation Regime DetectionHKUDS/Vibe-Trading | 35k | — | ~5.4k | Automated safety check: Pass | MIT | |
| Gplay Reports Downloadhanamizuki/solopreneur | 152 | — | ~2.2k | Automated safety check: Pass | MIT | |
| Eastmoney Market DataHKUDS/Vibe-Trading | 35k | — | ~1k | Automated safety check: Pass | MIT |
HKUDS/Vibe-Trading
Measures portfolio and backtest risk with VaR, CVaR, maximum drawdown, Monte Carlo simulation, tail modeling and stress tests, using one tested risk module.
HKUDS/Vibe-Trading
Finds co-moving assets and tests them for cointegration, with workflows for correlation studies, sector clustering, hedge ratios and pair-trading signals.
HKUDS/Vibe-Trading
Detects when markets fuse into one correlated bloc, adds regime context to risk, and attributes crises to first movers, as monitoring tools rather than trade signals.
hanamizuki/solopreneur
Financial and statistics report listing and downloading from Google Play Console via GCS.
HKUDS/Vibe-Trading
Index of Eastmoney's free, no-token market data interfaces for China A-shares and Hong Kong stocks: fund flows, dragon-tiger lists, margin trading, reports and news.
HKUDS/Vibe-Trading
Retrieves public OKX cryptocurrency market data such as spot prices, candlesticks, funding rates and open interest through the OKX V5 REST API, with no authentication.
wshobson/agents
Cuts cloud spend across AWS, Azure, GCP and OCI with cost tagging, rightsizing, commitment and spot pricing models, and architecture changes.
wshobson/agents
Covers building subscription billing: billing cycles, subscription states, invoice generation, proration, tax handling and dunning for failed payments.
wshobson/agents
Profiles slow Python code with cProfile and memory profilers, then applies targeted fixes for CPU, memory, I/O and query bottlenecks.
wshobson/agents
Writes unit tests for shell scripts with Bats: error-condition tests, fixtures and mocks, cross-shell checks, parallel runs, helper files and CI integration.
wshobson/agents
Implement distributed tracing with Jaeger and Tempo to track requests across microservices and identify performance bottlenecks.
wshobson/agents
Reference for designing and tuning production LLM prompts: few-shot examples, chain-of-thought, structured outputs, templates and system prompts.
Categories
Covers portfolio risk measurement with VaR, CVaR, Sharpe, Sortino and drawdown, plus guidance on limits, stress tests and tail risk. Risk is grouped into four metric families: volatility (standard deviation and beta), tail risk (VaR and CVaR), drawdown (maximum drawdown and Calmar) and risk-adjusted return (Sharpe and Sortino). The skill is a reference for choosing and calculating them for a portfolio, and lists use cases from setting risk limits and position sizes to dashboards and regulatory reporting.
Portfolio Risk Metrics fits situations like: measuring the risk of an investment portfolio; setting risk limits or position sizes with VaR and CVaR; building a risk dashboard with drawdown and Sharpe or Sortino ratios; preparing risk figures for regulatory reporting.
Run `npx skills add wshobson/agents --skill risk-metrics-calculation -a claude-code`. Or copy the skill folder (plugins/quantitative-trading/skills/risk-metrics-calculation in wshobson/agents) into .claude/skills/risk-metrics-calculation in your project. Claude Code loads it when a task matches its description.
Run `npx skills add wshobson/agents --skill risk-metrics-calculation -a codex`. Or copy the skill folder (plugins/quantitative-trading/skills/risk-metrics-calculation in wshobson/agents) into .agents/skills/risk-metrics-calculation in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add wshobson/agents --skill risk-metrics-calculation -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/risk-metrics-calculation, .gemini/skills/risk-metrics-calculation, .github/skills/risk-metrics-calculation and .opencode/skills/risk-metrics-calculation in your project.
SKILL.md names no scripts, command-line tools or credentials: Portfolio Risk Metrics is instructions for the agent only.
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.
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.
Portfolio Risk Metrics is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 502 tokens (SKILL.md is roughly 2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 4.2k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Portfolio Risk Metrics: Risk Measurement and Stress Testing (HKUDS/Vibe-Trading, 35k stars), Correlation and Cointegration Analysis (HKUDS/Vibe-Trading, 35k stars), Correlation Regime Detection (HKUDS/Vibe-Trading, 35k stars) and Gplay Reports Download (hanamizuki/solopreneur, 152 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
wshobson (a GitHub user) maintains it in wshobson/agents, which has 40,314 GitHub stars. The repository holds 142 skills in this directory. The repository was last updated on October 5, 2026.
Source: wshobson/agents on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.