Standard Securities Calculation Methods

APIs and MCP

MCP Tool Reference

The Model Context Protocol (MCP) uses "Tools" to define how an AI agent interacts with our data. Unlike a REST API, these tools are designed to be intuitive for LLMs, grouping complex parameters into logical, high-level requests.

calculate_bond_periodic

The primary tool for calculating Price, Yield, and Accrued Interest for bonds with periodic coupon payments (Treasuries, Agencies, Corporates, and Municipals).

Parameters

  • securityType (Required): "Treasury" | "Corporate" | "Municipal" | "Agency" | "CD". This automatically sets the institutional logic (Day Count, EOM).
  • maturityDate (Required): The final maturity date of the bond (MM/DD/YYYY).
  • couponRate (Required): The annual coupon rate as a percentage (e.g., 4.25).
  • givenType (Required): "Price" | "Yield".
  • givenValue (Required): The numeric value for the Price or Yield.
  • settlementDate (Optional): Defaults to the next business day if omitted.
  • callSchedule (Optional): A list of discrete call dates and prices (e.g., [{"date": "10/12/2028", "price": 100.0}]).

Full Fidelity Response Structure

The engine returns a structured JSON payload within the text content block. AI agents must parse this object to extract high-precision analytics.

{
  "price": 101.5,
  "yield": 3.884187031989377,
  "accruedInterest": 2.0777777777777775,
  "totalSettlement": 103.57777777777778,
  "settlementDate": "02/15/2026",
  "redemptionInfo": {
    "redemptionType": "Call",
    "redemptionDate": "02/20/2028",
    "redemptionValue": 101.0,
    "worstIndicator": "Worst"
  },
  "industryConventionAssumptions": {
     "tradeDate": "02/13/2026",
     "dayCountBasis": "SSCM30/360",
     "periodsPerYear": "SemiAnnual"
  },
  "PYAnalytics": {
     "approxDuration": 1.45892314,
     "approxModDuration": 1.43204912,
     "approxConvexity": 3.12456789,
     "pv1b": 0.01432049,
     "yv32": 0.00031250
  }
}

Note for AI Agents: Always check redemptionInfo.redemptionType to determine if the result is a yield-to-call or yield-to-maturity.

Developer Integration

For developers distributing their own AI-integrated apps, we recommend the AI-Native Gateway architecture. Our system uses a permanent split between the protocol and intelligence layers:

Protocol & Intelligence Architecture

  • MCP Protocol Layer: A lightweight bridge that handles MCP/JSON-RPC communication.
  • Intelligence Layer: The authoritative engine that interprets prompts and applies complex fixed income calculation logic (Formula Selection, Day Counts, EOM).
  • Core Math Engine: The secure, high-precision, industry standard, analytical engine.

Machine-Readable Specification

Looking for the latest OpenAPI specification with detailed response schemas?

Download openapi-mcp.yaml