Learn R Programming

bondAnalyst (version 1.0.1)

ytmZeroCouponBond: Calculates the Yield-To-Maturity(YTM) of a Zero-Coupon Bond.

Description

Calculates the Yield-To-Maturity(YTM) of a Zero-Coupon Bond.

Usage

ytmZeroCouponBond(maturityVal, n, price)

Value

Input values to three arguments maturityVal , n and price.

Arguments

maturityVal

A number.

n

A number.

price

A number.

Author

MaheshP Kumar, maheshparamjitkumar@gmail.com

Details

The method ytmZeroCouponBond() is developed to compute the Yield-To-Maturity a Zero-Coupon Bond. So, ytmZeroCouponBond() gives the Price of a Zero-Coupon Bond for values passed to its three arguments. Here, maturityVal represents the Maturity Value of the Bond, n is number of years till maturity, and price is Market Price of Zero-Coupon Bond. The output is rounded off to three decimal places. The given examples show various ways in which the arguments can be passed to ytmZeroCouponBond().

References

Adams,J.F. & Smith,D.J.(2019). Introduction to fixed-income valuation. In CFA Program Curriculum 2020 Level I Volumes 1-6. (Vol. 5, pp. 107-151). Wiley Professional Development (P&T). ISBN 9781119593577, https://bookshelf.vitalsource.com/books/9781119593577

Examples

Run this code
ytmZeroCouponBond(maturityVal=100, n=60, price=22.375)
ytmZeroCouponBond(100, 60, 22.375)

Run the code above in your browser using DataLab