risk-analysis

Calculate VaR, CVaR, and maximum drawdown from return series.

Updated Jul 8, 2026
One-click install
npx skills add https://github.com/hxhyyy/Vibe-Trading --skill risk-analysis-hxhyyy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: risk-analysis
Source: https://github.com/hxhyyy/Vibe-Trading/tree/main/agent/src/skills/risk-analysis
Command: npx skills add https://github.com/hxhyyy/Vibe-Trading --skill risk-analysis-hxhyyy

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires numpy, pandas, scipy.

What problem does it solve?

This Skill addresses the difficulty of accurately measuring financial risk and predicting portfolio performance under extreme market conditions, helping users move beyond simple volatility metrics.

Core Features & Use Cases

  • Advanced Risk Metrics: Calculate VaR, CVaR, and maximum drawdown to understand potential losses.
  • Stress Testing: Simulate portfolio impact using historical crises or custom hypothetical scenarios like rate shocks or liquidity dry-ups.
  • Tail-Risk Analysis: Use Extreme Value Theory to identify fat-tail risks that standard models often overlook.
  • Use Case: A trader can use this to determine if their current portfolio allocation would survive a 2008-style market crash or a sudden 100bp interest rate hike.

Quick Start

Use the risk-analysis skill to calculate the 95 percent VaR and perform a stress test on the provided portfolio returns data.

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 portfolio risk analysis?

Portfolio risk analysis calculates VaR, CVaR, and maximum drawdown by processing return series with pandas, numpy, and scipy to quantify potential losses and generate actionable risk-control recommendations.

Can I stress test my portfolio against historical financial crises and hypothetical rate shocks?

Yes, stress testing simulates portfolio resilience by applying historical crisis scenarios or custom hypothetical events like rate shocks and liquidity dry-ups to evaluate performance under extreme market conditions.

What is the best way to assess tail risk and fat-tail risks beyond standard volatility metrics?

Tail-risk assessment uses Extreme Value Theory to identify fat-tail risks that standard volatility models often overlook, providing deeper analysis of potential extreme losses in financial portfolios.

Do I need pandas and scipy to perform Monte Carlo simulations for risk management?

Yes, Monte Carlo simulations and comprehensive risk measurement require pandas, numpy, and scipy to process return series and calculate metrics like VaR, CVaR, and maximum drawdown accurately.

How does maximum drawdown calculation help evaluate portfolio resilience?

Maximum drawdown calculation measures the largest peak-to-trough decline in a portfolio, helping evaluate resilience by quantifying worst-case loss scenarios alongside VaR and CVaR metrics.

When should I use extreme value theory instead of historical stress testing for risk measurement?

Use extreme value theory when standard models overlook fat-tail risks, while historical stress testing applies past crisis data; both methods complement each other for comprehensive portfolio risk assessment.