Financial Toolbox
  Go to function:
    Search    Help Desk 
yldbond    Examples   See Also

Yield to maturity of bond.

Syntax

Arguments

sd
Settlement date. A vector of serial date numbers or date strings. sd must be earlier than or equal to md.
md
Maturity date. A vector of serial date numbers or date strings.
rv
Redemption or face value of the bond. A vector.
price
Price of the bond. A vector.
cpn
Coupon rate of the bond. A vector of decimal fractions. Default = 0.
per
Coupons per year of the bond. A vector of integers. Allowed values are 1, 2, 3, 4, 6, and 12. Default = 2.
basis
Day-count basis of the bond. A vector of integers.
0 = actual/actual (default), 1 = 30/360, 2 = actual/360, 3 = actual/365.
maxiter
Maximum number of iterations used in Newton's method to derive the yield to maturity. An integer. Default = 50. Enter an empty matrix [] to accept the default and also enter values for eom.
eom
End-of-month flag. A vector. This flag applies only when the maturity date md is an end-of-month date for a month having 30 or fewer days. 0 = ignore flag, meaning that a bond's coupon payment date is always the same day of the month. 1 = set flag (default), meaning that a bond's coupon payment date is always the last day of the month.
Vector arguments must have consistent dimensions, or they must be scalars.

Description

yld = yldbond(sd, md, rv, price, cpn, per, basis, maxiter, eom) returns the yield to maturity of coupon and zero-coupon bonds using a Newton-Raphson iterative method. This function also applies to pure discount securities by setting cpn = 0. To calculate the spot rate of a security, set per = 1.

Example

Given data for three bonds with the same maturity date:

Execute the function.

See Also

acrubond, prbond, ylddisc, yldmat, yldoddf, yldoddfl, yldoddl, yldtbill and functions for Term Structure of Interest Rates

Reference

Mayle, Standard Securities Calculation Methods, Volumes I-II, 3rd edition. Formulas 5, 7.



[ Previous | Help Desk | Next ]