risk-measurement

Automate VaR, expected shortfall, and drawdown risk measurement workflows.

Updated Feb 10, 2026
One-click install
npx skills add https://github.com/GhostOf0days/codex-quant-skills --skill risk-measurement
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: risk-measurement
Source: https://github.com/GhostOf0days/codex-quant-skills/tree/main/risk-measurement
Command: npx skills add https://github.com/GhostOf0days/codex-quant-skills --skill risk-measurement

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses the need to accurately quantify and understand various types of financial risk within trading portfolios and strategies.

Core Features & Use Cases

  • Risk Metric Estimation: Calculates Value at Risk (VaR), Expected Shortfall (ES), and drawdown statistics.
  • Scenario Analysis: Enables stress testing and tail-loss decomposition.
  • Backtesting: Validates risk forecasts against historical performance.
  • Use Case: When a trading desk needs to understand the potential losses under extreme market conditions for a specific portfolio, this skill provides the necessary metrics and analysis.

Quick Start

Run the risk measurement diagnostics script on the input CSV file.

Frequently Asked Questions about risk-measurement

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

FAQPage Schema
How do I calculate Value at Risk and Expected Shortfall for my trading portfolio?

To calculate Value at Risk and Expected Shortfall for a trading portfolio, you can run automated risk measurement workflows that estimate tail-loss distributions and exposure metrics across your trading books.

How do I perform stress testing and analyze tail-loss decomposition for a portfolio?

Stress testing and tail-loss decomposition for a portfolio are performed using scenario-based metrics to evaluate potential losses under extreme market conditions and validate risk forecasts against historical performance.

What is the best way to measure drawdown risk across multiple trading strategies?

The best way to measure drawdown risk across multiple strategies is to apply quantitative risk assessment workflows that calculate drawdown statistics and exposure distributions from your input data.

Can I backtest risk forecasts against historical performance using Python scripts?

Yes, you can backtest risk forecasts against historical performance using deterministic Python diagnostic scripts that process your input data to validate the accuracy of estimated risk metrics.

Do I need a specific CSV format to run portfolio risk measurement diagnostics?

To run portfolio risk measurement diagnostics, you need to provide an input CSV file containing your portfolio data, which the Python scripts process to generate statistical and scenario-based risk metrics.