bondFigure: Bond price as a function of interest rate.

View source: R/bondFigure.R

bondFigureR Documentation

Bond price as a function of interest rate.

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

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

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)

RcmdrPlugin.RiskDemo documentation built on Nov. 13, 2023, 5:07 p.m.