fit_variance_cumulation {ragtop} | R Documentation |
Fit piecewise constant volatilities to a set of equity options
Description
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.
Usage
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,
...
)
Arguments
S0 |
Current stock price |
eq_options |
A list of options to find prices for. Each must have fields |
mid_prices |
Prices to match |
spreads |
Spreads within which any match is tolerable |
initial_vols_guess |
Initial set of volatilities to try in the root finder |
use_impvol |
Judge fit quality on implied vol distance rather than price distance |
relative_spread_tolerance |
Tolerance multiplier on bid-ask spreads taken from vol normalization |
force_same_grid |
Price all options on the same grid, rather than having smaller timestep sizes for earlier maturities |
num_time_steps |
Minimum number of time steps in the grid |
const_short_rate |
A constant to use for the instantaneous interest rate in case |
const_default_intensity |
A constant to use for the instantaneous default intensity in case |
discount_factor_fcn |
A function for computing present values to
time |
survival_probability_fcn |
A function for probability of survival, with
arguments |
default_intensity_fcn |
A function for computing default intensity
occurring during this timestep, dependent on time and stock price, with
arguments |
dividends |
A |
borrow_cost |
Stock borrow cost, affecting the drift rate |
dividend_rate |
Continuous dividend rate, affecting the drift rate |
... |
Futher arguments to |
Details
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.
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
See Also
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()