implied_volatility_with_term_struct: Find the implied volatility of a european-exercise option...

Description Usage Arguments Details Value See Also Examples

View source: R/calibration.R

Description

Use the Black-Scholes formula to generate European option values and run them through Newton's 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
implied_volatility_with_term_struct(
  option_price,
  callput,
  S0,
  K,
  time,
  ...,
  starting_volatility_estimate = 0.5,
  relative_tolerance = 1e-06,
  max.iter = 100,
  max_vola = 4
)

Arguments

option_price

Option price to match

callput

1 for calls, -1 for puts

S0

initial underlying price

K

strike

time

Time to expiration

...

Further arguments to be passed on to black_scholes_on_term_structures

starting_volatility_estimate

The Newton method's original guess

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

Details

Differs from implied_volatility by calling black_scholes_on_term_structures for pricing, thereby allowing term structures of rates, and a nontrivial survival_probability_fcn

Value

Estimated volatility

See Also

implied_volatility for simpler cases with constant parameters, black_scholes_on_term_structures for the underlying pricing algorithm, implied_volatilities_with_rates_struct when neither volatilities nor survival probabilities 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_with_rates_struct(), implied_volatilities(), 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_with_rates_struct(), implied_volatilities(), implied_volatility()

Other European Options: black_scholes_on_term_structures(), blackscholes(), implied_volatilities_with_rates_struct(), implied_volatilities(), implied_volatility()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Dividends
divs = data.frame(time=seq(from=0.11, to=2, by=0.25),
                  fixed=seq(1.5, 1, length.out=8),
                  proportional = seq(1, 1.5, length.out=8))
surv_prob_fcn = function(T, t, ...) {
  exp(-0.07 * (T - t)) }
disc_factor_fcn = function(T, t, ...) {
  exp(-0.03 * (T - t)) }
implied_volatility_with_term_struct(
    option_price = 12, S0 = 150, callput=PUT,
    K = 147.50, time=1.5,
    discount_factor_fcn=disc_factor_fcn,
    survival_probability_fcn=surv_prob_fcn,
    dividends=divs)

brianboonstra/ragtop documentation built on March 7, 2020, 2:23 p.m.