Calculates the yield on a security that pays periodic interest. Use to
calculate bond yield.
Remarks:
The settlement date is the date a buyer purchases a coupon, such as a bond.
The maturity date is the date when a coupon expires. For example, suppose a
30-year bond is issued on January 1, 2008, and is purchased by a buyer six
months later. The issue date would be January 1, 2008, the settlement date
would be July 1, 2008, and the maturity date would be January 1, 2038,
which is 30 years after the January 1, 2008, issue date.
settlement, maturity, frequency, and basis are truncated to
integers.
If settlement or maturity is not a valid date, an error is thrown.
If rate < 0, an error is thrown.
If price ≤ 0 or if redemption ≤ 0, an error is thrown.
If frequency is any number other than 1, 2, or 4, an error is
thrown.
If basis < 0 or if basis > 4 and error is thrown.
If settlement ≥ maturity, an error is thrown.
If there is one coupon period or less until redemption, the yield is
calculated as follows: 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.
If there is more than one coupon period until redemption, the yield is
calculated through a hundred iterations. The resolution uses the Newton
method. The yield is changed until the estimated price given the yield is
close to price.
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.price≤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.