powered by
This function computes the bond price, given the yield to maturity.
bondPrice(buyDate, matDate, rateCoupon, yieldToMat, nPay)
A list with the following components:
yield to maturity
flat price
days since previous coupon payment
days in a coupon period
accrued interest since last coupon payment
invoice price (= flat price + accrued interest)
the date at which the bond is bought (settlement date).
maturity date
annual coupon date
number of coupon payments per day
Arto Luoma <arto.luoma@wippies.com>
All the rates are given in decimals.
Bodie, Kane, and Marcus (2014) Investments, 10th Global Edition, McGraw-Hill Education, (see Bond Pricing between Coupon Dates in Section 14.2).
solveYield
bondPrice("2012-7-31","2018-7-31",0.0225,0.0079,2) bondPrice("2012-7-31","2018-7-31",0.0225,0.0079,4) bondPrice("2012-7-31","2030-5-15",0.0625,0.02117,2)
Run the code above in your browser using DataLab