Description Usage Arguments Value See Also Examples
Given a bond
or the necessary parameters to construct one, this
will calculate the price of the bond
including accrued interest. This
price is used in yield calculations and other functions that require the
"full" or "dirty" price.
1 2 3 4 5 6 7 8 | calc_dirty_px(x, ...)
## Default S3 method:
calc_dirty_px(maturity, settle, coupon, yield,
conv = "30/360", freq = 2)
## S3 method for class 'bond'
calc_dirty_px(b, settle, yield)
|
maturity |
Maturity/Workout date |
settle |
Settlement Date |
coupon |
Annnual coupon amount |
yield |
Yield in percent (e.g. 5.0) |
conv |
Daycount convention (one of |
freq |
Coupon frequency (number of periods per year) |
b |
A |
Numeric value of the clean price and corresponding worst workout date if there are multiple sets of cashflows in the bond
Other pricing functions: acc_int
;
calc_clean_px
,
calc_clean_px.bond
,
calc_clean_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
;
yield_cfs_single
1 2 3 | calc_dirty_px("2045-02-15", "2015-02-15", 4, 3, "Act/Act", 2)
b <- bond("2045-02-15", 2.5, "2015-02-17", "Act/Act", 2, 100, id = "ABCD")
calc_dirty_px(b, "2015-05-15", 3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.