I hope you can help me here.
Im calibrating a model where your kummer function is involve. During the calibration sometimes the procedure gets stuck while evaluating kummer function. At first i thought i could get around this by lowering the tolerance level but even setting it to 1e-1 does not solve it. Do you have any idea how this happens? Maybe there are some inputs to the function that it cannot evaluate?
Thank you advance!
I have tried to use your codes to improve the speed of my functions.
Though if I use the example from your codes:
Q = adaptiveSimpson(@(x) [-cos(50*x); sin(x)], 0, pi, 'tol', 1e-6)
I get the following error:
Undefined function 'adaptiveSimpson' for input arguments of type 'function_handle'.
In Heston model, If the parameters obey 2*kappa*theta> sig (known as the Feller condition) then the process volatility is strictly positive. When I run your codes even using your marketdata, calibrated parameters violate the feller condition. Could you please explain why it is so and probably fix it if possible.
Thanks in advance