2.2.5. Cubic Spline for Brazilian Yield Curve
Cubic spline is a metodology of numeric interpolation, as linear interpolation, exponetial etc. In fact, represents a way of interpolation through polynomials of 3º order, being from it the name cubic.
The bigger characteristic of interpolations cubic spline is the softness which represent the transition between nodes, being very used to establishing video camera and other instruments sensible to hard moviments.
The utilization of cubic spline interpolation in finances also is motived by this characteristic softing intersections or, looking to a yield curve, softing the transition from a point to other.
In this method, the trajectory of each set o two points its represented by a polynomial of order 3 and some conditions of shape are established to grant softness. Being it, each section of the curve is defined:Neste método, a trajetória entre cada conjunto de dois pontos é representada por um polinômio de ordem 3 e algumas condições de contorno são estabelecidas para garantir a suavidade. Sendo assim, cada segmento da curva é definido por:
Where uint its a parametering of points Dint in time given by:
As conditions of shape, in the intersection points between the segment, the polynomial value - which represents each segment - like its first and second derivative must be equal (this is equivalent to say that curve will present a continuity C2 – until the second derivative). Or:

(first segment derivative - curves inclination)
(second segment derivative - curves inclination change)
The points (0) and (1) represents, respectively, the begin and the end of each curve segment cubic spline.
Yet for the begining and ending points of curve, have:

To allows the solution of this equations system, more two conditions are imposed to extremities:
This metodology of constructing a spline also knows as natural cubic spline.
As disadvantages of this method, we can bring up that it represent some in instabilities, principally in curves with points much next to others. Other observation is the absence of a theory which offer support to the model fot yield curves.
Extrapolations are not the objective of a cubic spline.
2.2.5.1. Function CC.CSPLINE
Access:
- Menu - Insert | Function | Calculus
- Toolbar Default | Calculus
Description:
Returns the interest rate interpoled by the method cubic spline for the period from the yield curve informed. In case of periods beyond last date of the yield curve informed, the rate returned its negative and its equivalent to the rate of the last point on the yield curve (flat curve after the last date). This function does not realize extrapolations.
One yield curve can't have more than one information for the same point in time (in example one information of futures of interests and other of swap's). If it occur, will prevail the bigger rate.
Call: CC.CSPLINE (Dias Úteis, Curva de Juros)
Argument |
Type |
Description |
Workdays |
integer |
Workdays for which wants to calculate the interests rates interpoled by the method cubic spline. This number must be bigger than 1.
|
Yield Curve |
range |
Range (n rows and 2 columns) describing Brazilian yield curve (rates base 252) on the first column and workdays in the second column. This data are used to calculate interests rates for any expiration date. Must have at least 2 differents points in one yield curve.
|
The points on the yield curve informed does not need to be sorted by time, but must be disposed in a range with two columns only.
Cells containing text or empty for the yield curve are ignored by the function. Data less than 1 for the parameter Workdays also be ignored!
Important:
The interests rates informed in the parameter Yield Curve must be the anual rates with base 252. The rates must be in the first column and the workdays in the second.
|
Important:
To repeated points in time, will prevail that with bigger rate!
|
The result of a yield curve informed with n points is:
- Interpolation: considering the equations and conditions of a cubic spline and considering Pi and Pi+1 as yield curve points, Di and Di+1 as the corresponding workdays to this points and Dint the date of the searched point, being Dint between Di and Di+1, the interests rates Pint interpoled to the searched point will be given by:
- Interpolation:

Where:
Important:
If the searched point its a date before the first expiration of the yield curve, the rate returned will be equal the interest rate of the first date!
|
Example using interpolation cubic spline:
Interpolation of yield curve - parameters:
- Workdays: 120
- Curve: A2:B11 (11 points not sorted)
| 18.75% | 20 |
| 20.65% | 220 |
| 20.70% | 300 |
| 20.40% | 140 |
| 19.15% | 40 |
| 19.75% | 80 |
| 20.71% | 350 |
| 20.60% | 180 |
| 19.40% | 60 |
| 20.00% | 100 |
= CC.CSPLINE( 120, A2:B11)
Results:
Yield curve interpoled for many points. For constructing this graphic was calculated the rates interpoleds for all workdays until the last point (or expiration) informed. It isn't there extrapolations on this graphic. There is a line until the first expiration, indicating that does not exist interpolations on this period.
Example using interpolation cubic spline with inverted curve:
Interpolation of yield curve inverted - parameters:
- Workdays 250
- Curve: A2:B11 (11 points not sorted)
| 18.75% | 20 |
| 19.15% | 40 |
| 19.40% | 60 |
| 19.75% | 80 |
| 20.00% | 100 |
| 20.40% | 140 |
| 20.60% | 180 |
| 20.58% | 220 |
| 20.40% | 300 |
| 20.30% | 350 |
= CC.CSPLINE( 250; A2:B11)
Results:
Again, doesn't exist data for extrapolations and exist a line until the next expiration.
|