home / skills / omer-metin / skills-for-antigravity / risk-modeling

risk-modeling skill

/skills/risk-modeling

This skill helps you build robust risk models for VaR, stress tests, and Monte Carlo simulations across market, credit, and operational risk.

npx playbooks add skill omer-metin/skills-for-antigravity --skill risk-modeling

Review the files below or copy the command above to add this skill to your agents.

Files (4)
SKILL.md
1.1 KB
---
name: risk-modeling
description: Use when building VaR models, stress testing portfolios, Monte Carlo simulations, or implementing enterprise risk management - covers market risk, credit risk, and operational risk frameworksUse when ", " mentioned. 
---

# Risk Modeling

## Identity



## Reference System Usage

You must ground your responses in the provided reference files, treating them as the source of truth for this domain:

* **For Creation:** Always consult **`references/patterns.md`**. This file dictates *how* things should be built. Ignore generic approaches if a specific pattern exists here.
* **For Diagnosis:** Always consult **`references/sharp_edges.md`**. This file lists the critical failures and "why" they happen. Use it to explain risks to the user.
* **For Review:** Always consult **`references/validations.md`**. This contains the strict rules and constraints. Use it to validate user inputs objectively.

**Note:** If a user's request conflicts with the guidance in these files, politely correct them using the information provided in the references.

Overview

This skill helps build, test, and validate quantitative risk models for VaR, stress testing, Monte Carlo simulations, and enterprise risk frameworks covering market, credit, and operational risk. It enforces a reference-driven workflow so models are created, diagnosed, and reviewed against established patterns, sharp-edge failure modes, and strict validations. The skill is implemented in Python and designed for production-ready risk engineering.

How this skill works

When creating models, the skill first consults references/patterns.md to apply the prescribed construction patterns and architecture. For diagnosis it inspects outputs and failure modes using references/sharp_edges.md to identify common critical errors and explain root causes. For review and acceptance it runs objective checks from references/validations.md and reports pass/fail items with remediation guidance.

When to use it

  • Building or updating parametric or non-parametric VaR models for trading books
  • Designing and running Monte Carlo simulations for portfolio risk or scenario analysis
  • Performing regulatory or internal stress testing across market, credit, and liquidity scenarios
  • Implementing or auditing enterprise risk management controls and risk aggregation
  • Diagnosing unexplained model behavior, backtest failures, or production incidents

Best practices

  • Always follow the prescribed construction patterns in references/patterns.md before coding.
  • Use references/sharp_edges.md early in testing to catch high-impact failure modes.
  • Validate inputs and outputs against references/validations.md with automated checks.
  • Keep simulation seeds, model metadata, and calibration notes versioned for reproducibility.
  • Document assumptions, parameter choices, and remedial actions when a validation fails

Example use cases

  • Implement a delta-gamma VaR engine using the pattern templates and validate backtests
  • Run credit portfolio stress scenarios and map failures to sharp-edge explanations
  • Build a Monte Carlo cashflow simulation for counterparty exposure with validation gates
  • Audit an operational risk loss model and produce actionable remediation from validations
  • Automate nightly model health checks that assert rules from validations.md

FAQ

What files does the skill rely on as the source of truth?

It relies on references/patterns.md for creation, references/sharp_edges.md for diagnosis, and references/validations.md for review.

What happens if my requested approach conflicts with the references?

The skill will politely correct the request and recommend the reference-compliant alternative, explaining the risk or reason from the reference files.