Skip to main content
Glama
joselillotrax-cell

fixed-income

Solve a bond's yield from its price

yield_from_price_tool

Solve for the yield to maturity implied by a bond's quoted market price. Use when you have a price and need the derived yield, with built-in checks validating the result.

Instructions

Solve for the yield to maturity implied by a market price.

Solved by bisection, which cannot converge on a value that satisfies the iteration without solving the pricing equation. The returned checks verify the ordering of coupon, current yield and yield to maturity, which alone rules out a large class of wrong answers.

This is the usual starting point: market prices are observable, yields are derived.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
day_countNoDay-count convention used for accrual. ACT/ACT ICMA is the standard for most government and corporate bonds.ACT/ACT ICMA
face_valueYesRedemption amount in currency units, e.g. 1000.
issue_dateYesIssue (dated) date in ISO format, e.g. 2024-03-15.
maturity_dateYesRedemption date in ISO format, e.g. 2029-03-15.
coupon_rate_pctYesAnnual coupon rate as a PERCENTAGE. Pass 4.0 for a 4% coupon, not 0.04. Zero for a zero-coupon bond.
settlement_dateYesValuation date in ISO format. Must fall between issue and maturity, e.g. 2025-09-11.
payments_per_yearYesCoupon payments per year: 1 annual, 2 semi-annual, 4 quarterly, 12 monthly. Most government bonds pay semi-annually.
clean_price_pct_of_faceYesQuoted clean price as a PERCENTAGE OF FACE, excluding accrued interest. Pass 97.80 for a bond quoted at 97.80%. This is not a currency amount.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.2

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations, the description carries the full burden for behavioral disclosure. It does reveal the bisection algorithm and the returned ordering checks, but the algorithm sentence is confusing and it does not state failure behavior or edge cases. This is adequate but not fully transparent.

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

Conciseness3/5

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

The first and third sentences are useful and front-loaded, but the middle sentence about bisection is syntactically tangled and adds confusion rather than clarity. The description is not overly long, but not every sentence earns its place.

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?

All eight parameters are fully documented in the schema, an output schema exists, and the description adds workflow positioning and algorithmic context. This is sufficient for correct invocation; only the opaque failure limitations keep it from being fully complete.

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%, and each parameter already includes clear units, formats, and constraints. The description adds no parameter-specific detail beyond the schema, but given full schema coverage, baseline 3 is appropriate.

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 first sentence states a specific operation and object: 'Solve for the yield to maturity implied by a market price.' This clearly distinguishes the tool from its inverse sibling price_from_yield_tool, and the title reinforces the same purpose.

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

Usage Guidelines4/5

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

The closing sentence gives clear context: 'This is the usual starting point: market prices are observable, yields are derived.' This conveys when the tool is appropriate, though it does not explicitly name alternatives or state when not to use it, so it falls just short of full routing guidance.

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