pricingWithSpots {bondAnalyst} R Documentation

## Calculate Present Value or the Price of the Bond using Spot Rates.

### Description

Calculate Present Value or the Price of the Bond using Spot Rates.

### Usage

pricingWithSpots(coupons, spots, times, mv, n)


### Arguments

 coupons A vector. spots A vector. times A vector. mv A number. n A number.

### Details

When a fixed-rate bond is priced using the market discount rate, the same discount rate is used for each cash flow. A more fundamental approach to calculate the price of a bond is to use a sequence of market discount rates that correspond to the cash flow dates. These market discount rates are called spot rates. Spot rates are yields-to-maturity on zero-coupon bonds maturing at the date of each cash flow. Sometimes, these are called zero rates (Adams & Smith, 2019). Based on the information provided, the method pricingWithSpots() is developed to compute the Price of Bond using the Spot Rates. So, pricingWithSpots() gives the Price of Bond using Spots for values passed to its five arguments. Here, coupons represent the dollar values of all the coupon payments, spots is a vector of spot rates, times is a vector of number of years ranging from 1 to any specified number of years till maturity, mv is Maturity Value, and n is number of years till maturity. The output is rounded off to two decimal places. The given examples show various ways in which the arguments can be passed to pricingWithSpots(). Suppose that the one-year spot rate is 2 percent, the two-year spot rate is 3 percent, and the three-year spot rate is 4 percent. Then, the price of a three-year bond that makes a 5 percent annual coupon payment is 102.960.

### Value

Input values to five arguments coupons , spots,times, mv, and n.

### Author(s)

MaheshP Kumar, maheshparamjitkumar@gmail.com

### 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

pricingWithSpots(coupons=c(5,5,5), spots=c(0.02,0.03,0.04), times=c(1,2,3),mv=100,n=3)
pricingWithSpots(coupons=c(5,5,5), spots=c(0.02,0.03,0.04), times=c(1:3),mv=100,n=3)
pricingWithSpots(coupons=c(rep(5,3)), spots=c(0.02,0.03,0.04), times=c(1:3),mv=100,n=3)
pricingWithSpots(c(rep(5,3)), c(0.02,0.03,0.04), c(1:3),100,3)
pricingWithSpots(coupons=c(rep(10,2)), spots=c(0.01,0.02), times=c(1:2),mv=100,n=2)


[Package bondAnalyst version 1.0.1 Index]