Skip to main content
Glama

Ariadne Nexus Institutional Quantitative Engine

Multi-Bond Portfolio Macro Shock, VaR/CVaR & Treasury Futures Immunization

run_portfolio_stress_test
Read-onlyIdempotent

Executes multi-position fixed-income portfolio stress testing across customizable macroeconomic rate shocks (parallel benchmark shifts in bps, rating-weighted credit spread widening in bps, yield curve twists: PARALLEL/STEEPENER/FLATTENER/INVERSION, and liquidity haircuts), computing aggregate portfolio DV01, 1-year 95%/99% parametric Value-at-Risk (VaR), 99% Expected Shortfall (CVaR), position-level P&L attribution, 10-Year Treasury Note futures (ZN) short hedge ratios, and portfolio-wide zero-cost European collar strikes. Use when: stress-testing a multi-bond portfolio under interest-rate or credit-spread shocks, calculating portfolio VaR/CVaR, or sizing 10Y Treasury futures duration hedges. Do not use when: pricing a single bond CUSIP without a macro shock scenario (use get_cusip_valuation instead) or checking single-CUSIP FINRA TRACE dealer prints (use get_debt_radar instead). Behavior: Read-only, deterministic portfolio simulation ($2.50 USD per call via HTTP header x-api-key or x-payment-token; defaults to a 3-bond institutional benchmark portfolio if portfolio array is omitted; returns an x402/MPP paymentChallenge without charging if credentials are omitted).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "run_portfolio_stress_test"
  }
}

Input Schema

NameRequiredDescriptionDefault
scenarioNoMacroeconomic stress scenario parameters applied across the portfolio. Defaults to a +100 bps parallel rate shock and +75 bps credit spread widening if omitted.
portfolioNoArray of fixed-income bond positions to stress test (1 to 100 positions). If omitted or empty, defaults to a 3-position $10M institutional benchmark portfolio (UST 5Y, AAPL, GS).

Output Schema

