Formualizer Docs

YIELD

Returns annual yield for a coupon-paying security from its market price.

YIELD solves for the annual rate that makes PRICE(...) match the input pr.

The Formualizer engine in this repository at 0.15.0 plus unreleased changes computes the example results. Known differences from Excel are listed on this page.

Syntax

=YIELD(settlement, maturity, rate, pr, redemption, frequency, [basis])

Arguments

ArgumentTypeRequiredDefault
settlementnumberRequired—
maturitynumberRequired—
ratenumberRequired—
prnumberRequired—
redemptionnumberRequired—
frequencynumberRequired—
basisnumberOptional—

Remarks

  • Date inputs are spreadsheet serial dates and must satisfy maturity > settlement.
  • rate is coupon rate (annual decimal), pr is price per 100 face value, and redemption is redemption per 100; pr and redemption must be positive.
  • frequency must be 1 (annual), 2 (semiannual), or 4 (quarterly).
  • basis codes: 0=US(NASD)30/360, 1=Actual/Actual, 2=Actual/360, 3=Actual/365, 4=European30/360.
  • Result is an annualized decimal yield (for example, 0.05 means 5%).

Error cases

  • This implementation uses Newton-Raphson iteration; if it cannot converge, it returns #NUM!.

Examples

Solve for the yield of a semiannual bond purchased below par.

Formula =YIELD(DATE(2024,2,20),DATE(2027,1,15),0.05,98,100,2)

Expected result 0.0575590195333683

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Use actual days and a 365-day convention for accrued interest.

Formula =YIELD(DATE(2024,2,20),DATE(2027,1,15),0.05,98,100,2,3)

Expected result 0.0575628142273999

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Compare the yield with the coupon when the bond is purchased at par.

Formula =YIELD(DATE(2024,2,20),DATE(2027,1,15),0.05,100,100,2)

Expected result 0.0499819523708495

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

The bond price must be positive.

Formula =YIELD(DATE(2024,2,20),DATE(2027,1,15),0.05,0,100,2)

Expected result #NUM!

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Par price implies coupon-rate yield

Formula =YIELD(DATE(2024,3,1), DATE(2026,3,1), 0.05, 100, 100, 2, 0)

Expected result 0.05

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Find the yield of a 5% bond trading at 97.5 per 100 of face value.

Formula =YIELD(DATE(2024,2,15), DATE(2027,2,15), 0.05, 97.5, 100, 2, 0)

Expected result 0.0592179160028713

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

FAQ

What does the returned YIELD represent?

It is an annualized decimal yield (for example, 0.06 means 6% per year).

When does YIELD return #NUM! besides invalid inputs?

The Newton-Raphson solve can fail to converge or hit an unstable derivative; in those cases it returns #NUM!.

Implementation

Engine source

On this page