Skip to main content
Glama

Ariadne Nexus 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 apiKey or paymentToken; defaults to a 3-bond institutional benchmark portfolio if portfolio array is omitted; returns an x402/MPP paymentChallenge without charging if credentials are omitted).

Input Schema

NameRequiredDescriptionDefault
apiKeyNoOptional Ariadne Nexus Developer API key ("nexus_live_...") for authenticated execution. May also be passed via the x-api-key HTTP header.
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).
paymentTokenNoOptional Stripe Shared Payment Token ("spt_...") or settled x402 payment receipt hash ("rcpt_...") for pay-per-call execution ($2.50 USD).

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. 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"
      +}
  2. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare read-only, idempotent, non-destructive, closed-world, but the description goes well beyond them: it discloses the $2.50 per-call cost, the apiKey/paymentToken auth paths, the deterministic simulation characteristic, the fallback to a 3-bond benchmark portfolio when the array is omitted, and the x402/MPP paymentChallenge-without-charging behavior. This is the payment and fallback context an agent needs and cannot get from structured fields.

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 'Use when / Do not use when / Behavior' structure is well front-loaded and easy to scan, with no filler. The opening sentence is extremely long and packs many analytics into one clause chain, which costs a little readability but not correctness.

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

Completeness5/5

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

For a nested-schema tool of this complexity, the description covers purpose, selection, payment/auth behavior, defaults, and cost, while annotations carry the safety profile and the output schema carries return values. An agent has everything required to decide, authenticate, and invoke correctly.

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 parameter (apiKey, scenario fields, portfolio positions, paymentToken) is already documented in the schema, which sets the baseline at 3. The description restates the shock dimensions and the benchmark-portfolio default without adding syntax or constraints the schema lacks, so it adds only marginal value here.

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?

States a specific verb and resource (executes multi-position fixed-income portfolio stress testing under named macro shocks) and enumerates the analytic outputs (DV01, VaR, CVaR, P&L attribution, ZN hedge ratios, collar strikes). It explicitly names the sibling tools it is not — get_cusip_valuation and get_debt_radar — so an agent can disambiguate without opening any 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 explicit 'Use when' conditions (rate/credit-spread shocks, portfolio VaR/CVaR, sizing 10Y Treasury futures hedges) paired with 'Do not use when' exclusions that name the correct alternatives for single-CUSIP pricing and TRACE prints. Nothing about tool selection is left to inference.

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.

Resources