Description Usage Arguments Value Author(s)
bond.price computes the price given the yield to maturity
bond.duration computes the duration given the yield to maturity
bond.yield computes the yield to maturity given the price
bond.prices, bond.durations and bond.yields are wrapper functions
that use mapply
to vectorize bond.price, bond.duration and bond.yield
All arguments to bond.prices, bond.durations and bond.yields
can be vectors.
On the other hand, bond.price, bond.duration and bond.yield do not allow vectors
Standard compounding and day count conventions are supported for all functions.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | bond.price(
settle,
mature,
coupon,
freq = 2,
yield,
convention = c("30/360", "ACT/ACT", "ACT/360", "30/360E"),
comp.freq = freq,
redemption_value = 100
)
bond.yield(
settle,
mature,
coupon,
freq = 2,
price,
convention = c("30/360", "ACT/ACT", "ACT/360", "30/360E"),
comp.freq = freq,
redemption_value = 100
)
bond.duration(
settle,
mature,
coupon,
freq = 2,
yield,
convention = c("30/360", "ACT/ACT", "ACT/360", "30/360E"),
modified = FALSE,
comp.freq = freq,
redemption_value = 100
)
bond.TCF(
settle,
mature,
coupon,
freq = 2,
convention = c("30/360", "ACT/ACT", "ACT/360", "30/360E"),
redemption_value = 100
)
bond.prices(
settle,
mature,
coupon,
freq = 2,
yield,
convention = c("30/360", "ACT/ACT", "ACT/360", "30/360E"),
comp.freq = freq,
redemption_value = 100
)
bond.yields(
settle,
mature,
coupon,
freq = 2,
price,
convention = c("30/360", "ACT/ACT", "ACT/360", "30/360E"),
comp.freq = freq,
redemption_value = 100
)
bond.durations(
settle,
mature,
coupon,
freq = 2,
yield,
convention = c("30/360", "ACT/ACT", "ACT/360", "30/360E"),
modified = FALSE,
comp.freq = freq,
redemption_value = 100
)
|
settle |
The settlement date for which the bond is traded. Can be a
character string or any object that can be converted into date using
|
mature |
The maturity date of the bond. Can be a character string or
any object that can be converted into date using |
coupon |
The coupon rate in decimal (0.10 or 10e-2 for 10%) |
freq |
The frequency of coupon payments: 1 for annual, 2 for semi-annual, 12 for monthly. |
yield |
The yield to maturity of the bond |
convention |
The daycount convention |
comp.freq |
The frequency of compounding of the bond yield: 1 for annual, 2 for semi-annual, 12 for monthly. Usually same as freq. |
redemption_value |
The principal amount that the bond will pay on maturity or call. Typically necessary when the bond is expected to be called at premium to par. |
price |
The clean price of the bond. |
modified |
A logical value used in duration. |
bond.TCF
returns a list of three components
t |
A vector of cash flow dates in number of years |
cf |
A vector of cash flows |
accrued |
The accrued interest |
Prof. Jayanth R. Varma jrvarma@iima.ac.in
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.