Can I extrapolate beyond interpolation range in LinearInterpolation?

Posted by v17 on
URL: http://quantlib.414.s1.nabble.com/Can-I-extrapolate-beyond-interpolation-range-in-LinearInterpolation-tp15240.html

Hello,

I am doing LinearInterpolation with x-vector being YearFrac and y vector as YTMs -

X-vector is {0.5,1,2,3,4,5,6,7,8,9,10,15)

Interpolation works fine for yearFrac range 0.5 to 15

However for yearfrac < 0.5 and > 15 it gives exception.

Is there any way to interpolate beyond range?