pricingWithSptSeq {bondAnalyst}R Documentation

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

Description

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

Usage

pricingWithSptSeq(cpns, sp, t, mv, n)

Arguments

cpns

A vector.

sp

A vector.

t

A vector.

mv

A number.

n

A number.

Details

The method pricingWithSptSeq() is developed to compute the Price of Bond using Sequences of the Spot Rates. So, pricingWithSptSeq() gives the Price of Bond using two different series or sequences of Spot Rates for values passed to its five arguments. Here cpns represents the dollar values of all the coupon payments,sp is a vector of spot rates, t 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 three decimal places. The given examples show various ways in which the arguments can be passed to pricingWithSptSeq().

Value

Input values to five arguments cpns , sp,t, 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

pricingWithSptSeq (cpns=c(3,3,3,3), sp=c(0.0408,0.0401,0.0370,0.0350), t=c(1,2,3,4),mv=100,n=4)
pricingWithSptSeq (cpns=c(3,3,3,3), sp=c(0.0039,0.0140,0.0250,0.0360), t=c(1,2,3,4),mv=100,n=4)
pricingWithSptSeq (c(3,3,3,3), c(0.0408,0.0401,0.0370,0.0350), c(1,2,3,4),100,4)
pricingWithSptSeq (c(3,3,3,3), c(0.0039,0.0140,0.0250,0.0360), c(1,2,3,4),100,4)
pricingWithSptSeq (cpns=c(3,3,3,3), sp=c(0.0408,0.0401,0.0370,0.0350), t=c(1:4),mv=100,n=4)
pricingWithSptSeq (cpns=c(3,3,3,3), sp=c(0.0039,0.0140,0.0250,0.0360), t=c(1:4),mv=100,n=4)
pricingWithSptSeq (c(3,3,3,3), c(0.0408,0.0401,0.0370,0.0350), c(1:4),100,4)
pricingWithSptSeq (c(3,3,3,3), c(0.0039,0.0140,0.0250,0.0360), c(1:4),100,4)
pricingWithSptSeq (cpns=c(rep(3,4)), sp=c(0.0408,0.0401,0.0370,0.0350), t=c(1:4),mv=100,n=4)
pricingWithSptSeq (cpns=c(rep(3,4)), sp=c(0.0039,0.0140,0.0250,0.0360), t=c(1:4),mv=100,n=4)
pricingWithSptSeq (c(rep(3,4)), c(0.0408,0.0401,0.0370,0.0350), c(1:4),100,4)
pricingWithSptSeq (c(rep(3,4)), c(0.0039,0.0140,0.0250,0.0360), c(1:4),100,4)

[Package bondAnalyst version 1.0.1 Index]