EstimYTM: A function to estimate the yield to maturity of a standard...

Description Usage Arguments Examples

View source: R/BondFunctions.R

Description

Estimate a bond's yield to maturity given a price. It is a nominall example and does not account for acrrued interest

Usage

1
2
3
4
5
6
7
EstimYTM(
  coupon = numeric(),
  coupon.frequency = numeric(),
  years.mat = numeric(),
  face.value = numeric(),
  price = numeric()
)

Arguments

coupon

A numeric value expressing the bond's coupon as a percentage of its face amount

coupon.frequency

A numeric 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

price

A numeric value expressing the price of the bond (not percentage of face value) for example a price of$102 is entered as 102.00

Examples

1
2
EstimYTM(coupon = .04, 
coupon.frequency = 2, years.mat = 10, face.value = 1000, price = 100)

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