Re: An interpolation question



Schizoid Man wrote:
Hi,

Assuming that I have a fairly convex function - e.g. the Price/Yield curve for a bond - what would my preferred method of interpolation be?

Would it be loglinear or cubic spline?

I realize that this is a completely open-ended question (am doing some interview preparation), but I was wondering if there is a science to choosing the interpolation method?

Thanks.


Personally, I like to use transformations and/or
prior knowledge about the function when I interpolate.

For example, suppose I have a table of the viscosity
of a gas as a function of temperature. Simple arguments
from kinetic theory say that the viscosity should be
proportional to the absolute temperature to the 1/2
power. So, log(viscosity) versus log(absolute temperature)
should be a straight line with slope 1/2.

If you plot some real data, you see this isn't exactly true.
But, its pretty close to being a straight line, so
even linear interpolation should be pretty accurate.
(After all, if it were a straight line, linear interpolation
would be exact.)

You can play with this, and try to find a transformation
that makes your curve almost linear.

To change the subject, there should be error estimates for
different interpolation methods. For example, in linear interpolation,
the lowest-order error term should depend on the second derivative
of the function being interpolated.

I have been known to omit every other value from the tabulated
function, and then use the interpolation method to evaluate
the "in between" values, and then compare those to the
known values that I omitted.

Olin Perry Norton
.



Relevant Pages


Quantcast