|
The method of
least squares provides, among other things, an alternative to
ordinary interpolation that
avoids the problem of overfitting.
Another alternative is spline
interpolation, which encompasses a range of interpolation
techniques that reduce the effects of overfitting. The method of
cubic spline interpolation
presented here is widely used in finance. It applies only in one dimension
but is useful for modeling
yield curves,
forward curves, and other
term structures.
A cubic spline is a
function
constructed by piecing together cubic polynomials
on different intervals
.
It has the form
 |
[1] |
Consider points
,
with
.
We construct a cubic spline by interpolating a cubic polynomial
between each pair of consecutive points
and
according to the following constraints:
1. Each polynomial passes through its respective end
points:
 |
[2] |
2. First derivatives match at interior points:
 |
[3] |
3. Second derivatives match at interior points:
 |
[4] |
4. Second derivatives vanish at the end
points:
 |
[5] |
The above conditions specify a system of linear equations
that can be solved for the cubic spline. In practice, it makes little
sense to fit a cubic spline to fewer than five points. However, for the
purpose of illustration, let’s interpolate a cubic spline between just
three points.
Consider the points
= (1,1), (2,5), (3,4). We seek to fit a cubic polynomial on the interval
[1, 2] and another cubic polynomial on the interval [2, 3]. These take the
forms
 |
[6] |
| [7] |
Our first condition requires
 |
[8] |
| [9] |
| [10] |
| [11] |
The second condition requires
 |
[12] |
The third condition requires
 |
[13] |
Finally, the last condition requires
 |
[14] |
| [15] |
We have eight equations in eight unknowns. These can be
expressed as
 |
[16] |
|
which we solve to obtain
|
 |
[17] |
Our two polynomials are
|
 |
[18] |
| [19] |
The cubic spline, along with the three points upon which
it is based, is shown in Exhibit 1.
|
|
 |
 |
|
A
cubic spline interpolated between the points (x[k],
y[k]) = (1,1), (2,5), (3,4) is constructed
from two cubic polynomials p1 and p2. |
|
|
 |
|
Interpolate
a cubic spline between the three points (0,1), (2,2), and (4,0).
[solution] |
|
|
|
 |
 |
|
|
|
 |
|
interpolation Any procedure for fitting a function to a set of points in
such a manner that the function intercepts each of the points.
linear
and quadratic polynomials Two basic forms of polynomials.
method of least squares
Any of several techniques for fitting a curve to data so as to
minimize the sum of squared differences between the curve and data
points.
remapping
In value-at-risk, the approximation of one risk vector with another.
Taylor
series expansion In calculus, a power series obtained as a
limit of Taylor polynomials that may approximate or equal the
function from which it is constructed.
term structure
Any curve describing some financial quantity as a function of time to maturity
or expiration. |
|
|
|
 |
 |
Financial Math 1
This is the first in a series of
three-day courses on financial mathematics that take
participants from pre-calculus to stochastic calculus. Math
1 covers pre-calculus, calculus, and plenty of
financial applications. Math 1 is a fun, engaging, and
enlightening introduction to the fascinating field of
financial math. |
|
|
|
|
 |
 |
Ads by Contingency Analysis
|
|
|
|
|