bondFigure: Bond price as a function of interest rate.

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/bondFigure.R

Description

This function plots the bond price as a function of interest rate. It also shows, using dotted lines, the yield to maturity rate corresponding to the face value, and the flat price corresponding to the yield to maturity.

Usage

1
bondFigure(buyDate, matDate, rateCoupon, yieldToMat = NULL, bondPr = NULL, nPay)

Arguments

buyDate

the date when the coupon is bought (settlement date)

matDate

maturity date

rateCoupon

coupon rate (in decimals)

yieldToMat

yield to maturity (in decimals)

bondPr

the flat price of the bond

nPay

number of coupon payments per year

Details

either yieldToMat or bondPr should be given as input.

Value

This function only plots a figure.

Author(s)

Arto Luoma <arto.luoma@wippies.com>

References

Bodie, Kane, and Marcus (2014) Investments, 10th Global Edition, McGraw-Hill Education, (see Section 14.2 Bond Pricing).

See Also

bondPrice, solveYield

Examples

1
2
bondFigure("2012-7-31","2018-7-31",rateCoupon=0.0225,yieldToMat=0.0079,nPay=2)
bondFigure("2012-7-31","2018-7-31",rateCoupon=0.0225,bondPr=90,nPay=2)

arolluom/RcmdrPlugin.RiskDemo documentation built on May 8, 2019, 9:58 p.m.