Price fixedincome security from yield to maturity
In R2017b, the specification of optional input arguments has changed. While the
previous ordered inputs syntax is still supported, it may no longer be supported in a
future release. Use the optional namevalue pair inputs: Period
,
Basis
, EndMonthRule
,
IssueDate
,FirstCouponDate
,
LastCouponDate
,
StartDate
,Face
,
CompoundingFrequency
, DiscountBasis
, and
LastCouponInterest
.
[
given bonds with SIA date parameters and yields to maturity, returns the clean
prices and accrued interest due.Price
,AccruedInt
] = bndprice(Yield
,CouponRate
,Settle
,Maturity
)
[
adds optional namevalue pair arguments.Price
,AccruedInt
] = bndprice(___,Name,Value
)
For SIA conventions, the following formula defines bond price and yield:
$$PV={\displaystyle \sum _{i=1}^{n}\left(\frac{CF}{{(1+\frac{z}{f})}^{TF}}\right)},$$
where:
PV = 
Present value of a cash flow. 
CF = 
Cash flow amount. 
z = 
Riskadjusted annualized rate or yield corresponding to a given cash flow. The yield is quoted on a semiannual basis. 
f = 
Frequency of quotes for the yield. Default is

TF = 
Time factor for a given cash flow. The time factor is computed
using the compounding frequency and the discount basis. If these
values are not specified, then the defaults are as follows:

The Basis
is always used to compute accrued
interest.
For ICMA conventions, the frequency of annual coupon payments determines bond price and yield.
[1] Krgin, D. Handbook of Global Fixed Income Calculations. Wiley, 2002.
[2] Mayle, J. "Standard Securities Calculations Methods: Fixed Income Securities Formulas for Analytic Measures." SIA, Vol 2, Jan 1994.
[3] Stigum, M., Robinson, F. Money Market and Bond Calculation. McGrawHill, 1996.