# drawdown-tail-risk-var

> Measure downside risk with VaR, expected shortfall, EVT and backtests, plus stress and liquidity-adjusted views.

drawdown-tail-risk-var is a paid AI agent skill on Agensi by BanditXBT. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $29 (one-time purchase)
- Creator: [BanditXBT](https://www.agensi.io/creators/banditxbt)
- Version: 1.0
- Last updated: 2026-11-21
- Security: scan passed (2026-11-21); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/drawdown-tail-risk-var
- Tags: trading-investing, research-analysis, web3-crypto

## About this skill

Risk numbers are model outputs with error bars; state horizon, confidence, window, blind spots. Educational analysis, not investment advice; state assumptions and data sources.

- **VaR_a:** loss threshold exceeded with probability 1-a over a horizon. Not subadditive in general; says nothing about loss beyond the threshold.
- **Expected shortfall (ES/CVaR):** `E[loss | loss > VaR]`; coherent. Basel's FRTB internal models approach uses 97.5% one-tailed ES with a 10-day base horizon (MAR33.3-33.4, BIS); bank-wide VaR backtesting stays at 99% (MAR32.5). For a normal distribution, 97.5% ES (~2.34 sigma) is close to 99% VaR (2.33 sigma); fat tails make them diverge.
- **Drawdown:** peak-to-trough; report max DD, time under water, and Ulcer index. Drawdown is path-dependent; VaR is not. Max DD grows with horizon (for iid zero-drift, roughly with sqrt(T)); compare strategies on equal sample length.

- **Historical simulation:** empirical quantile of the last N returns. Heuristic: N >= 500 for 99%; the 99% quantile from 250 points rests on 2-3 observations. Slow to react to vol changes; use volatility-scaled (filtered) historical simulation: standardize by EWMA/GARCH vol, resample, rescale to current vol.
- **Parametric (variance-covariance):** `VaR = z_a * sigma * sqrt(h) - mu*h`. Normal underestimates crypto and event-driven tails; Student-t or Cornish-Fisher corrections help moderately. sqrt-time scaling fails with autocorrelation, vol clustering, and jumps; do not scale 1-day VaR to 10 days without checking.
- **Monte Carlo:** simulate factors (t-copula, GARCH-DCC, regime-switching), revalue nonlinear positions (options need full revaluation, not delta-gamma at large moves). Report simulation error and seed sensitivity.
- **EVT (peaks over threshold):** fit a generalized Pareto distribution to exceedances above a high threshold u (Balkema-de Haan-Pickands theorem). Choose u via mean-excess plot and parameter stability; keep enough exceedances (heuristic: 50-100+). Tail index xi > 0 means heavy tail; `xi >= 0.5` implies infinite variance, `xi >= 1` infinite mean. VaR and ES follow from the GPD formulas. Confidence intervals via profile likelihood or bootstrap; they are wide, so report them.
- Window tradeoff: short tracks regimes but is noisy; see regime-detection-volatility.

- Exceptions `I_t = 1{loss_t > VaR_t}`; expect rate `p = 1-a`.
- **Kupiec (1995) POF (unconditional coverage):** LR test that exception frequency equals p; chi-square with 1 d.f. Low power at 99% with 250 days (expected 2.5 exceptions); asymptotic chi-square is poor at 99%, so consider simulated or bootstrap p-values.
- **Christoffersen (1998) independence and conditional coverage:** tests first-order Markov clustering of exceptions; `LR_cc = LR_pof + LR_ind`, chi-square with 2 d.f. Clustered exceptions mean VaR fails exactly when it is needed.
- Basel traffic light (bank-wide 99% VaR, 250 observations; MAR32.9 Table 1, BIS): green 0-4 exceptions (multiplier 1.50), amber 5-9 (1.70 to 1.92), red 10+ (2.00). FRTB desk-level: more than 12 exceptions at 99% or 30 at 97.5% in 12 months forces the standardised approach (MAR32.19).
- ES backtests: Acerbi-Szekely tests; or compare average realized shortfall on exception days to predicted ES. ES is not elicitable alone, but is jointly elicitable with VaR (Fissler-Ziegel), which supports joint scoring.
- Report exception dates and check for gaps, liquidations, data errors.

## Requires

- Python 3
- numpy
- scipy

## Known limitations

Educational analysis, not investment advice. Risk figures are model outputs with error bars; heuristic thresholds are labeled as such.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the drawdown-tail-risk-var skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### What does drawdown-tail-risk-var do?

Measure downside risk with VaR, expected shortfall, EVT and backtests, plus stress and liquidity-adjusted views.

### Which AI agents support drawdown-tail-risk-var?

This skill uses the open SKILL.md standard. Use it through an MCP-compatible agent connected to Agensi, and check the compatibility information on this page for confirmed agents and required capabilities.

### How do I use drawdown-tail-risk-var?

Connect your AI agent to Agensi through MCP, then ask it to use drawdown-tail-risk-var on your task. Your agent loads the latest approved version each time. Paid skills require a purchase or active subscription. Skill files are not available for download; your licence does not allow you to save, copy or export any part of a skill.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
