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'.
Hey every one I am trying to run this code as it is but I get the message " Undefined function 'lsqnonlin' for input arguments of type'function_handle'.
Error in hestoncalibrationexample (line 36)
x = lsqnonlin(@costf2,x0,lb,ub);
Any body can help me with this problem?
thanks in advance
Dear Moeti Ncube
Thanks for your code, it does help me a lot!
But I have a question for results.
In general, the simulated price should be very close to the Heston model price, right?
But why it seem that there is a gap between "simhes" and "modhes"?