Description Usage Arguments Value Author(s) References Examples
View source: R/BSM_utilities.R
Calculate annualized interest rate r(t, T) from a discount factor Z(t, T)
1 | interest_rate(d_f, years, pmt_freq = Inf)
|
d_f |
discount factor Z(t, T) |
years |
number of (fractional) years: period that the discount factor effects |
pmt_freq |
frequency of compounding (optional)
|
r(t, T)
George Fisher GeorgeRFisher@gmail.com
Veronesi Ch2 P29-38
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | PV <- 9000
FV <- 13000
years <- 3
freq <- 2 # compounding frequency = 2 => semi-annual
# continuous interest rate
# ========================
(r_continuous <- CAGR(PV, FV, years, type="continuous"))
(df_continuous <- discount_factor(r_continuous, years))
(c_ir <- interest_rate(df_continuous, years))
all.equal(r_continuous, c_ir)
# discrete interest rate
# ======================
(r_discrete <- r_discrete(r_continuous, freq))
(df_discrete <- discount_factor(r_discrete, years, freq))
(d_ir <- interest_rate(df_discrete, years, freq))
all.equal(r_discrete, d_ir)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.