Works with the AI Agents you already use
Drawdown Tail Risk Var
by BanditXBT
Measure downside risk with VaR, expected shortfall, EVT and backtests, plus stress and liquidity-adjusted views.
$29
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.5implies infinite variance,xi >= 1infinite 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 ratep = 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.
Educational analysis, not investment advice. Risk figures are model outputs with error bars; heuristic thresholds are labeled as such.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 13 days ago
- Software
Python 3numpyscipy
Permissions
No special permissions declared or detected
What's inside
Frequently Asked Questions
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse All Claude Skills.