One of the changes was in the actual computation to the exponential interpolation. I'm not too sure how your method previously worked, but the following method is quite straightforward, and it seems to fix the issue.
Method:
Starting with (x_1, y_1) and (x_2, y_2) and we want to interpolate at some point x_1 < p < x_2.
Take the log of the y-values. That is, we now have (x_1, ln(y_1)) and (x_2, ln(y_2)).
Use linear interpolation between these two points.
Fixed the exponential interpolator.
https://github.com/avhz/RustQuant/pull/162#issuecomment-1926279538
One of the changes was in the actual computation to the exponential interpolation. I'm not too sure how your method previously worked, but the following method is quite straightforward, and it seems to fix the issue.
Method:
(x_1, y_1)
and(x_2, y_2)
and we want to interpolate at some pointx_1 < p < x_2
.log
of the y-values. That is, we now have(x_1, ln(y_1))
and(x_2, ln(y_2))
.exp
to it to convert back out of logspace.