"algo-risk-var"

"algo-risk-var" is a skill for Claude Code from charlieviettq/awesome-agent-skill. It costs 66 tokens per session (1,284 once invoked), scanned A, a copy of algo-risk-var, MIT.

A portfolio risk calculation that estimates a loss threshold over a chosen time period and confidence level. For example, 95% one-day VaR estimates a loss that should not be exceeded on 95% of days.

In plain words
What is it for?
Use it to calculate parametric, historical-simulation, or Monte Carlo VaR from portfolio positions and return data. It also supports risk reporting, but not assets without usable price history or analysis of extreme tail losses.
Why use it?
It helps quantify downside risk, set trading limits, and estimate capital needs. VaR does not show how large losses may be beyond its threshold, so it should not be treated as a worst-case estimate.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: positional $N argument.

Good fit Use it to calculate parametric, historical-simulation, or Monte Carlo VaR from portfolio positions and return data. It also supports risk reporting, but not assets without usable price history or analysis of extreme tail losses.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/charlieviettq/awesome-agent-skill/algo-risk-var
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 charlieviettq/awesome-agent-skill --skill algo-risk-var
Clone the repo
git clone --depth 1 https://github.com/charlieviettq/awesome-agent-skill

Made for: Claude Code.

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 "algo-risk-var"

README.md
[![agentmods](https://agentmods.dev/badge/skills/charlieviettq/awesome-agent-skill/algo-risk-var/github.svg)](https://agentmods.dev/skills/charlieviettq/awesome-agent-skill/algo-risk-var)
Your own site
<a href="https://agentmods.dev/skills/charlieviettq/awesome-agent-skill/algo-risk-var"><img src="https://agentmods.dev/badge/skills/charlieviettq/awesome-agent-skill/algo-risk-var/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 "algo-risk-var"

Your own site · 80×15
<a href="https://agentmods.dev/skills/charlieviettq/awesome-agent-skill/algo-risk-var"><img src="https://agentmods.dev/badge/skills/charlieviettq/awesome-agent-skill/algo-risk-var.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 66 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,284 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.
Origin 98% copy Near-identical to another mod 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.00066 $0.01284
Opus 5 $0.00033 $0.00642
Sonnet 5 $0.00013 $0.00257
Haiku 4.5 $0.00007 $0.00128

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

Security

Grade A, and why

"algo-risk-var" 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 13d ago.

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.

Origin

This is a copy

98% identical to algo-risk-var — 8 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.claude/skills/algo-risk-var/SKILL.md · 99 lines

How it starts

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

Value at Risk (VaR)

Overview

VaR estimates the maximum loss a portfolio can suffer over a given time horizon at a specified confidence level. Example: "95% 1-day VaR of $1M" means there's a 5% chance of losing more than $1M in one day. Three methods: parametric (normal), historical simulation, Monte Carlo.

When to Use

Trigger conditions:

  • Quantifying portfolio downside risk for risk management
  • Setting trading limits and capital reserves
  • Regulatory reporting (Basel III requires VaR-based capital)

When NOT to use:

  • When you need to know how bad losses CAN get beyond VaR (use CVaR/Expected Shortfall)
  • For illiquid assets with no price history (VaR needs return data)

Algorithm

IRON LAW: VaR Does NOT Tell You How Bad It Gets BEYOND the Threshold
VaR says "95% of the time, losses won't exceed $X." It says NOTHING
about the 5% worst case. A portfolio can have low VaR but catastrophic
tail losses. Always supplement with Expected Shortfall (CVaR) which
measures the average loss in the tail.

Phase 1: Input Validation

Collect: portfolio positions, historical returns (min 250 days for 1Y), confidence level (typically 95% or 99%), time horizon (1 day or 10 days). Gate: Sufficient return history, positions valued at current market.

Phase 2: Core Algorithm

Parametric VaR: VaR = -μ + zα × σ (assumes normal returns). For portfolio: use covariance matrix for portfolio σ.

Historical Simulation: 1. Compute daily P&L from historical returns. 2. Sort P&L ascending. 3. VaR = the (1-α) percentile loss.

Monte Carlo: 1. Fit return distribution (or use historical). 2. Simulate 10,000+ portfolio paths. 3. VaR = (1-α) percentile of simulated losses.

Phase 3: Verification

Backtest: count how often actual losses exceed VaR over the past year. At 95% confidence, exceedances should be ~5%. Use Kupiec or Christoffersen test. Gate: Backtest exceedance rate within acceptable bounds.

Phase 4: Output

Return VaR estimate with backtest results.

Read the full file on GitHub · 99 lines

Files

What ships with it

3 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. 13d ago First seen · 99 lines · 66 tokens per session scan A 891243672df5

Subscribe to this mod's changes

"algo-risk-var" is a skill published in the GitHub repository charlieviettq/awesome-agent-skill (25 stars, last pushed 1mo ago), licensed MIT. It adds 66 tokens to every session and 1,284 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. It is 98% identical to algo-risk-var, differing in 8 lines, and is treated as a copy.

Related

Other skills, from other repositories

cwicr-cost-calculator

Calculate construction costs using DDC CWICR resource-based methodology. Break down costs into labor, materials, equipment with transparent pricing.

datadrivenconstruction/DDC_Skills_for_AI_Agents_in_Construction · 33 tokens

cwicr-risk-calculator

Calculate risk-adjusted cost estimates using CWICR data. Apply contingencies, Monte Carlo simulation, and probability distributions to cost estimates.

datadrivenconstruction/DDC_Skills_for_AI_Agents_in_Construction · 34 tokens

bim-cost-estimation-cwicr

Automated cost estimation from BIM models using DDC CWICR database (8 national bases, 78,228 positions). AI classification + vector search for accurate pricing.

datadrivenconstruction/DDC_Skills_for_AI_Agents_in_Construction · 43 tokens

historical-cost-analyzer

Analyze historical construction costs for benchmarking, trend analysis, and estimating calibration. Compare projects, track escalation, identify patterns.

datadrivenconstruction/DDC_Skills_for_AI_Agents_in_Construction · 29 tokens

unit-price-database-manager

Manage construction unit price databases: update prices, track vendors, apply location factors, maintain historical records. Essential for accurate estimating.

datadrivenconstruction/DDC_Skills_for_AI_Agents_in_Construction · 31 tokens

cashflow-forecaster

Forecast construction project cash flow. Project income and expenses, identify funding gaps, and optimize payment timing for improved financial management.

datadrivenconstruction/DDC_Skills_for_AI_Agents_in_Construction · 30 tokens