The security's settlement date. The security settlement date is the date after the issue date when the security is traded to the buyer.
The security's maturity date. The maturity date is the date when the security expires.
The security's annual coupon rate.
The security's price per $100 face value.
The security's redemption value per $100 face value.
The number of coupon payments per year. For
annual payments, frequency = 1; for semiannual, frequency = 2; for
quarterly, frequency = 4.
Optionalbasis: 0 | 1 | 2 | 3 | 4 = 0The type of day count basis to use. 0 or
omitted = US (NASD 30/360), 1 = actual/actual, 2 = actual/360, 3 =
actual/365, 4 = European 30/360.
The yield
Calculates the yield on a security that pays periodic interest. Use to calculate bond yield.
Remarks:
settlement,maturity,frequency, andbasisare truncated to integers.settlementormaturityis not a valid date, an error is thrown.rate<0, an error is thrown.pr≤0or ifredemption≤0, an error is thrown.frequencyis any number other than1,2, or4, an error is thrown.basis<0or ifbasis>4and error is thrown.settlement≥maturity, an error is thrown.yield = ((redemption/100 + rate/frequency) - (par/100 + (A/E * rate/frequency))) / (par/100 + (A/E * rate/frequency)) * (frequency * E) / DSR, where:A= number of days from the beginning of the coupon period to the settlement date (accrued days).DSR= number of days from the settlement date to the redemption date.E= number of days in the coupon period.