Bisection_method_MC: Bisection method for Monte Carlo simulations

View source: R/Bisection_method_MC.R

Bisection_method_MCR Documentation

Bisection method for Monte Carlo simulations

Description

The Bisection_method_MC function is used to find const L in modified european option.

Usage

Bisection_method_MC(option_value, a0, b0, rate, X, FUN, ..., epsilon = 1e-3, time = 0, End_Time = 1)

Arguments

option_value

numeric value, price of the modified option.

a0

numeric value, lower boundary of the range.

b0

numeric value, upper boundary of the range.

rate

numeric value, risk free rate in the model rate >= 0.

X

numeric matrix, price of the asset from different trajectories.

FUN

the function to be applied, explicit formula for the option price.

...

arguments to FUN.

epsilon

calculation error.

time

numeric value, actual time.

End_Time

numeric value, end time of the option, time < End_Time.

Details

This function estimated a constant for which price of the modified option is equal to option_value. If warning occurs means that epsilon parameter is too small to find constant for which calculation error of option price is smaller then epsilon. The reason for this is simulations. When the number of trajectories is increased, the epsilon parameter can be decreased.

Value

A numeric value, a constant for which the price of the modified option is equal to option_value.

See Also

https://en.wikipedia.org/wiki/Bisection_method

Examples

x <- generate_scenarios(100, 0, 0.3)
Bisection_method_MC(5, 1, 1000, 0, x, option_modificate_payoff, drift = 0.05, vol = 0.3, p = 1, call_payoff, strike = 100)


mociepa/ShortfallRiskHedging documentation built on Sept. 30, 2022, 6:43 p.m.