Class InterpolationDouble
- java.lang.Object
-
- com.activeviam.risk.ref.services.impl.marketdataretrieval.AInterpolation<double[],Double>
-
- com.activeviam.risk.ref.services.impl.marketdataretrieval.InterpolationDouble
-
- All Implemented Interfaces:
IInterpolation<double[],Double>
public class InterpolationDouble extends AInterpolation<double[],Double>
This class defines methods to interpolate double
-
-
Field Summary
-
Fields inherited from class com.activeviam.risk.ref.services.impl.marketdataretrieval.AInterpolation
interpolationConfiguration, maturityConverter
-
-
Constructor Summary
Constructors Constructor Description InterpolationDouble(IMaturityConverter maturityConverter, IInterpolationConfiguration interpolationConfiguration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BinaryOperator<Double>
getPostMarketDataInterpolationFunction(IServiceContext context, int axisIndex, String sensitivityKind, String sensitivityName, String riskClass)
Retrieves a function that performs a calculation on the market data for a given axis after interpolation of market data is doneBinaryOperator<Double>
getPreMarketDataInterpolationFunction(IServiceContext context, int axisIndex, String sensitivityKind, String sensitivityName, String riskClass)
Retrieves a function that performs a calculation on the market data for a given axis before interpolation of market data is donecom.quartetfs.fwk.impl.Pair<Double,String>
interpolation(boolean generateDebugString, Double position, NavigableSet<Double> plots, BiFunction<Double,Double,Double> preInterpolationCalculation, BiFunction<Double,Double,Double> postInterpolationCalculation, Function<Double,com.quartetfs.fwk.impl.Pair<Double,String>> retriever)
Linear interpolation between two plots of a value-
Methods inherited from class com.activeviam.risk.ref.services.impl.marketdataretrieval.AInterpolation
applyCalculation, computeShift, convertBucketToMaturity, generateDebugString, getDebugString, getMarketDataInterpolate, handleDebug, interpolate, interpolate, interpolation, removeOnePlot
-
-
-
-
Constructor Detail
-
InterpolationDouble
public InterpolationDouble(IMaturityConverter maturityConverter, IInterpolationConfiguration interpolationConfiguration)
-
-
Method Detail
-
getPreMarketDataInterpolationFunction
public BinaryOperator<Double> getPreMarketDataInterpolationFunction(IServiceContext context, int axisIndex, String sensitivityKind, String sensitivityName, String riskClass)
Description copied from interface:IInterpolation
Retrieves a function that performs a calculation on the market data for a given axis before interpolation of market data is done- Parameters:
context
- The caller contextaxisIndex
- index of the axissensitivityKind
- The type of sensitivity delta / gamma /vega / ....sensitivityName
- sensitivity nameriskClass
- risk class- Returns:
- A function with that prototype
(pillar, md) -> intermediate
, pillar is the current location of the md, interpolation will be made on intermediate Pre and Post functions must give identity on a non interpolated point for consistencyPost(pillar, Pre(pillar, md) = (pillar, md) -> md
-
getPostMarketDataInterpolationFunction
public BinaryOperator<Double> getPostMarketDataInterpolationFunction(IServiceContext context, int axisIndex, String sensitivityKind, String sensitivityName, String riskClass)
Description copied from interface:IInterpolation
Retrieves a function that performs a calculation on the market data for a given axis after interpolation of market data is done- Parameters:
context
- The caller contextaxisIndex
- index of the axissensitivityKind
- The type of sensitivity delta / gamma /vega / ....sensitivityName
- sensitivity nameriskClass
- risk class- Returns:
- A function with that prototype
(pillar, intermediate) -> md
, pillar is the target location of the md, intermediate is the interpolated value Pre and Post functions must give identity on a non interpolated point for consistencyPost(pillar, Pre(pillar, md) = (pillar, md) -> md
-
interpolation
public com.quartetfs.fwk.impl.Pair<Double,String> interpolation(boolean generateDebugString, Double position, NavigableSet<Double> plots, BiFunction<Double,Double,Double> preInterpolationCalculation, BiFunction<Double,Double,Double> postInterpolationCalculation, Function<Double,com.quartetfs.fwk.impl.Pair<Double,String>> retriever)
Description copied from interface:IInterpolation
Linear interpolation between two plots of a value- Parameters:
generateDebugString
- flag to enable the generation of the interpolation debug stringposition
- the position to interpolateplots
- the available reference positionspreInterpolationCalculation
- The functions computed before the interpolation of market data is performed, defined for the current axis.postInterpolationCalculation
- The functions computed after the interpolation of market data is performed, defined for the current axis.retriever
- the function that return the value on a reference plot- Returns:
- the interpolated value
-
-