Learn R Programming

bondAnalyst (version 1.0.1)

pricingSaCpnBond: Calculates Present Value or the Price of the Bond paying semi-annual Coupons.

Description

Calculates Present Value or the Price of the Bond paying semi-annual Coupons.

Usage

pricingSaCpnBond(saCoupons, times, maturityVal, n, r)

Value

Input values to five arguments saCoupons , times, maturityVal,n and r.

Arguments

saCoupons

A vector.

times

A vector.

maturityVal

A number.

n

A number.

r

A number.

Author

MaheshP Kumar, maheshparamjitkumar@gmail.com

Details

The method pricingSaCpnBond() is developed to compute the Price of Bond making semi-annual Coupon Payments. So, pricingSaCpnBond() gives the Price of Bond making semi-annual Coupon Payments for values passed to its five arguments. Here, saCoupons represents the dollar values of all the semi-annual coupon payments till maturity, times is a vector of number of years ranging from 1 to any specified number of semi-annual periods till maturity, that is from 1 to times (n * 2), maturityVal is Maturity Value, n is number of years till maturity, and r is annual Market Discount Rate or Required Rate of return. The output is rounded off to two decimal places. The given examples show various ways in which the arguments can be passed to pricingSaCpnBond().

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
pricingSaCpnBond(saCoupons=c(4,4,4,4,4,4), times=c(1,2,3,4,5,6) ,maturityVal=100,n=3,r=0.07)
pricingSaCpnBond(saCoupons=c(4,4,4,4,4,4), times=c(1:6) ,maturityVal=100,n=6,r=0.06)
pricingSaCpnBond(saCoupons=c(rep(4,6)), times=c(1:6) ,maturityVal=100,n=6,r=0.06)
pricingSaCpnBond(c(rep(4,6)), c(1:6) ,100,6,0.06)

Run the code above in your browser using DataLab