public class SmithWilsonCurveFunction extends Object
The curve represents the discount factor values as a function of time.
The curve is controlled by omega, alpha and weights:
omega is related to the ultimate forward rate (UFR) by omega = log(1 + UFR),
the alpha parameter determines the rate of convergence to the UFR,
and the weights are the parameters to be calibrated to market data.
| Modifier and Type | Field and Description |
|---|---|
static SmithWilsonCurveFunction |
DEFAULT
Default implementation with UFR = 4.2%
|
| Modifier and Type | Method and Description |
|---|---|
double |
firstDerivative(double x,
double alpha,
DoubleArray nodes,
DoubleArray weights)
Computes the gradient of the Smith-Wilson curve function at a x value.
|
static double |
gap(double x,
double alpha,
DoubleArray nodes,
DoubleArray weights)
Computes the gap from the UFR at x value.
|
static SmithWilsonCurveFunction |
of(double ufr)
Creates an instance with UFR.
|
DoubleArray |
parameterSensitivity(double x,
double alpha,
DoubleArray nodes)
Computes the sensitivity of the Smith-Wilson curve function to weights parameters at a x value.
|
double |
value(double x,
double alpha,
DoubleArray nodes,
DoubleArray weights)
Evaluates the Smith-Wilson curve function at a x value.
|
public static final SmithWilsonCurveFunction DEFAULT
public static SmithWilsonCurveFunction of(double ufr)
ufr - the UFRpublic static double gap(double x,
double alpha,
DoubleArray nodes,
DoubleArray weights)
The nodes must be sorted in ascending order and coherent to weights.
x - the x valuealpha - the alpha parameternodes - the nodesweights - the weightspublic double value(double x,
double alpha,
DoubleArray nodes,
DoubleArray weights)
The nodes must be sorted in ascending order and coherent to weights.
x - the x valuealpha - the alpha parameternodes - the nodesweights - the weightspublic double firstDerivative(double x,
double alpha,
DoubleArray nodes,
DoubleArray weights)
The nodes must be sorted in ascending order and coherent to weights.
x - the x valuealpha - the alpha parameternodes - the nodesweights - the weightspublic DoubleArray parameterSensitivity(double x, double alpha, DoubleArray nodes)
The nodes must be sorted in ascending order.
x - the x valuealpha - the alpha parameternodes - the nodesCopyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.