Given derivative instruments (subclasses of
GridPricedInstrument, though typically either AmericanOption
or EuropeanOption
objects), along with their prices and spreads, calibrate
variance cumulation (the
at-the-money volatility of the continuous process) and equity linked default
intensity of the form $h(s + (1-s)(S0/S_t)^p)$.
fit_to_option_market(
variance_instruments,
variance_instrument_prices,
variance_instrument_spreads,
fit_instruments,
fit_instrument_prices,
fit_instrument_spreads,
fit_instrument_weights,
S0,
num_time_steps = 30,
const_short_rate = 0,
discount_factor_fcn = function(T, t) { exp(-const_short_rate * (T - t)) },
...,
base_default_intensity = 0.05,
relative_spread_tolerance = 0.15,
num_variance_time_steps = 30
)
A list of instruments in strictly increasing order of maturity, from which the volatility term structure will be inferred. Once the calibration is finished, the chosen parameters will reproduce the prices of these instruments with fairly high precision.
Central price targets for the variance instruments
Bid-offer spreads used to normalize errors in variance instrument prices during term structure fitting
A list of instruments in any order, from which the mispricing penalties used for judging fit quality will be computed
Central price targets for the variance instruments
Bid-offer spreads used to normalize errors in fit instrument prices during default intensity
Weights applied to relative errors in fit instrument prices before summing to form the penalty
Current underlying price
Time step count passed on to find_present_value
while fitting instrument values
A constant to use for the instantaneous interest rate in case discount_factor_fcn
is not given
A function for computing present values to
time t
of various cashflows occurring during this timestep, with
arguments T
, t
Further arguments passed to penalty_with_intensity_link
Overall default intensity (in natural units)
Tolerance to apply in
calling fit_variance_cumulation
Number of time steps to use in
calling fit_variance_cumulation
In its present form, this function uses a brain-dead grid search.
penalty_with_intensity_link
for the penalty function used
as an optimization target