OpenBI Docs Buy

ODDFYIELD

The yield of a security whose first period is short or long.

Group: Financial. Compatible with DAX.

Syntax

ODDFYIELD ( <settlement>, <maturity>, <issue>, <first_coupon>, <rate>, <pr>, <redemption>, <frequency> [, <basis>] )
ParameterTypeDescription
settlementDateThe day the buyer takes the security over; later than its issue.
maturityDateThe day the security ends and its face value is repaid.
issueDateThe day the security was issued and began to earn interest.
first_couponDateThe day of the first coupon; it must be one of the coupon dates counted back from maturity.
rateNumberThe coupon: the interest paid a year, as a decimal of the face value (0.04 for 4 %).
prNumberWhat the buyer pays, in percent of the face value: 98.5 for 98.5 %.
redemptionNumberWhat is repaid at maturity, in percent of the face value: usually 100.
frequencyWhole numberCoupons a year: 1 for yearly, 2 for half-yearly, 4 for quarterly.
basisWhole number
optional
The day count, by number: US 30/360 (0, when left out), actual/actual (1), actual/360 (2), actual/365 (3) or European 30/360 (4).

Returns

Number. The yield a year, as a decimal.

Remarks

  • The first period, from the issue to the first coupon, may be shorter or longer than the regular ones; its coupon is prorated by its length on the day count chosen.
  • It is the yield at which ODDFPRICE gives the price, found by trial; when no yield gives it, the result is an error.
  • The dates must come in the order issue, settlement, first coupon, maturity; otherwise, or when the first coupon is not on maturity's schedule, the result is an error.
  • A rate below 0, or a price or redemption of 0 or less, is an error. The dates are taken as whole days. frequency and basis are rounded to whole numbers first; a frequency other than 1, 2 or 4, or a basis outside 0 to 4, is an error.

Examples

The yield of a bond bought at 84.50

The same dates as on the ODDFPRICE page, with 5.75 % coupons, on 30/360.

EVALUATE
ROW (
    "Yield", ODDFYIELD ( DATE ( 2008, 11, 11 ), DATE ( 2021, 3, 1 ), DATE ( 2008, 10, 15 ), DATE ( 2009, 3, 1 ), 0.0575, 84.5, 100, 2, 0 )
)
Yield
0.0772455415978173

A long first period

Issued on 1 December 2007 instead, fifteen months before the first coupon, on actual/360. The yield is found by trial, so it is rounded here to 10 decimals.

EVALUATE
ROW (
    "Yield", ROUND ( ODDFYIELD ( DATE ( 2008, 11, 11 ), DATE ( 2021, 3, 1 ), DATE ( 2007, 12, 1 ), DATE ( 2009, 3, 1 ), 0.0575, 84.5, 100, 2, 2 ), 10 )
)
Yield
0.0769693175

ODDFPRICE, ODDLYIELD, YIELD.

Last updated · OpenBI Studio 0.3.74