bondPrice {RcmdrPlugin.RiskDemo} | R Documentation |
Computing bond prices
Description
This function computes the bond price, given the yield to maturity.
Usage
bondPrice(buyDate, matDate, rateCoupon, yieldToMat, nPay)
Arguments
buyDate |
the date at which the bond is bought (settlement date). |
matDate |
maturity date |
rateCoupon |
annual coupon date |
yieldToMat |
yield to maturity |
nPay |
number of coupon payments per day |
Details
All the rates are given in decimals.
Value
A list with the following components:
yieldToMaturity |
yield to maturity |
flatPrice |
flat price |
daysSinceLastCoupon |
days since previous coupon payment |
daysInCouponPeriod |
days in a coupon period |
accruedInterest |
accrued interest since last coupon payment |
invoicePrice |
invoice price (= flat price + accrued interest) |
Note
With Excel functions PRICE, DATE, COUPDAYBS and COUPDAYS you can do the same.
Author(s)
Arto Luoma <arto.luoma@wippies.com>
References
Bodie, Kane, and Marcus (2014) Investments, 10th Global Edition, McGraw-Hill Education, (see Bond Pricing between Coupon Dates in Section 14.2).
See Also
Examples
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)
[Package RcmdrPlugin.RiskDemo version 3.2 Index]