calculate the clean price of a bond
CleanPrice(bond, yield, compounding, opts)
fixed or floating rate bond data structure; bond
non-negative constant; desired yield
Simple, Continuous, Compounded, or SimpleThenCompounded; the underlying compounding type
equations of the form option = value where option is evaluationdate; specify options for the CleanPrice command
evaluationdate = a string containing a date specification in a format recognized by ParseDate or a Date data structure -- This option specifies the evaluation date. By default this is set to the global evaluation date (see EvaluationDate).
The CleanPrice command computes the clean price of a bond, given its yield. Clean price does not include any accrued interest that has accumulated since the last coupon payment.
The parameter bond is either a fixed coupon bond or floating rate bond. The parameter yield is the desired yield.
SetEvaluationDate("November 25, 2006"):
November 25, 2006
Settings([daycounter = Historical, settlementdays = 0, businessdayconvention = Unadjusted, compounding = Continuous]);
Consider a zero-coupon bond with a face value of 100 maturing in one year.
bond1 := ZeroCouponBond(100, 5, Years):
price1 := CleanPrice(bond1, 0.05, Compounded);
100*DiscountFactor(0.05, 5, compounding = Annual);
yield1 := YieldFromCleanPrice(bond1, price1);
EquivalentRate(yield1, Continuous, Annual);
yield1 := YieldFromCleanPrice(bond1, price1, Compounded);
Consider a 3-year bond with a face value of 100 that pays a fixed coupon of 3 percent issued on March 15, 2005.
Settings(daycounter = Thirty360European):
principal2 := 100:
coupon2 := 0.03:
rate2 := 0.05:
bond2 := FixedCouponBond(principal2, 3, Years, coupon2, issuedate = "March 17, 2005"):
Calculate the bond's clean price given its yield and vice-versa.
yield2 := YieldFromCleanPrice(bond2, 100, Compounded);
cleanprice2 := CleanPrice(bond2, yield2, Compounded);
dirtyprice2 := DirtyPrice(bond2, rate2);
Consider the same bond but with semi-annual coupons.
bond3 := FixedCouponBond(principal2, 3, Years, coupon2, issuedate = "March 17, 2005", frequency = Semiannual):
yield3 := YieldFromCleanPrice(bond3, 100, Compounded);
cleanprice3 := CleanPrice(bond3, yield3, Compounded);
dirtyprice3 := DirtyPrice(bond3, rate2);
Note that since the bond has semi-annual coupons, the Compounded yield is based on semi-annual compounding.
dirtyprice3 := DirtyPrice(bond3, rate2, Compounded);
cashflows3 := CashFlows(bond3);
cashflows3≔1.500000000 on 'March 17, 2007',1.500000000 on 'September 17, 2007',1.500000000 on 'March 17, 2008',100. on 'March 17, 2008'
add(t[amount]*DiscountFactor(rate2, t[date], compounding = Semiannual), t in cashflows3);
The Finance[CleanPrice] command was introduced in Maple 15.
For more information on Maple 15 changes, see Updates in Maple 15.
Download Help Document
What kind of issue would you like to report? (Optional)