Description Usage Arguments Value See Also Examples
Used as the backbone for a number of pricing functions. The function filters for relevant cashflow dates given the settle date. It allows the user to specify which columns should be in the results via the last two parameters.
1 2 | discount_cfs_single(cfs, settle, yield = NULL, conv = "30/360", freq = 2,
include_dfPV = TRUE, include_dur = FALSE)
|
cfs |
Cashflows |
settle |
Settlement Date |
yield |
Yield in percent (e.g. 5.0) |
conv |
Daycount convention (one of |
freq |
Coupon frequency (number of periods per year) |
include_dfPV |
Boolean indicating whether or not to include discount factor and present value columns in the result |
include_dur |
Boolean indicating whether or not to include macaulay duration, modified duration, dv01, and convexity columns in result |
tbl_df
containing cashflows and other calculated columns
given the yield
parameter.
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
;
risk_cfs_single
;
yield_cfs_single
1 2 | cfs <- create_cashflows("2045-02-15", 2.5, "2015-05-07", "Act/Act", 2, 100, "ABCD")
discount_cfs_single(cfs, "2015-05-07", 4, "30/360", 2, TRUE, TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.