bond: Create 'bond' Object

Description Usage Arguments Value Examples

Description

Given basic bond details like maturity date, call date and price (if callable), coupon, frequency, settle, daycount convention, and id (e.g. cusip), this will create an object of type bond. The constructor can take a cfs object, which, if passed, should be a list of tbl_dfs, where each one has a name that means something. e.g. cfs$maturity, cfs$call, cfs$put etc. bond is the basic object in this package. It is used to calculate prices, yields, risk metrics, and do any other kind of fixed income analysis.

Usage

1
2
3
bond(maturity, coupon, dated_date, conv = "30/360", freq = 2,
  redemption = 100, id = NULL, cfs = NULL, call_date = NULL,
  call_px = NULL)

Arguments

maturity

Maturity/Workout date

coupon

Annnual coupon amount

dated_date

Dated date, usually the issue date and the day from which interest accrues.

conv

Daycount convention (one of "30/360", "Act/Act", or "Act/365")

freq

Coupon frequency (number of periods per year)

redemption

Redemption value or par amount

id

CUSIP or other id

cfs

List of cashflow tbl_dfs (id, cf_date, cf_amount)

Value

bond object with cashflows

Examples

1
2
3
bond("2045-02-15", 2.5, "2015-02-17", "Act/Act", 2, 100, id = "ABCD")
bond("2045-02-15", 2.5, "2015-02-17", "Act/Act", 2, 100, id = "ABCD",
     call_date = "2025-02-15", call_px = 101)

Tsunamical28/mdpr documentation built on May 9, 2019, 5:15 p.m.