bond | R Documentation |
Compute bond price, cash flow table or duration
bond(ytm = 0.05, C = 0.05, T2M = 1, m = 2, output = "price")
ytm |
Yield to Maturity. |
C |
Coupon rate per annum. |
T2M |
Time to maturity in years. |
m |
Periods per year for coupon payments e.g semi-annual = 2. |
output |
"price", "df" or "duration". |
Returns price numeric
, cash flows tibble
, or duration numeric
Philippe Cote
bond(ytm = 0.05, C = 0.05, T2M = 1, m = 2, output = "price")
bond(ytm = 0.05, C = 0.05, T2M = 1, m = 2, output = "df")
bond(ytm = 0.05, C = 0.05, T2M = 1, m = 2, output = "duration")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.