Hagan P S and West G (2006) Interpolation methods for curve construction Applied Mathematical Finance13(2) 89–129
Hagan P S and West G (2008) Methods for constructing a yield curve WILLMOTT MagazineMay 70–81
West G (2011) The monotone convex method of interpolation Financial Modelling Agency
1: – IntegerInput
On entry: , the number of points at which the interpolant is to be evaluated.
2: – Real (Kind=nag_wp) arrayInput
On entry: , the points at which the interpolant is to be evaluated.
3: – Real (Kind=nag_wp) arrayOutput
On exit: the values of the interpolant at .
4: – Real (Kind=nag_wp) arrayOutput
On exit: the values of the forward rates at .
5: – Real (Kind=nag_wp) arrayCommunication Array
Note: the actual argument supplied must be the array comm supplied to the initialization routine e01cef.
On entry: contains details of the interpolant.
comm should not be changed following a call to e01cef.
6: – IntegerInput/Output
On entry: ifail must be set to , or to set behaviour on detection of an error; these values have no effect when no error is detected.
A value of causes the printing of an error message and program execution will be halted; otherwise program execution continues. A value of means that an error message is printed while a value of means that it is not.
If halting is not appropriate, the value or is recommended. If message printing is undesirable, then the value is recommended. Otherwise, the value is recommended. When the value or is used it is essential to test the value of ifail on exit.
On exit: unless the routine detects an error or a warning has been flagged (see Section 6).
6Error Indicators and Warnings
If on entry or , explanatory error messages are output on the current error message unit (as defined by x04aaf).
Errors or warnings detected by the routine:
Either e01cef was not called first or the communication array has become corrupted.
An unexpected error has been triggered by this routine. Please
See Section 7 in the Introduction to the NAG Library FL Interface for further information.
Your licence key may have expired or may not have been installed correctly.
See Section 8 in the Introduction to the NAG Library FL Interface for further information.
Dynamic memory allocation failed.
See Section 9 in the Introduction to the NAG Library FL Interface for further information.
The computational errors in the array comm should be negligible in most practical situations.
8Parallelism and Performance
e01cff is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library.
Please consult the X06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this routine. Please also consult the Users' Note for your implementation for any additional implementation-specific information.
e01cff internally allocates reals.
This example reads in a set of data points, calls e01cef to compute a monotonic convex interpolant, and then calls e01cff to evaluate the interpolant at equally spaced points.