Description Usage Arguments Value See Also Examples
Used as the backbone for all yield calculations. This function uses
discount_cfs_single
to generate the cashflows' yearfracs
from the settlement date. The ytm
function from the NMOF manual is
used to calculate the yield, with a 5% initial guess.
1 | yield_cfs_single(cfs, settle, coupon, conv = "30/360", freq = 2, clean_px)
|
cfs |
Cashflows |
settle |
Settlement Date |
coupon |
Annnual coupon amount |
conv |
Daycount convention (one of |
freq |
Coupon frequency (number of periods per year) |
clean_px |
The clean price of the bond |
Numeric value of the yield/IRR for the given cashflows and price
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
;
risk_cfs_single
1 2 | cfs <- create_cashflows("2045-02-15", 2.5, "2015-05-07", "Act/Act", 2, 100, "ABCD")
yield_cfs_single(cfs, "2015-05-07", 4, "30/360", 2, 101)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.