risk_cfs_single: DV01 and Other Risks for a Single Set of Cashflows

Description Usage Arguments Value See Also Examples

Description

Used as the backbone for all DV01 and risk calculations. This function uses discount_cfs_single to calculate the important risk metrics.

Usage

1
2
risk_cfs_single(cfs, settle, yield, conv = "30/360", freq = 2,
  returnCFs = TRUE)

Arguments

cfs

Cashflows tbl_df

settle

Settlement Date

yield

Yield or IRR used to discount the cashflows

conv

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

freq

Coupon frequency (number of periods per year)

returnCFs

Boolean flag indicating whether or not to return the calculated set of cashflows and risk metrics

Value

Numeric value of the DV01 and other risks for the given cashflows and yield or the full calculated set of risks by cashflow

See Also

Other pricing functions: acc_int; calc_clean_px, calc_clean_px.bond, calc_clean_px.default; calc_dirty_px, calc_dirty_px.bond, calc_dirty_px.default; calc_dv01, calc_dv01.bond, calc_dv01.default, calc_risk, calc_risk.bond, calc_risk.default; calc_yield, calc_yield.bond, calc_yield.default; calc_ytm; discount_cfs_single; yield_cfs_single

Examples

1
2
cfs <- create_cashflows("2045-02-15", 2.5, "2015-05-07", "Act/Act", 2, 100, "ABCD")
risk_cfs_single(cfs, "2015-05-07", 4, "30/360", 2, TRUE)

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