QuantLib
QuantLib copied to clipboard
Computation of cdf in LocalVolRNDCalculator
Computing cdf boundaries was wrong. In case xl is positive, while loop lowers xl but only to 0, if it is negative xl (through while loop) rise towards 0. In case xr is positive previous code is good as it tends towards +infinity. However, if xr is negative it tends towards -infinity.
xl should always tends towards -infinity and xr towards +infinity (up to a tolerance)
Maybe this can be done in better way, however this should work
Thanks for opening this pull request! It might take a while before we look at it, so don't worry if there seems to be no feedback. We'll get to it.
Hi
thanks for spotting this issue. Maybe we should initialize the addition factor with a relative scale instead of an absolute value? E.g.
Real addition = 0.1*(xr-xl);
cheers Klaus
Thanks, @mdotlic! May you check the automated comment above by CLAassistant and click the link?
Coverage increased (+0.002%) to 71.174% when pulling b76d14ee29846efd567d4d0b68427bdef951342a on mdotlic:master into 63bac2f94e6c046ab18cf573a92129ea414c25b4 on lballabio:master.
Congratulations on your first merged pull request!