Interface NodalCurveDefinition
-
- All Superinterfaces:
CurveDefinition
- All Known Implementing Classes:
InterpolatedNodalCurveDefinition
public interface NodalCurveDefinition extends CurveDefinition
Provides the definition of how to calibrate a nodal curve.A nodal curve is built from a number of parameters and described by metadata. Calibration is based on a list of
CurveNodeinstances, one for each parameter, that specify the underlying instruments.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description NodalCurvecurve(LocalDate valuationDate, CurveMetadata metadata, DoubleArray parameters)Creates the curve from an array of parameter values.NodalCurveDefinitionfiltered(LocalDate valuationDate, ReferenceData refData)Returns a filtered version of this definition with no invalid nodes.default intgetParameterCount()Gets the number of parameters in the curve.default ImmutableList<Double>initialGuess(MarketData marketData)Gets the list of all initial guesses.-
Methods inherited from interface com.opengamma.strata.market.curve.CurveDefinition
getName, getNodes, getYValueType, metadata, toCurveParameterSize
-
-
-
-
Method Detail
-
getParameterCount
default int getParameterCount()
Description copied from interface:CurveDefinitionGets the number of parameters in the curve.This returns the number of parameters in the curve, which is not necessarily equal the size of
getNodes().- Specified by:
getParameterCountin interfaceCurveDefinition- Returns:
- the number of parameters
-
filtered
NodalCurveDefinition filtered(LocalDate valuationDate, ReferenceData refData)
Description copied from interface:CurveDefinitionReturns a filtered version of this definition with no invalid nodes.A curve is formed of a number of nodes, each of which has an associated date. To be valid, the curve node dates must be in order from earliest to latest. Each node has certain rules,
CurveNodeDateOrder, that are used to determine what happens if the date of one curve node is equal or earlier than the date of the previous node.Filtering occurs in two stages. The first stage looks at each node in turn. The previous and next nodes are checked for clash. If clash occurs, then one of the two nodes is dropped according to the clash action "drop" values. The second stage then looks again at the nodes, and if there are still any invalid nodes, an exception is thrown.
This approach means that in most cases, only those nodes that have fixed dates, such as futures, need to be annotated with
CurveNodeDateOrder.- Specified by:
filteredin interfaceCurveDefinition- Parameters:
valuationDate- the valuation daterefData- the reference data- Returns:
- the resolved definition, that should be used in preference to this one
-
curve
NodalCurve curve(LocalDate valuationDate, CurveMetadata metadata, DoubleArray parameters)
Description copied from interface:CurveDefinitionCreates the curve from an array of parameter values.The meaning of the parameters is determined by the implementation. The size of the array must match the count of parameters.
- Specified by:
curvein interfaceCurveDefinition- Parameters:
valuationDate- the valuation datemetadata- the curve metadataparameters- the array of parameters- Returns:
- the curve
-
initialGuess
default ImmutableList<Double> initialGuess(MarketData marketData)
Description copied from interface:CurveDefinitionGets the list of all initial guesses.This returns initial guess for the curve parameters. The valuation date is defined by the market data.
- Specified by:
initialGuessin interfaceCurveDefinition- Parameters:
marketData- the market data required to build a trade for the instrument, including the valuation date- Returns:
- the initial guess
-
-