Class ParameterizedFunctionalCurveDefinition.Builder
- java.lang.Object
-
- org.joda.beans.impl.direct.DirectFieldsBeanBuilder<ParameterizedFunctionalCurveDefinition>
-
- com.opengamma.strata.market.curve.ParameterizedFunctionalCurveDefinition.Builder
-
- All Implemented Interfaces:
org.joda.beans.BeanBuilder<ParameterizedFunctionalCurveDefinition>
- Enclosing class:
- ParameterizedFunctionalCurveDefinition
public static final class ParameterizedFunctionalCurveDefinition.Builder extends org.joda.beans.impl.direct.DirectFieldsBeanBuilder<ParameterizedFunctionalCurveDefinition>
The bean-builder forParameterizedFunctionalCurveDefinition
.
-
-
Method Summary
-
-
-
Method Detail
-
get
public Object get(String propertyName)
- Specified by:
get
in interfaceorg.joda.beans.BeanBuilder<ParameterizedFunctionalCurveDefinition>
- Overrides:
get
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<ParameterizedFunctionalCurveDefinition>
-
set
public ParameterizedFunctionalCurveDefinition.Builder set(String propertyName, Object newValue)
-
set
public ParameterizedFunctionalCurveDefinition.Builder set(org.joda.beans.MetaProperty<?> property, Object value)
- Specified by:
set
in interfaceorg.joda.beans.BeanBuilder<ParameterizedFunctionalCurveDefinition>
- Overrides:
set
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<ParameterizedFunctionalCurveDefinition>
-
build
public ParameterizedFunctionalCurveDefinition build()
-
name
public ParameterizedFunctionalCurveDefinition.Builder name(CurveName name)
Sets the curve name.- Parameters:
name
- the new value, not null- Returns:
- this, for chaining, not null
-
xValueType
public ParameterizedFunctionalCurveDefinition.Builder xValueType(ValueType xValueType)
Sets the x-value type, providing meaning to the x-values of the curve.This type provides meaning to the x-values. For example, the x-value might represent a year fraction, as represented using
ValueType.YEAR_FRACTION
.If using the builder, this defaults to
ValueType.UNKNOWN
.- Parameters:
xValueType
- the new value, not null- Returns:
- this, for chaining, not null
-
yValueType
public ParameterizedFunctionalCurveDefinition.Builder yValueType(ValueType yValueType)
Sets the y-value type, providing meaning to the y-values of the curve.This type provides meaning to the y-values. For example, the y-value might represent a zero rate, as represented using
ValueType.ZERO_RATE
.If using the builder, this defaults to
ValueType.UNKNOWN
.- Parameters:
yValueType
- the new value, not null- Returns:
- this, for chaining, not null
-
dayCount
public ParameterizedFunctionalCurveDefinition.Builder dayCount(DayCount dayCount)
Sets the day count, optional.If the x-value of the curve represents time as a year fraction, the day count can be specified to define how the year fraction is calculated.
- Parameters:
dayCount
- the new value- Returns:
- this, for chaining, not null
-
nodes
public ParameterizedFunctionalCurveDefinition.Builder nodes(List<? extends CurveNode> nodes)
Sets the nodes of the underlying instruments.The nodes are used to find the quoted values to which the curve is calibrated.
- Parameters:
nodes
- the new value, not null- Returns:
- this, for chaining, not null
-
nodes
public ParameterizedFunctionalCurveDefinition.Builder nodes(CurveNode... nodes)
Sets thenodes
property in the builder from an array of objects.- Parameters:
nodes
- the new value, not null- Returns:
- this, for chaining, not null
-
initialGuess
public ParameterizedFunctionalCurveDefinition.Builder initialGuess(List<Double> initialGuess)
Sets the initial guess values for the curve parameters.The size must be the same as the number of the curve parameters.
- Parameters:
initialGuess
- the new value, not null- Returns:
- this, for chaining, not null
-
initialGuess
public ParameterizedFunctionalCurveDefinition.Builder initialGuess(Double... initialGuess)
Sets theinitialGuess
property in the builder from an array of objects.- Parameters:
initialGuess
- the new value, not null- Returns:
- this, for chaining, not null
-
parameterMetadata
public ParameterizedFunctionalCurveDefinition.Builder parameterMetadata(List<? extends ParameterMetadata> parameterMetadata)
Sets the parameter metadata of the curve, defaulted to empty metadata instances.The size of the list must be the same as the number of the curve parameters.
- Parameters:
parameterMetadata
- the new value, not null- Returns:
- this, for chaining, not null
-
parameterMetadata
public ParameterizedFunctionalCurveDefinition.Builder parameterMetadata(ParameterMetadata... parameterMetadata)
Sets theparameterMetadata
property in the builder from an array of objects.- Parameters:
parameterMetadata
- the new value, not null- Returns:
- this, for chaining, not null
-
valueFunction
public ParameterizedFunctionalCurveDefinition.Builder valueFunction(BiFunction<DoubleArray,Double,Double> valueFunction)
Sets the y-value function.The function takes
parameters
and x-value, then returns y-value.- Parameters:
valueFunction
- the new value, not null- Returns:
- this, for chaining, not null
-
derivativeFunction
public ParameterizedFunctionalCurveDefinition.Builder derivativeFunction(BiFunction<DoubleArray,Double,Double> derivativeFunction)
Sets the derivative function.The function takes
parameters
and x-value, then returns the first derivative of y-value with respective to x, i.e., the gradient of the curve.- Parameters:
derivativeFunction
- the new value, not null- Returns:
- this, for chaining, not null
-
sensitivityFunction
public ParameterizedFunctionalCurveDefinition.Builder sensitivityFunction(BiFunction<DoubleArray,Double,DoubleArray> sensitivityFunction)
Sets the parameter sensitivity function.The function takes
parameters
and x-value, then returns the sensitivities of y-value to the parameters.- Parameters:
sensitivityFunction
- the new value, not null- Returns:
- this, for chaining, not null
-
toString
public String toString()
- Overrides:
toString
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<ParameterizedFunctionalCurveDefinition>
-
-