risk-engine

Enforce real-time risk checks on trading orders with RiskVerdict messaging.

Updated Mar 2, 2026
One-click install
npx skills add https://github.com/Leiisawesome/feelies --skill risk-engine
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: risk-engine
Source: https://github.com/Leiisawesome/feelies/tree/main/.cursor/skills/risk-engine
Command: npx skills add https://github.com/Leiisawesome/feelies --skill risk-engine

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Risk control layer and portfolio governor for real-time position limits, exposure management, drawdown enforcement, regime detection, and PnL attribution. Use when designing risk constraints, implementing drawdown gates, building volatility-adjusted sizing, detecting regime shifts or concentration risk, defining hedge overlays, emergency de-leveraging, or reasoning about fail-safe guarantees, PnL decomposition, or risk budget allocation.

Core Features & Use Cases

  • Real-time enforce risk constraints: intercepts every order intent and validates against risk limits before submission.
  • Dynamic sizing and regime-aware risk: scales positions based on volatility regimes and health signals; includes kill-switch and circuit breaker logic.
  • PnL attribution & governance: provides risk verdicts per trade and feeds risk events into governance for auditing and cross-strategy exposure control.

Quick Start

Run a real-time risk check by calling RiskEngine.check_order with the incoming order and handle the resulting RiskVerdict to decide submission or adjustment.

Frequently Asked Questions about risk-engine

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

FAQPage Schema
How do I implement real-time risk gating for trading portfolios?

Real-time risk gating intercepts every order intent and validates against portfolio limits before submission. It uses a risk engine to apply position sizing, drawdown enforcement, and volatility checks, returning a verdict to decide submission or adjustment.

Can I enforce drawdown limits and circuit breakers automatically?

Yes, you can enforce drawdown limits and circuit breakers automatically. The system includes kill-switch logic and regime-aware risk controls to scale positions based on health signals and trigger emergency de-leveraging when limits are breached.

How does PnL attribution work for cross-strategy exposure control?

PnL attribution works by providing risk verdicts per trade and feeding risk events into a governance layer. This enables PnL decomposition and auditing to manage cross-strategy exposure and enforce safety protocols across portfolios.

What is volatility-adjusted position sizing and how do I apply it?

Volatility-adjusted position sizing scales trade sizes dynamically based on detected volatility regimes and health signals. You apply it by running incoming orders through a position sizer that calculates safe exposure limits before routing.

Does this risk engine work for both live trading and backtested workflows?

Yes, the risk engine applies to both live and backtested trading workflows. It implements M5 and M6 risk checks to enforce exposure management, regime detection, and position limits consistently across live execution and historical simulations.