fixed_bond {fcl}R Documentation

Create Fixed Bond Object

Description

Create Fixed Bond Object

Usage

fixed_bond(value_date, mty_date, redem_value, cpn_rate, cpn_freq)

Arguments

value_date, mty_date

the value and maturity date of the bond

redem_value, cpn_rate, cpn_freq

the redemption value, coupon rate and coupon frequency of the bond. Note that the frequency can only be one of 1, 2, 4, 0 (pay at mature)

Value

it returns an environment containing the following objects:

Note

Examples

bond <- fixed_bond(
  value_date = 210101,
  mty_date = c(250101, 300201),
  redem_value = 100,
  cpn_rate = c(0.05, 0.03),
  cpn_freq = c(0, 1)
)
bond$ytm_dur(
  ref_date = c(220101, 220201),
  clean_price = 100
)
bond$cf(
  ref_date = c(220101, 220131)
)

[Package fcl version 0.1.0 Index]