risk-analysis

Calculate VaR and CVaR for financial portfolios using Monte Carlo simulations.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires numpy, pandas, scipy, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill automates risk calculation and analysis using advanced techniques like VaR/CVaR, max drawdown, and Monte Carlo simulation, providing users with a comprehensive understanding of potential portfolio losses.

Core Features & Use Cases

  • VaR and CVaR Calculation: Determine the maximum potential loss at a specified confidence level.
  • Max Drawdown Analysis: Measure the maximum loss from a peak to a trough of a portfolio, before a new peak is achieved.
  • Monte Carlo Simulation: Model the future uncertainty of financial instruments to evaluate risk.
  • Use Case: A financial analyst could use this Skill to model a portfolio's potential loss distribution, identify critical risk factors, and optimize the portfolio for lower risk.

Quick Start

Use the risk-analysis skill to calculate the 95% confidence VaR and CVaR for a given portfolio return series.

Frequently Asked Questions about risk-analysis

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

FAQPage Schema
How do I calculate Value at Risk and Conditional Value at Risk for a financial portfolio?

To calculate Value at Risk and Conditional Value at Risk, you provide a portfolio return series to determine the maximum potential loss at a specified confidence level. This process requires statistical libraries like NumPy, pandas, and SciPy for mathematical operations.

How does Monte Carlo simulation work for portfolio risk assessment?

Monte Carlo simulation models future uncertainty of financial instruments by generating various scenarios to evaluate risk. It applies mathematical operations using NumPy and SciPy to project potential portfolio losses.

Can I use pandas and SciPy to measure max drawdown for a portfolio?

Yes, you can use pandas and SciPy to measure max drawdown, which calculates the maximum loss from a peak to a trough before a new peak is achieved. This automates risk calculation for financial portfolios.

Do I need NumPy and pandas to run VaR calculations and Monte Carlo simulations?

Yes, you need NumPy, pandas, and SciPy to run VaR calculations and Monte Carlo simulations. These statistical analysis libraries handle the mathematical operations and data processing required for risk assessment.

What is the best way to model a portfolio's potential loss distribution?

The best way to model a portfolio's potential loss distribution is using Monte Carlo simulation alongside VaR and CVaR calculations. This approach helps identify critical risk factors and optimize the portfolio for lower risk.

Are there limitations when using max drawdown analysis for risk assessment?

Max drawdown analysis measures the maximum loss from peak to trough but should be combined with VaR and CVaR calculations for comprehensive risk assessment. Relying solely on max drawdown may not capture future uncertainty modeled by Monte Carlo simulation.