## Yield

Function

**within Bond with keys Bond Yield keys returns the theoretical bond yield(s) to maturity (same as internal rate of return) of the referenced bond(s) as of a given reference date**

*Yield*

*Tˢ*Here the yield is defined as the single rate

**that when used to discount all future bond cash flows down to time**

*r***, the resulting present value equals a given dirty bond price at the same time**

*Tˢ*

*Tˢ*There exist 2 distinct methods for obtaining the yield:

**From a given clean price as of time**

*1)***, which is used to imply the needed respective dirty price.**

*Tˢ***From a given discounting yield curve that is used to calculate the needed dirty price at time**

*2)*

*Tˢ*If the settlement date

**is not explicitly given, it will be set to the bond's settlement date as implied by a trade transaction assumed to occur on the trade date**

*Tˢ***(typically today).**

*T₀*PRECAUTION: This function treats the referenced bond as if it were a fixed rate bond even if this is not the case!

All index-linked cash flows are treated as fixed cash flows that pay the amount forecasted by the corresponding curve.