Description Usage Arguments Details Value
View source: R/check_convergence.R
Check for mutual convergence of prices generated by both PDE and MC methods to a common value under Black-Scholes dynamics for European vanilla options.
1 2 3 4 5 6 7 8 9 10 11 | check_merton_convergence(
spot,
maturity,
parameters,
what,
N = 100,
M = 100,
threshold = 0.001,
samples = 1000,
strike_range = 5
)
|
spot |
the underlying spot price |
maturity |
the maturity of the option in trading years |
parameters |
vector of parameters defining the Merton jump diffusion dynamics, see details |
what |
what type of option |
N |
time resolution |
M |
space resolution |
threshold |
threshold for MSE error for acceptance of convergence |
samples |
number of samples to use in MC |
strike_range |
range of strikes to price |
The argument parameters
should be a vector containing the values (not necessarily named)
rate
the risk-free rate,
div
the dividend yield rate,
volat
the annual log volatility,
lambda
the mean rate of jumps per year,
jm
the mean size of jumps,
jv
the mean volatility of jumps
list containing a data.frame of the strike and genertaed prices, the mse, boolean for success and success message if successful.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.