# bonds: Bond pricing using yield to maturity. In jrvFinance: Basic Finance; NPV/IRR/Annuities/Bond-Pricing; Black Scholes

## Description

bond.price computes the price given the yield to maturity bond.duration computes the duration given the yield to maturity bond.yield computes the yield to maturity given the price bond.prices, bond.durations and bond.yields are wrapper functions that use mapply to vectorize bond.price, bond.duration and bond.yield All arguments to bond.prices, bond.durations and bond.yields can be vectors. On the other hand, bond.price, bond.duration and bond.yield do not allow vectors Standard compounding and day count conventions are supported for all functions.

## Usage

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24``` ```bond.price(settle, mature, coupon, freq = 2, yield, convention = c("30/360", "ACT/ACT", "ACT/360", "30/360E"), comp.freq = freq) bond.yield(settle, mature, coupon, freq = 2, price, convention = c("30/360", "ACT/ACT", "ACT/360", "30/360E"), comp.freq = freq) bond.duration(settle, mature, coupon, freq = 2, yield, convention = c("30/360", "ACT/ACT", "ACT/360", "30/360E"), modified = FALSE, comp.freq = freq) bond.TCF(settle, mature, coupon, freq = 2, convention = c("30/360", "ACT/ACT", "ACT/360", "30/360E")) bond.prices(settle, mature, coupon, freq = 2, yield, convention = c("30/360", "ACT/ACT", "ACT/360", "30/360E"), comp.freq = freq) bond.yields(settle, mature, coupon, freq = 2, price, convention = c("30/360", "ACT/ACT", "ACT/360", "30/360E"), comp.freq = freq) bond.durations(settle, mature, coupon, freq = 2, yield, convention = c("30/360", "ACT/ACT", "ACT/360", "30/360E"), modified = FALSE, comp.freq = freq) ```

## Arguments

 `settle` The settlement date for which the bond is traded. Can be a character string or any object that can be converted into date using `as.Date`. `mature` The maturity date of the bond. Can be a character string or any object that can be converted into date using `as.Date` `coupon` The coupon rate in decimal (0.10 or 10e-2 for 10%) `freq` The frequency of coupon payments: 1 for annual, 2 for semi-annual, 12 for monthly. `yield` The yield to maturity of the bond `convention` The daycount convention `comp.freq` The frequency of compounding of the bond yield: 1 for annual, 2 for semi-annual, 12 for monthly. Usually same as freq. `price` The clean price of the bond. `modified` A logical value used in duration. `TRUE` to return Modified Duration, `FALSE` otherwise

## Value

`bond.TCF` returns a list of three components

 `t` A vector of cash flow dates in number of years `cf` A vector of cash flows `accrued` The accrued interest

## Author(s)

Prof. Jayanth R. Varma [email protected]

jrvFinance documentation built on May 29, 2017, 7:06 p.m.