Use the provided discount factor function to infer constant short rates applicable to each expiration time, then use the Black-Scholes formula to generate European option values and run them through Newton's method until a constant volatility matching each provided option price has been found.
implied_volatilities_with_rates_struct(
option_price,
callput,
S0,
K,
discount_factor_fcn,
time,
const_default_intensity = 0,
divrate = 0,
borrow_cost = 0,
dividends = NULL,
relative_tolerance = 1e-06,
max.iter = 100,
max_vola = 4
)
Present option values (may be a vector)
1 for calls, -1 for puts (may be a vector)
initial underlying prices (may be a vector)
strikes (may be a vector)
A function for computing present values to
time t
, with arguments T
, t
Time from 0
until expirations (may be a vector)
hazard rates of underlying default (may be a vector)
A continuous rate for dividends and other cashflows such as foreign interest rates (may be a vector)
A continuous rate for stock borrow costs (may be a vector)
A data.frame
with columns time
, fixed
,
and proportional
. Dividend size at the given time
is
then expected to be equal to fixed + proportional * S / S0
. Fixed
dividends will be converted to proprtional for purposes of this algorithm.
Relative tolerance in option price to achieve before halting the search
Number of iterations to try before abandoning the search
Maximum volatility to try in the search
Scalar volatilities
Differs from implied_volatility_with_term_struct
by first computing constant interest rates
for each option, and then calling implied_volatilities
implied_volatility
for simpler cases with constant
parameters, implied_volatilities
for the underlying
algorithm with constant rates, implied_volatility_with_term_struct
when
volatilities or survival probabilities also have a nontrivial term structure
Other Implied Volatilities:
american_implied_volatility()
,
equivalent_bs_vola_to_jump()
,
equivalent_jump_vola_to_bs()
,
fit_variance_cumulation()
,
implied_jump_process_volatility()
,
implied_volatilities()
,
implied_volatility_with_term_struct()
,
implied_volatility()
Other European Options:
black_scholes_on_term_structures()
,
blackscholes()
,
implied_volatilities()
,
implied_volatility_with_term_struct()
,
implied_volatility()
Other Equity Independent Default Intensity:
american_implied_volatility()
,
american()
,
black_scholes_on_term_structures()
,
blackscholes()
,
equivalent_bs_vola_to_jump()
,
equivalent_jump_vola_to_bs()
,
implied_volatilities()
,
implied_volatility_with_term_struct()
,
implied_volatility()
# NOT RUN {
d_fcn = function(T,t) {exp(-0.03*(T-t))}
implied_volatilities_with_rates_struct(c(23,24,25),
c(-1,1,1), 100, 100,
discount_factor_fcn=d_fcn, time=c(4,4,5))
# }
Run the code above in your browser using DataLab