NameRequiredDescriptionDefault
toolYesExecuted tool identifier ("run_portfolio_stress_test").
receiptNoCryptographic payment or API key settlement receipt ID.
value_at_riskYesParametric 1-year Value-at-Risk (95% and 99%) and Conditional VaR (99% Expected Shortfall) in USD.
portfolio_summaryYesPre-shock aggregate portfolio valuation and duration metrics.
stress_test_resultsYesPost-shock portfolio valuation, P&L loss, and resilience status.
macro_scenario_appliedNoNormalized macro shock parameters applied.
immunization_and_hedgingYesActionable 10Y Treasury Note futures (ZN) duration hedge and zero-cost option collar structure.
position_level_breakdownYesPer-CUSIP pre-shock and post-shock valuation and P&L attribution array.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • removedInput schema / properties / apiKey
      Removed value: -{
      -  "description": "Optional Ariadne Nexus Developer API key (\"nexus_live_...\") for authenticated execution. May also be passed via the x-api-key HTTP header.",
      -  "type": "string"
      -}
    • removedInput schema / properties / paymentToken
      Removed value: -{
      -  "description": "Optional Stripe Shared Payment Token (\"spt_...\") or settled x402 payment receipt hash (\"rcpt_...\") for pay-per-call execution ($2.50 USD).",
      -  "type": "string"
      -}
  2. Changed23 schema fields changed
    • changedInput schema / properties / apiKey / description
      Previous value: -"Optional Ariadne Developer API key"New value: +"Optional Ariadne Nexus Developer API key (\"nexus_live_...\") for authenticated execution. May also be passed via the x-api-key HTTP header."
    • changedInput schema / properties / paymentToken / description
      Previous value: -"Optional Stripe Shared Payment Token"New value: +"Optional Stripe Shared Payment Token (\"spt_...\") or settled x402 payment receipt hash (\"rcpt_...\") for pay-per-call execution ($2.50 USD)."
    • changedInput schema / properties / portfolio / description
      Previous value: -"Array of bond positions: [{ cusip, issuer, face_value_usd, market_price_pct, coupon_rate_pct, maturity_years, credit_rating, sector }]"New value: +"Array of fixed-income bond positions to stress test (1 to 100 positions). If omitted or empty, defaults to a 3-position $10M institutional benchmark portfolio (UST 5Y, AAPL, GS)."
    • changedInput schema / properties / portfolio / items / properties / coupon_rate_pct / description
      Previous value: -"Annual coupon rate %"New value: +"Annual coupon rate as a percentage (e.g., 4.25)."
    • changedInput schema / properties / portfolio / items / properties / credit_rating / description
      Previous value: -"Credit rating (AAA, AA, A, BBB, BB, B, CCC)"New value: +"Composite credit rating governing spread shock beta (\"AAA\", \"AA\", \"A\", \"BBB\", \"BB\", \"B\", \"CCC\", \"NR\")."
    • changedInput schema / properties / portfolio / items / properties / cusip / description
      Previous value: -"CUSIP identifier"New value: +"9-character CUSIP identifier for the position (e.g., \"912828ZG2\")."
    • changedInput schema / properties / portfolio / items / properties / face_value_usd / description
      Previous value: -"Face value in USD"New value: +"Par notional face value of the position in USD (e.g., 5000000)."
    • changedInput schema / properties / portfolio / items / properties / issuer / description
      Previous value: -"Issuer name"New value: +"Issuer legal or display name (e.g., \"U.S. Treasury 5Y\", \"Apple Inc.\")."
    • changedInput schema / properties / portfolio / items / properties / market_price_pct / description
      Previous value: -"Trading price as % of par"New value: +"Current clean market price as a percentage of par (e.g., 98.50)."
    • changedInput schema / properties / portfolio / items / properties / maturity_years / description
      Previous value: -"Maturity in years"New value: +"Remaining maturity in years (minimum 0.25, e.g., 4.8)."
    • changedInput schema / properties / portfolio / items / properties / sector / description
      Previous value: -"Industry sector"New value: +"Industry or asset sector classification (e.g., \"GOVERNMENT\", \"TECHNOLOGY\", \"FINANCIALS\")."
    • changedInput schema / properties / scenario / description
      Previous value: -"Custom macro scenario parameters"New value: +"Macroeconomic stress scenario parameters applied across the portfolio. Defaults to a +100 bps parallel rate shock and +75 bps credit spread widening if omitted."
    • addedInput schema / properties / scenario / properties / benchmark_rate_shock_bps / default
      Added value: +100
    • changedInput schema / properties / scenario / properties / benchmark_rate_shock_bps / description
      Previous value: -"Parallel benchmark yield change in basis points"New value: +"Parallel risk-free benchmark interest rate shift in basis points (e.g., 100 for +100 bps hike, -50 for -50 bps cut; default: 100)."
    • addedInput schema / properties / scenario / properties / credit_spread_widening_bps / default
      Added value: +75
    • changedInput schema / properties / scenario / properties / credit_spread_widening_bps / description
      Previous value: -"Spread widening in basis points"New value: +"Baseline BBB credit spread widening shock in basis points, scaled by rating beta (default: 75)."
    • addedInput schema / properties / scenario / properties / curve_twist / default
      Added value: +"PARALLEL"
    • changedInput schema / properties / scenario / properties / curve_twist / description
      Previous value: -"Yield curve twist"New value: +"Yield curve shape regime applied across maturities (\"PARALLEL\", \"STEEPENER\", \"FLATTENER\", or \"INVERSION\"; default: \"PARALLEL\")."
    • addedInput schema / properties / scenario / properties / liquidity_haircut_pct / default
      Added value: +1.5
    • changedInput schema / properties / scenario / properties / liquidity_haircut_pct / description
      Previous value: -"Liquidity haircut %"New value: +"Bid-side market illiquidity haircut percentage deducted from post-shock value (e.g., 1.5 for 1.5%; default: 1.5)."
    • addedInput schema / properties / scenario / properties / name / default
      Added value: +"HAWKISH_RATE_SHOCK_100BPS"
    • changedInput schema / properties / scenario / properties / name / description
      Previous value: -"Scenario identifier"New value: +"Descriptive scenario identifier (default: \"HAWKISH_RATE_SHOCK_100BPS\")."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "immunization_and_hedging": {
      +      "description": "Actionable 10Y Treasury Note futures (ZN) duration hedge and zero-cost option collar structure.",
      +      "type": "object"
      +    },
      +    "macro_scenario_applied": {
      +      "description": "Normalized macro shock parameters applied.",
      +      "type": "object"
      +    },
      +    "portfolio_summary": {
      +      "description": "Pre-shock aggregate portfolio valuation and duration metrics.",
      +      "properties": {
      +        "portfolio_convexity": {
      +          "description": "Market-value-weighted convexity.",
      +          "type": "number"
      +        },
      +        "portfolio_modified_duration_years": {
      +          "description": "Market-value-weighted modified duration in years.",
      +          "type": "number"
      +        },
      +        "portfolio_total_dv01_usd": {
      +          "description": "Total portfolio dollar duration (DV01) in USD per 1bp shift.",
      +          "type": "number"
      +        },
      +        "total_face_value_usd": {
      +          "description": "Aggregate par value in USD.",
      +          "type": "number"
      +        },
      +        "total_market_value_usd": {
      +          "description": "Aggregate pre-shock market value in USD.",
      +          "type": "number"
      +        },
      +        "total_positions": {
      +          "description": "Number of bond positions evaluated.",
      +          "type": "number"
      +        },
      +        "weighted_ytm_pct": {
      +          "description": "Market-value-weighted portfolio yield-to-maturity %.",
      +          "type": "number"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "position_level_breakdown": {
      +      "description": "Per-CUSIP pre-shock and post-shock valuation and P&L attribution array.",
      +      "items": {
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "receipt": {
      +      "description": "Cryptographic payment or API key settlement receipt ID.",
      +      "type": "string"
      +    },
      +    "stress_test_results": {
      +      "description": "Post-shock portfolio valuation, P&L loss, and resilience status.",
      +      "properties": {
      +        "capital_preservation_status": {
      +          "description": "Risk threshold classification.",
      +          "enum": [
      +            "RESILIENT",
      +            "VULNERABLE_DURATION_EXP"
      +          ],
      +          "type": "string"
      +        },
      +        "portfolio_loss_pct": {
      +          "description": "Percentage change in portfolio market value.",
      +          "type": "number"
      +        },
      +        "portfolio_pnl_usd": {
      +          "description": "Net dollar profit/loss under the stress shock in USD.",
      +          "type": "number"
      +        },
      +        "post_shock_market_value_usd": {
      +          "description": "Aggregate post-shock market value in USD.",
      +          "type": "number"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "tool": {
      +      "description": "Executed tool identifier (\"run_portfolio_stress_test\").",
      +      "type": "string"
      +    },
      +    "value_at_risk": {
      +      "description": "Parametric 1-year Value-at-Risk (95% and 99%) and Conditional VaR (99% Expected Shortfall) in USD.",
      +      "properties": {
      +        "annualized_portfolio_volatility_pct": {
      +          "description": "Annualized portfolio return volatility percentage.",
      +          "type": "number"
      +        },
      +        "conditional_var_cvar_99_usd": {
      +          "description": "99% Conditional VaR (Expected Shortfall) in USD.",
      +          "type": "number"
      +        },
      +        "parametric_var_95_1y_usd": {
      +          "description": "95% confidence 1-year parametric VaR in USD.",
      +          "type": "number"
      +        },
      +        "parametric_var_99_1y_usd": {
      +          "description": "99% confidence 1-year parametric VaR in USD.",
      +          "type": "number"
      +        }
      +      },
      +      "type": "object"
      +    }
      +  },
      +  "required": [
      +    "tool",
      +    "portfolio_summary",
      +    "stress_test_results",
      +    "value_at_risk",
      +    "immunization_and_hedging",
      +    "position_level_breakdown"
      +  ],
      +  "type": "object"
      +}
  3. Added

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, but the description adds material context beyond them: $2.50 USD per call, auth via x-api-key or x-payment-token, the 3-bond benchmark default when portfolio is omitted, and the x402/MPP paymentChallenge returned without charging when credentials are missing. It does not mention latency, rate limits, or what happens when an invalid CUSIP is supplied, which keeps it below a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The opening sentence front-loads the verb, the resource and the output set, and the Use when / Do not use when / Behavior blocks give predictable structure. The Behavior sentence is an overloaded run-on packing cost, auth, defaults and payment failure into one line, and the title duplicates much of the opening clause.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With two nested-object parameters, 100% schema coverage and an output schema, the description does not need to explain return values, and it still declares cost, auth and default-portfolio fallback. Minor gaps remain around error handling for malformed positions and whether the 1-100 position cap is enforced at the tool boundary.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so every scenario field (curve_twist semantics, liquidity_haircut_pct meaning, credit_spread_beta scaling) and every position field is already documented inline. The description restates the shock dimensions and the rating-weighted spread logic but adds no format or validation detail beyond the schema, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb and resource ('Executes multi-position fixed-income portfolio stress testing') and enumerates the exact outputs: DV01, 1y 95%/99% VaR, 99% CVaR, P&L attribution, ZN hedge ratios, collar strikes. It explicitly separates itself from get_cusip_valuation (single CUSIP pricing) and get_debt_radar (single-CUSIP TRACE prints), so an agent can route without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides an explicit 'Use when' block covering three concrete trigger scenarios (rate/credit-spread shock, VaR/CVaR calculation, 10Y futures hedge sizing) and a 'Do not use when' block naming the two correct alternatives and the conditions that select them. This is the textbook when/when-not/alternative structure.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.