american_implied_volatility: Implied volatility of an american option with...

Description Usage Arguments Value See Also Examples

View source: R/calibration.R

Description

Use the grid solver to generate american option values under a default model with survival probabilities not linked to equity prices. and run them through a bisective root search method until a constant volatility matching the provided option price has been found.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
american_implied_volatility(
  option_price,
  callput,
  S0,
  K,
  time,
  const_default_intensity = 0,
  survival_probability_fcn = function(T, t, ...) {     exp(-const_default_intensity * (T
    - t)) },
  default_intensity_fcn = function(t, S, ...) {     const_default_intensity + 0 * S },
  ...,
  num_time_steps = 30,
  structure_constant = 2,
  std_devs_width = 5,
  relative_tolerance = 1e-04,
  max.iter = 100,
  max_vola = 4
)

Arguments

option_price

Option price to match

callput

1 for calls, -1 for puts

S0

An initial stock price, for setting grid scale

K

strike

time

Time from 0 until expiration

const_default_intensity

A constant to use for the instantaneous default intensity in case default_intensity_fcn is not given

survival_probability_fcn

(Implied argument) A function for probability of survival, with arguments T, t and T>t.

default_intensity_fcn

A function for computing default intensity occurring at a given time, dependent on time and stock price, with arguments t, S. Should be matched to survival_probability_fcn

...

Additional arguments to be passed on to implied_volatility_with_term_struct and american

num_time_steps

Minimum number of time steps in the grid

structure_constant

The maximum ratio between time intervals dt and the square of space intervals dz^2

std_devs_width

The number of standard deviations, in sigma * sqrt(T) units, to incorporate into the grid

relative_tolerance

Relative tolerance in instrument price defining the root-finder halting condition

max.iter

Maximum number of root-finder iterations allowed

max_vola

Maximum volatility to try

Value

Estimated volatility

See Also

implied_volatility_with_term_struct for implied volatility of European options under the same conditions, american for the underlying pricing algorithm

Other Implied Volatilities: equivalent_bs_vola_to_jump(), equivalent_jump_vola_to_bs(), fit_variance_cumulation(), implied_jump_process_volatility(), implied_volatilities_with_rates_struct(), implied_volatilities(), implied_volatility_with_term_struct(), implied_volatility()

Other Equity Independent Default Intensity: american(), black_scholes_on_term_structures(), blackscholes(), equivalent_bs_vola_to_jump(), equivalent_jump_vola_to_bs(), implied_volatilities_with_rates_struct(), implied_volatilities(), implied_volatility_with_term_struct(), implied_volatility()

Other American Exercise Equity Options: american(), control_variate_pairs()

Examples

1
2
3
4
5
6
american_implied_volatility(25,CALL,S0=100,K=100,time=2.2,
  const_short_rate=0.03, num_time_steps=5)
df250 =  function(t) ( exp(-0.02*t)*exp(-0.03*max(0,t-1.0))) # Simple term structure
df25 = function(T,t){df250(T)/df250(t)} # Relative discount factors
american_implied_volatility(25,-1,100,100,2.2,
  discount_factor_fcn=df25, num_time_steps=5)

Example output

Loading required package: limSolve
Loading required package: futile.logger
Welcome to ragtop.  Logging can be enabled with commands such as
  futile.logger::flog.threshold(futile.logger::INFO, name='ragtop.calibration')
[1] 0.3832105
[1] 0.504813

ragtop documentation built on March 26, 2020, 7:28 p.m.