price_bond: Price a coupon bond

Description Usage Arguments Details

Description

Price an n-period semi-annual coupon bond.

Usage

1
price_bond(n, c, M, y)

Arguments

n

The number of 6 month periods in the bond.

c

The annualized semi-annual coupon rate, as a decimal.

M

The maturity value of the bond.

y

The yield to maturity on the bond, as a decimal.

Details

Any of these variables can be a vector, and as long as the other variables are either the same length, or length 1, you can calculate multiple bond prices at once.


DavisVaughan/ratekit documentation built on May 5, 2019, 8:14 a.m.