Class InterpolationVector

  • All Implemented Interfaces:
    IInterpolation<com.qfs.vector.IVector[],​com.qfs.vector.IVector>

    public class InterpolationVector
    extends AInterpolation<com.qfs.vector.IVector[],​com.qfs.vector.IVector>
    • Method Detail

      • getPreMarketDataInterpolationFunction

        public BiFunction<Double,​com.qfs.vector.IVector,​com.qfs.vector.IVector> 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 context
        axisIndex - index of the axis
        sensitivityKind - The type of sensitivity delta / gamma /vega / ....
        sensitivityName - sensitivity name
        riskClass - 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 consistency Post(pillar, Pre(pillar, md) = (pillar, md) -> md
      • getPostMarketDataInterpolationFunction

        public BiFunction<Double,​com.qfs.vector.IVector,​com.qfs.vector.IVector> 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 context
        axisIndex - index of the axis
        sensitivityKind - The type of sensitivity delta / gamma /vega / ....
        sensitivityName - sensitivity name
        riskClass - 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 consistency Post(pillar, Pre(pillar, md) = (pillar, md) -> md
      • getIVectorFromDoubleFunction

        protected BiFunction<Double,​com.qfs.vector.IVector,​com.qfs.vector.IVector> getIVectorFromDoubleFunction​(BinaryOperator<Double> interpolationCalculation)
      • interpolation

        public com.quartetfs.fwk.impl.Pair<com.qfs.vector.IVector,​String> interpolation​(boolean generateDebugString,
                                                                                              Double position,
                                                                                              NavigableSet<Double> plots,
                                                                                              BiFunction<Double,​com.qfs.vector.IVector,​com.qfs.vector.IVector> preInterpolationCalculation,
                                                                                              BiFunction<Double,​com.qfs.vector.IVector,​com.qfs.vector.IVector> postInterpolationCalculation,
                                                                                              Function<Double,​com.quartetfs.fwk.impl.Pair<com.qfs.vector.IVector,​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 string
        position - the position to interpolate
        plots - the available reference positions
        preInterpolationCalculation - 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