Given a set of equity options with increasing tenors, along with target prices for those options, and a set of equity-lined default SDE parameters, fit a vector of piecewise constant volatilities and an associated cumulative variance function to them.
fit_variance_cumulation(
S0,
eq_options,
mid_prices,
spreads = NULL,
initial_vols_guess = 0.55 + 0 * mid_prices,
use_impvol = TRUE,
relative_spread_tolerance = 0.01,
force_same_grid = FALSE,
num_time_steps = 40,
const_short_rate = 0,
const_default_intensity = 0,
discount_factor_fcn = function(T, t, ...) { exp(-const_short_rate * (T - t)) },
survival_probability_fcn = function(T, t, ...) { exp(-const_default_intensity * (T
- t)) },
default_intensity_fcn = function(t, S, ...) { const_default_intensity + 0 * S },
dividends = NULL,
borrow_cost = 0,
dividend_rate = 0,
...
)
Current stock price
A list of options to find prices for. Each must have fields callput
,
maturity
, and strike
. This list must be in strictly increasing order of maturity.
Prices to match
Spreads within which any match is tolerable
Initial set of volatilities to try in the root finder
Judge fit quality on implied vol distance rather than price distance
Tolerance multiplier on bid-ask spreads taken from vol normalization
Price all options on the same grid, rather than having smaller timestep sizes for earlier maturities
Minimum number of time steps in the grid
A constant to use for the instantaneous interest rate in case discount_factor_fcn
is not given
A constant to use for the instantaneous default intensity in case default_intensity_fcn
is not given
A function for computing present values to
time t
of various cashflows occurring, with
arguments T
, t
A function for probability of survival, with
arguments T
, t
and T>t
. E.g. with
a constant volatility \(s\) this takes the form \((T-t)s^2\). This argument is
only used in normalization of prices to vols for root finder tolerance, and
is therefore entirely optional
A function for computing default intensity
occurring during this timestep, dependent on time and stock price, with
arguments t
, S
. Should be consistent with
survival_probability_fcn
if specified
A data.frame
with columns time
, fixed
,
and proportional
. Dividend size at the given time
is
Stock borrow cost, affecting the drift rate
Continuous dividend rate, affecting the drift rate
Futher arguments to find_present_value
A list with two elements, volatilities
and cumulation_function
. The cumulation_function
will
be a 2-parameter function giving cumulated variances, as created by codevariance_cumulation_from_vols
By default, the fitting happens in implied Black-Scholes volatility
space for better normalization. That is to say, the fitting does pricing
using the full SDE and PDE solver via find_present_value
, but
judges fit quality on the basis of running resulting prices through a
nonlinear transformation that just
happens to come from the straight Black-Scholes model.
Other Implied Volatilities:
american_implied_volatility()
,
equivalent_bs_vola_to_jump()
,
equivalent_jump_vola_to_bs()
,
implied_jump_process_volatility()
,
implied_volatilities_with_rates_struct()
,
implied_volatilities()
,
implied_volatility_with_term_struct()
,
implied_volatility()
Other Equity Dependent Default Intensity:
find_present_value()
,
fit_to_option_market_df()
,
form_present_value_grid()
,
implied_jump_process_volatility()