Allocate budget with CVAR constraint
Maximize expected portfolio return while keeping probability-weighted loss CVaR below a finance-owned tail-risk ceiling across aligned joint scenarios.
What it's for
Gives CEOs and investors a capital plan that explicitly caps severe downside instead of ranking initiatives only by optimistic expected ROI.
What you give it
Inputs split into evidence read 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 |
| exact_item_limit | integer ≥ 1, ≤ 24 | Your calibration | Optional |
| investments | array of objects (3 fields) | Evidence | Yes |
| max_detail_rows | integer ≥ 1, ≤ 500 | Numerical control | Optional |
| maximum_cvar_loss | number ≥ 0 | Your calibration | Yes |
| scenario_probabilities | array of number ≥ 3 items | Evidence | Yes |
| tail_probability | number ≥ 0.001, ≤ 0.5 | Your calibration | Optional |
Each investments
record
| Field | Type | Required |
|---|---|---|
| cost | number (≥ 0) | Yes |
| id | string (non-empty) | Yes |
| scenario_returns | array of number (≥ 3 items) | Yes |
{
"budget": 80,
"investments": [
{
"cost": 50,
"id": "growth",
"scenario_returns": [
-120,
20,
100,
180
]
},
{
"cost": 30,
"id": "resilience",
"scenario_returns": [
70,
40,
20,
10
]
},
{
"cost": 25,
"id": "efficiency",
"scenario_returns": [
15,
25,
35,
45
]
}
],
"maximum_cvar_loss": 10,
"scenario_probabilities": [
0.1,
0.2,
0.3,
0.4
],
"tail_probability": 0.1
} 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.
{
"assumptions": [
"Scenario returns are aligned joint worlds, not independently sampled marginals.",
"CVaR is computed from finance-owned monetary loss at the declared tail probability.",
"The no-investment portfolio is feasible; optimality is claimed only for exact enumeration."
],
"decision": "cvar_constrained_allocation_supported",
"method": "cvar_constrained_budget_allocation_v1",
"selected_investments": [
{
"cost": 30,
"expected_return": 25,
"investment_id": "resilience",
"standalone_cvar_loss": -10
},
{
"cost": 25,
"expected_return": 35,
"investment_id": "efficiency",
"standalone_cvar_loss": -15
}
],
"solver_diagnostics": {
"candidate_portfolios_evaluated": 8,
"feasible_candidate_count": 4,
"optimality_proven": true,
"portfolios_rejected_by_cvar": 3,
"scenario_count": 4,
"solver": "exact_enumeration"
},
"summary": {
"budget_slack": 25,
"expected_portfolio_return": 60,
"maximum_cvar_loss": 10,
"portfolio_cvar_loss": -55,
"portfolio_var_loss": -55,
"selected_count": 2,
"selected_investment_ids": [
"resilience",
"efficiency"
],
"tail_probability": 0.1,
"total_cost": 55
}, 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 Freeze incremental investment costs and aligned joint scenario returns, normalize finance-owned probabilities, and define the loss tail and maximum acceptable CVaR before optimization.
- 2 Evaluate budget-feasible portfolios, calculate discrete probability-weighted VaR and CVaR from joint portfolio returns, and reject every portfolio above the tail-loss ceiling.
- 3 Choose the remaining portfolio with greatest expected return, retain cash when nothing is safe, and disclose whether enumeration proves optimality or a candidate heuristic was used.
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.
- Scenario columns are coherent joint worlds preserving diversification, concentration, and common shocks; they are not independently sorted marginals.
- Loss, return, cost, time horizon, currency, probabilities, tail probability, and CVaR ceiling share one governed financial meaning.
- The recommendation is optimal only for its stated objective, feasible set, evidence, and solver guarantee; it is not a universal management optimum.
- CVaR summarizes the represented tail and cannot protect against omitted scenarios, model error, liquidity constraints, or causal misspecification.
- The optimizer must not relabel accounting estimates as realized cash or an exact-mode result as a guaranteed investment outcome.
Minimum evidence
- investments: required and organization-defined
- scenario_probabilities: at least 3 rows/items
- budget: required and organization-defined
- maximum_cvar_loss: 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 joint scenario return matrix preserving common shocks and diversification
- currency, horizon, incremental return, probabilities, probability ambiguity, capital budget, tail probability, maximum CVaR loss, and exact-search boundary
Calibration workflow
- 1 Define the management decision, target outcome, aggregate unit, privacy boundary, cadence, and prediction/intervention horizon for this organization.
- 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 Estimate statistical parameters on training history, but obtain costs, utilities, risk tolerance, practical-effect thresholds, capacity, and policy constraints from accountable decision owners.
- 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 Deploy only if the returned decision clears evidence, overlap, calibration, robustness, and guardrail checks; warning, unsupported, schema-gap, and fallback decisions are abstentions.
- 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 18 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": "maximize expected portfolio return while keeping" }
→ finds "allocate_budget_with_cvar_constraint"
gitrevio_capability_describe
{ "capability_id": "allocate_budget_with_cvar_constraint" }
→ returns the input schema and agent guidance shown on this page
gitrevio_capability_run
{ "capability_id": "allocate_budget_with_cvar_constraint", "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
Calculate risk adjusted npv
Discount aligned scenario cash-flow paths, expose positive-NPV probability and loss VaR/CVaR, then apply an explicit finance-owned CVaR penalty to test a risk-adjusted investment hurdle.
Construct deterministic project pareto frontier
Construct the exact practically nondominated frontier and successive Pareto layers across projects, products, vendors, or investments without hiding tradeoffs behind arbitrary score weights.
Construct stochastic pareto frontier
Construct a stochastic Pareto frontier from aligned joint criterion scenarios using scenario-wise frontier membership and pairwise practical chance dominance rather than dominance of point estimates.
Estimate cost of delay distribution
Translate probabilistic delivery delay into discounted contribution-value loss, permanent value decay, and governed penalties, including expected cost, tail cost, and the probability of material exposure.
Optimize budgeted initiative portfolio
Select the highest expected-value initiative portfolio under cash and multi-resource budgets while enforcing dependencies and mutual exclusions across aligned business scenarios.
Audit budget constraint binding
Audit whether a claimed budget constraint genuinely blocks value after dependency-feasible portfolio reallocation, separating current-plan inefficiency from scarcity with scenario CVaR and a discrete budget shadow price.