powered by
bond
Compute bond price, cash flow table and duration
bond(ytm = 0.05, C = 0.05, T2M = 1, m = 2, output = "price")
Yield to Maturity
Coupon rate per annum
Time to maturity in years
Periods per year for coupon payments e.g semi-annual = 2.
"price", "df" or "duration"
Price, cash flows data frame and/or duration
# NOT RUN { 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") # }
Run the code above in your browser using DataLab