A Solver Is Only as Good as Its Residual

Tam
Tam
·Founder & AI Builder·2026-10-23
Yield to Maturity: Numerical Convergence cover

Yield is the answer to a question nobody asks directly

Yield to maturity is the single rate that reproduces a bond's price. For the first bond it comes out at 433.77 basis points over the curve, and the check that matters is the residual: repricing at the solved yield returns the market price.

A bond price is a sum: coupon payments and principal, each discounted at a rate. Yield to maturity is the single rate that, applied to every cash flow, reproduces the observed price.

It has no closed form. You solve for it, and the solution is only as good as the check that follows.

The two sides of the solve

For each of the seven bonds the workbook computes a yield from the price and compares it with an independent route: the curve rate at the bond's own maturity plus the bond's spread.

CheckWhat it compares
Solved yieldYield from the price
Independent routeCurve rate at maturity + spread in basis points
DifferenceThe two, in basis points
Solver residualPrice recomputed at the solved yield, against the curve price

The first bond's spread is 433.77 basis points, and the solved yield lands on it. The agreement is a cross-check on the *input* convention: yield and curve are consistent with each other.

The residual is the deeper check. Repricing at the solved yield must return the market price to the solver tolerance. A yield that is 2 basis points off produces a price that is visibly wrong at the fourth decimal, and the residual catches it before anyone uses the yield for anything. It proves the solver converged, not that the curve or the spread is right.

MODEL sheet, cash-flow engine: each bond's coupon and principal flows discounted off the spot curve to a clean price
The price side of the yield solve. Every yield in the next section is checked by repricing to this number.

Why a residual beats a tolerance on the yield

Comparing a solved yield with a reference yield has a weakness: both can be wrong by the same amount if they share an assumption.

Repricing does not share that weakness. The price is the input; discounting is the definition. If the solver returns a yield that does not reproduce the price, the residual is non-zero regardless of what any reference yield says.

This is the same structure as every convergence check in the series: two routes, one number, subtract. Here the routes are "solve for the rate" and "discount at that rate", which are inverse operations. Agreement is therefore a strong test of both. The derivatives section runs the same inversion in implied-volatility solver stability, where a Newton step replaces the discount-rate root.

What the solve does not establish

That the yield is meaningful. YTM assumes the bond is held to maturity, every coupon is reinvested at the same yield, and the curve is flat at that yield. For a bond with a 433 basis point spread, the reinvestment assumption is doing a lot of work.

That the spread is right. It is an input. A spread of 433.77bp is reproduced faithfully; whether 433.77bp is the market spread is not a question the workbook can answer.

That the price is clean. Accrued interest, settlement and day count are all simplified out, and the limits sheet lists them. A dirty price and a clean price differ by the accrued coupon, and the yield differs with it.

What to Take Away From the Yield Solve

Every yield in the sheet is accompanied by the price it reproduces. That pairing is the whole discipline: a rate without its residual is a number someone asked a solver for, and solvers return numbers whether or not they have converged.

The same principle drives the duration article, with three durations each carrying a stated definition, and the shock P&L test, where a full reprice is the residual for a duration-plus-convexity prediction. Convexity is the second-order term this article ignores, and key-rate duration is what the exposure looks like when the curve is not flat.

The solved yield and the price it reproduces are separate cells in Mica, so a solver that stopped early shows up immediately. That pairing is also the layout the Excel model guide uses for every checked quantity.

This model-validation series uses synthetic cases for method demonstration. It is not investment, tax or legal advice.

Last updated: 2026-11-01 · Internally checked; not independently audited. · Methodology & review

Tam
Tam

Tam is the Founder & CEO of MINDLINK TEC LTD, an AI creator and product builder building creative AI tools including Mica and Bobi.


Mica

Local AI for smarter Spreadsheets. Automate Excel workflows using natural language.

Contact

Email: service@mindlink.tools

Company: MINDLINK TEC LTD

© 2026 MINDLINK TEC LTD. All rights reserved.