risk-analysis

Compute portfolio VaR, CVaR, and maximum drawdown across historical, parametric, and Monte Carlo methods.

Updated Apr 10, 2026
One-click install
npx skills add https://github.com/ebrahim-sani/trading-automation --skill risk-analysis-ebrahim-sani
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: risk-analysis
Source: https://github.com/ebrahim-sani/trading-automation/tree/main/vibe-trading/agent/src/skills/risk-analysis
Command: npx skills add https://github.com/ebrahim-sani/trading-automation --skill risk-analysis-ebrahim-sani

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Risk analysis for financial portfolios, automating the computation and interpretation of VaR, CVaR, max drawdown, and tail-risk metrics to support robust risk management.

Core Features & Use Cases

  • VaR / CVaR calculations: Historical, parametric, and Monte Carlo methods to estimate potential losses.
  • Drawdown analysis: Maximum drawdown, peak/trough tracking, and recovery timelines for backtests and live data.
  • Tail-risk & stress testing: EVT tail fitting and scenario-based analysis for robust risk-control insights.
  • Use Case: Backtest a strategy over several years to quantify risk exposure and inform capital allocation.

Quick Start

Run risk-analysis on a dataset of returns to produce VaR, CVaR, and drawdown reports.

Frequently Asked Questions about risk-analysis

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I calculate VaR and CVaR for a portfolio using Monte Carlo simulation?

Portfolio VaR and CVaR are calculated using historical, parametric, and Monte Carlo methods to estimate potential losses. The simulation projects return distributions to quantify tail-risk exposure across various confidence intervals.

What is the best way to stress-test portfolio risk and analyze tail risk?

Stress-testing portfolio risk involves applying scenario-based analysis and EVT tail fitting to evaluate extreme market conditions. This process generates actionable risk-control recommendations to mitigate potential tail losses.

How does maximum drawdown analysis work for backtesting trading strategies?

Maximum drawdown analysis tracks peak and trough points in backtest data to measure the largest historical loss. It establishes recovery timelines to evaluate strategy risk exposure and capital allocation efficiency.

Can I compute parametric VaR and historical VaR from a dataset of returns?

Parametric and historical VaR can be computed directly from a dataset of returns. The analysis runs across multiple methodologies to produce comprehensive risk reports including CVaR and maximum drawdown metrics.

When should I use extreme value theory for tail-risk fitting in portfolio risk management?

Extreme value theory tail fitting is used when analyzing portfolio tail-risk beyond standard distributions. It models extreme loss events during stress testing to provide robust risk-control insights for capital allocation.