Computes macaulay duration, modified macaulay duration and bond convexity.

ivt_duration_macaulay(face_value, coupon_rate, yield, years)

ivt_duration_modified(face_value, coupon_rate, yield, years)

ivt_bond_convexity(face_value, coupon_rate, yield, years)

Arguments

face_value

Face/Par value of the bond.

coupon_rate

Coupon rate of the bond.

yield

Yield to maturity.

years

Years to maturity.

Examples

ivt_duration_macaulay(1000, 10, 8, 5)
#> [1] 4.203743
ivt_duration_modified(1000, 10, 8, 5)
#> [1] 3.892355
ivt_bond_convexity(100, 14, 12, 4)
#> [1] 12.47951