OpenBI Docs Buy

ODDLYIELD

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

Group: Financial. Compatible with DAX.

Syntax

ODDLYIELD ( <settlement>, <maturity>, <last_interest>, <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.
last_interestDateThe day of the last coupon before maturity; before settlement.
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 last period, from the last coupon to maturity, may be shorter or longer than the regular ones; the coupon paid at maturity is prorated by its length.
  • With one payment left, the yield follows directly from the price: the gain to maturity over what is paid, spread over the time left.
  • The dates must come in the order last coupon, settlement, maturity; otherwise 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

Bought at 99.875

The bond of the ODDLPRICE page, bought on the same day at 99.875.

EVALUATE
ROW (
    "Yield", ODDLYIELD ( DATE ( 2008, 2, 7 ), DATE ( 2008, 6, 15 ), DATE ( 2007, 10, 15 ), 0.0375, 99.875, 100, 2, 0 )
)
Yield
0.0405927835051545

ODDLPRICE, ODDFYIELD, YIELD.

Last updated · OpenBI Studio 0.3.74