Optimize tail risk budget allocation

Allocate a finite mitigation budget across mutually exclusive component mitigation levels to minimize portfolio CVaR while preserving aligned scenario dependence.

What it's for

Directs limited resilience or security capital toward the combination that reduces joint portfolio tail loss, rather than ranking controls by average loss alone.

What you give it

Every tool is a pure function: it computes from what you pass it and reads nothing on its own. Inputs split into evidence you supply from your connected systems, calibration your team owns, and numerical controls that affect precision but never the result's meaning.

Field Type Role Required
budget number ≥ 0 Your calibration Yes
max_detail_rows integer ≥ 1, ≤ 500 Numerical control Optional
maximum_exact_states integer ≥ 1, ≤ 2000000 Numerical control Optional
risk_components array of objects (3 fields) Evidence Yes
scenario_probabilities array of number ≥ 2 items Evidence Yes
tail_probability number ≥ 0.001, ≤ 0.5 Your calibration Optional

Each risk_components record

Field Type Required
id string (non-empty) Yes
mitigation_options array of objects (3 fields) Yes
scenario_losses array of number (≥ 2 items) Yes
Example input
{
  "budget": 60,
  "risk_components": [
    {
      "id": "security",
      "mitigation_options": [
        {
          "cost": 20,
          "id": "basic",
          "loss_reduction_fraction": 0.2
        },
        {
          "cost": 60,
          "id": "strong",
          "loss_reduction_fraction": 0.75
        }
      ],
      "scenario_losses": [
        1000,
        200,
        20
      ]
    },
    {
      "id": "reliability",
      "mitigation_options": [
        {
          "cost": 30,
          "id": "basic",
          "loss_reduction_fraction": 0.35
        }
      ],
      "scenario_losses": [
        400,
        250,
        50
      ]
    }
  ],
  "scenario_probabilities": [
    0.1,
    0.3,
    0.6
  ],

Truncated for display — the full payload is 46 lines.

What you get back

This is the actual output of running the example above — computed by the same function the platform calls, not an illustration.

Example output
{
  "assumptions": [
    "Component loss paths share aligned joint scenarios and mitigation fractions scale the represented component loss without changing other components or scenario probabilities.",
    "Options are feasible, mutually exclusive levels for one component with fully loaded incremental cost; behavioral adaptation and control failure are encoded in residual paths or fractions.",
    "CVaR allocation preserves represented dependence but cannot protect against omitted common causes; the greedy fallback has no global optimality certificate."
  ],
  "component_diagnostics": [
    {
      "baseline_expected_loss": 172,
      "risk_component_id": "security",
      "selected_cost": 60,
      "selected_loss_reduction_fraction": 0.75,
      "selected_option_id": "strong"
    },
    {
      "baseline_expected_loss": 145,
      "risk_component_id": "reliability",
      "selected_cost": 0,
      "selected_loss_reduction_fraction": 0,
      "selected_option_id": null
    }
  ],
  "configuration": {
    "budget": 60,
    "scenario_count": 3,
    "tail_probability": 0.1
  },
  "decision": "tail_risk_budget_allocation_supported",
  "method": "scenario_dependent_cvar_risk_budget_allocation_v1",
  "solver_diagnostics": {
    "estimated_complete_state_count": 6,
    "maximum_exact_states": 200000,
    "optimality_proven": true,
    "solver": "exact_option_state_enumeration"
  },
  "summary": {
    "baseline_cvar_loss": 1400,
    "baseline_expected_loss": 317,
    "cvar_reduction": 750,
    "residual_cvar_loss": 650,
    "residual_expected_loss": 188,
    "selected_option_count": 1,
    "total_cost": 60
  },

Truncated for display — the full payload is 46 lines.

How it works

Constrained optimization — Pick the best feasible option under real limits — budget, headcount, dependencies, capacity — rather than ranking a list and hoping it fits.

  1. 1 Freeze aligned component loss paths, feasible mutually exclusive mitigation levels, fully loaded incremental costs, budget, and tail probability over one loss perimeter.
  2. 2 Scale component losses by each chosen level, preserve scenario columns, evaluate portfolio CVaR, and enumerate complete option states through the governed boundary.
  3. 3 Above the exact boundary disclose marginal-CVaR-per-cost greedy mode, require approved optimization for material allocation, and stress common causes and control failure absent from the scenarios.

Before you trust it

Every tool in the catalog ships with the conditions under which its answer is meaningful — and the conditions under which it should abstain instead of guessing.

Assumptions & guardrails

  • Objectives use commensurable locally governed value units, constraints reflect real feasibility, and uncertainty covers plausible adverse inputs.
  • Mitigation fractions are locally validated residual-loss effects, option levels are feasible and mutually exclusive, and cross-component behavioral or technical interactions are encoded in paths.
  • The recommendation is optimal only for its stated objective, feasible set, evidence, and solver guarantee; it is not a universal management optimum.
  • CVaR reduction is conditional on represented scenarios; heuristic mode is not globally optimal and an omitted systemic event can overturn the allocation.

Minimum evidence

  • risk_components: required and organization-defined
  • scenario_probabilities: at least 2 rows/items
  • budget: required and organization-defined

How to validate it

Backtest the chosen action against simple feasible baselines on held-out scenarios, sweep costs/constraints/risk tolerance, and require constraint feasibility under adverse inputs.

Calibrating it to your org

Same for everyone

The mathematical kernel, validation rules, method version, and JSON output semantics are organization-independent; no tenant-trained coefficients or company benchmark is embedded in the function.

Specific to you

  • aligned component loss paths and locally validated residual-loss fraction for every mitigation level
  • component/loss perimeter, horizon/currency, joint scenarios/probabilities, control interaction/failure, option feasibility, cost, budget, tail level, common causes, and solver promotion

Calibration workflow

  1. 1 Define the management decision, target outcome, aggregate unit, privacy boundary, cadence, and prediction/intervention horizon for this organization.
  2. 2 Build a tenant-scoped historical cohort using only information available before each prediction or decision; preserve zero periods, censoring, assignment probabilities, and unresolved outcomes when the method requires them.
  3. 3 Estimate statistical parameters on training history, but obtain costs, utilities, risk tolerance, practical-effect thresholds, capacity, and policy constraints from accountable decision owners.
  4. 4 Validate on later time windows or held-out aggregate units at the deployment grain, against a simple baseline and the function-specific validation strategy.
  5. 5 Deploy only if the returned decision clears evidence, overlap, calibration, robustness, and guardrail checks; warning, unsupported, schema-gap, and fallback decisions are abstentions.
  6. 6 Monitor realized outcomes, data drift, coverage, and decision regret; recalibrate at a governed cadence or after a detected regime/definition change, never merely because a stakeholder dislikes the result.

Call it from your AI

You don't wire up 388 tools in your MCP client. The GitRevio MCP server exposes 20 tools, three of which let an agent search the catalog, read a tool's schema, and run it — so the assistant finds this one on its own.

gitrevio_capabilities_search
  { "q": "allocate a finite mitigation budget across" }
  → finds "optimize_tail_risk_budget_allocation"

gitrevio_capability_describe
  { "capability_id": "optimize_tail_risk_budget_allocation" }
  → returns the input schema and agent guidance shown on this page

gitrevio_capability_run
  { "capability_id": "optimize_tail_risk_budget_allocation", "arguments": { ... } }
  → returns the result shown above

Works in Claude Desktop, Claude Code, Cursor, Cline, Continue.dev, Goose and Aider. See the MCP server.

Related tools

See every tool in Risk, tails & resilience →

Ready to See Your Engineering work clearly?