This is an example for the bond calculator. See also the usage notes and the market value example.
Suppose the government issues a thousand dollar bond on January 15, 2000, with a biannual coupon of 3%. The bond will be repaid in 2015 at January 15. On May 2, 2008 the bond is traded for $1008, This is the clean price which means that any accrued interest has to be paid on top of this $ 1008. The question is how to compute the yield to maturity of this bond.
Enter the following values into the fields of the calculator:
Field name  Value  Remark 
Nominal interest  6  A coupon rate of 3% twice a year makes 6% per year. 
Coupon period  6 months  Interest is paid every 6 months. 
Date computation  20080502  The date on which the Yield to Maturity is computed. The date format is YYYYMMDD. 
Maturity date  20150115  Date on which the principal amount ($1000) is back back. The date format is YYYYMMDD. From the Maturity Date and the Coupon Period the coupon dates are computed. 
Interest in advance or afterwards  afterwards  For almost all bonds the coupons are paid at the end of each period. 
Nominal value  1000  Amount that is paid at the end of the last period, on top of the coupon. 
Compute Yield to Maturity or Value  Yield  Select the type of computation 
Market value  1008  Value of the bond on the date of the computation. 
Add coupon to market value:  checked  If this is checked then the field Market Value refers to the Clean Price otherwise the field Market Value refers to the Dirty Price, which includes accrued interest of the current coupon. 
For the values above the calculator computes a Yield to Maturity of 5.94% per year. Furthermore the accrued interest of the current coupon period is equal to $17.64. This means that the Dirty Price of the bond is $1025.63.
The computation finally shows that the Modified Duration is equal to 5.22. So if the interest goes up by one percent then the Clean Price of the bond goes down by approximately 5%.
