Interface ParameterizedData
-
- All Known Subinterfaces:
BlackBondFutureVolatilities
,BlackFxOptionVolatilities
,BlackIborCapletFloorletVolatilities
,BlackSabrIborCapletFloorletVolatilities
,BlackSwaptionVolatilities
,BondFutureVolatilities
,BondYieldVolatilities
,CreditDiscountFactors
,Curve
,DiscountFactors
,FxForwardRates
,FxIndexRates
,FxOptionVolatilities
,IborCapletFloorletVolatilities
,IborFutureOptionVolatilities
,IborIndexRates
,NodalCurve
,NodalSurface
,NormalIborCapletFloorletVolatilities
,NormalIborFutureOptionVolatilities
,NormalSabrIborCapletFloorletVolatilities
,NormalSwaptionVolatilities
,OvernightIndexRates
,PriceIndexValues
,RecoveryRates
,SabrIborCapletFloorletVolatilities
,SabrSwaptionVolatilities
,SmileDeltaTermStructure
,Surface
,SwaptionVolatilities
- All Known Implementing Classes:
AddFixedCurve
,BlackBondFutureExpiryLogMoneynessVolatilities
,BlackFxOptionFlatVolatilities
,BlackFxOptionSmileVolatilities
,BlackFxOptionSurfaceVolatilities
,BlackIborCapletFloorletExpiryFlatVolatilities
,BlackIborCapletFloorletExpiryStrikeVolatilities
,BlackSwaptionExpiryTenorVolatilities
,CombinedCurve
,ConstantCurve
,ConstantNodalCurve
,ConstantRecoveryRates
,ConstantSurface
,DeformedSurface
,DiscountFxForwardRates
,DiscountIborIndexRates
,DiscountOvernightIndexRates
,ForwardFxIndexRates
,HistoricIborIndexRates
,HistoricOvernightIndexRates
,HistoricPriceIndexValues
,HybridNodalCurve
,InflationNodalCurve
,InterpolatedNodalCurve
,InterpolatedNodalSurface
,InterpolatedStrikeSmileDeltaTermStructure
,IsdaCreditDiscountFactors
,NormalBondYieldExpiryDurationVolatilities
,NormalIborCapletFloorletExpiryFlatVolatilities
,NormalIborCapletFloorletExpiryStrikeVolatilities
,NormalIborFutureOptionExpirySimpleMoneynessVolatilities
,NormalSabrParametersIborCapletFloorletVolatilities
,NormalSwaptionExpirySimpleMoneynessVolatilities
,NormalSwaptionExpiryStrikeVolatilities
,NormalSwaptionExpiryTenorVolatilities
,ParallelShiftedCurve
,ParameterizedFunctionalCurve
,SabrInterestRateParameters
,SabrParameters
,SabrParametersIborCapletFloorletVolatilities
,SabrParametersSwaptionVolatilities
,ShiftedBlackIborCapletFloorletExpiryStrikeVolatilities
,SimpleDiscountFactors
,SimpleIborIndexRates
,SimplePriceIndexValues
,SmileDeltaParameters
,ZeroRateDiscountFactors
,ZeroRatePeriodicDiscountFactors
public interface ParameterizedData
An abstraction of market data in terms of a number of arbitrarydouble
parameters.This interface provides an abstraction over many different kinds of market data, including curves, surfaces and cubes. This abstraction allows an API to be structured in such a way that it does not directly expose the underlying data. For example, swaption volatilities might be based on a surface or a cube.
Implementations must be immutable and thread-safe.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default OptionalInt
findParameterIndex(ParameterMetadata metadata)
Finds the parameter index of the specified metadata.double
getParameter(int parameterIndex)
Gets the value of the parameter at the specified index.int
getParameterCount()
Gets the number of parameters.ParameterMetadata
getParameterMetadata(int parameterIndex)
Gets the metadata of the parameter at the specified index.ParameterizedData
withParameter(int parameterIndex, double newValue)
Returns a copy of the data with the value at the specified index altered.default ParameterizedData
withPerturbation(ParameterPerturbation perturbation)
Returns a perturbed copy of the data.
-
-
-
Method Detail
-
getParameterCount
int getParameterCount()
Gets the number of parameters.This returns the number of parameters, which can be used to create a loop to access the other methods on this interface.
- Returns:
- the number of parameters
-
getParameter
double getParameter(int parameterIndex)
Gets the value of the parameter at the specified index.- Parameters:
parameterIndex
- the zero-based index of the parameter to get- Returns:
- the value of the parameter
- Throws:
IndexOutOfBoundsException
- if the index is invalid
-
getParameterMetadata
ParameterMetadata getParameterMetadata(int parameterIndex)
Gets the metadata of the parameter at the specified index.If there is no specific parameter metadata, an empty instance will be returned.
- Parameters:
parameterIndex
- the zero-based index of the parameter to get- Returns:
- the metadata of the parameter
- Throws:
IndexOutOfBoundsException
- if the index is invalid
-
findParameterIndex
default OptionalInt findParameterIndex(ParameterMetadata metadata)
Finds the parameter index of the specified metadata.If the parameter metadata is not matched, an empty optional will be returned.
- Parameters:
metadata
- the parameter metadata to find the index of- Returns:
- the index of the parameter
-
withParameter
ParameterizedData withParameter(int parameterIndex, double newValue)
Returns a copy of the data with the value at the specified index altered.This instance is immutable and unaffected by this method call.
- Parameters:
parameterIndex
- the zero-based index of the parameter to getnewValue
- the new value for the specified parameter- Returns:
- a parameterized data instance based on this with the specified parameter altered
- Throws:
IndexOutOfBoundsException
- if the index is invalid
-
withPerturbation
default ParameterizedData withPerturbation(ParameterPerturbation perturbation)
Returns a perturbed copy of the data.The perturbation instance will be invoked once for each parameter in this instance, returning the perturbed value for that parameter. The result of this method is a new instance that is based on those perturbed values.
This instance is immutable and unaffected by this method call.
- Parameters:
perturbation
- the perturbation to apply- Returns:
- a parameterized data instance based on this with the specified perturbation applied
-
-