bondprice: Determine the price a bond on the interest payment date

Description Usage Arguments Examples

View source: R/BondFunctions.R

Description

This is generic function to determine the price of a bond given the yield to maturity (YTM). It is a nominal example of pricing a bond given its yield to maturity. The equation assumes pricing from one payment date to the next. It does not account for acrrued interest.

Usage

1
2
3
4
5
6
7
bondprice(
  yield.to.maturity = numeric(),
  coupon = numeric(),
  coupon.frequency = numeric(),
  years.mat = numeric(),
  face.value = numeric()
)

Arguments

yield.to.maturity

A numeric value expressing the yield to maturity (discount rate) as an annual percentage.

coupon

A numeric value the coupon paid by the bond as a percentage of the bond's principal amount

coupon.frequency

A numeirc value expressing the frequency of payments over one year

years.mat

A numeric value expressing the years to maturity

face.value

A numeric value expressing the face value (principal amount) of the bond

Examples

1
2
3
bondprice(
yield.to.maturity = .05, coupon = .05, coupon.frequency = 2,
years.mat = 10, face.value = 100)

glennmschultz/BondLab documentation built on May 11, 2021, 5:29 p.m.