zcp2rate: Rate computation

Description Usage Arguments Value Examples

View source: R/utils.R

Description

zcp2rate computes the rate equivalent to a zero coupon price for a maturity.

Usage

1
zcp2rate(mat, zcp, method = "continuous")

Arguments

mat

Vector. Maturities of the bound.

zcp

Vector. Panel of zero coupon bonds prices for which the rates are to be computed.

method

Character. Computation method:

  • "continuous": continuous rate. Default value.

  • "actuarial": actuarial rate.

  • "libor": libor rate.

Value

The rates associated to the maturities.

Examples

1
zcp2rate(1, 0.9900498, "continuous")

ArnaudBu/esg2 documentation built on Oct. 20, 2021, 10:01 a.m.