Interface IInterpolationConfiguration

    • Method Detail

      • getMarketDataInterpolationFlag

        boolean getMarketDataInterpolationFlag​(IServiceContext context,
                                               String sensitivityKind,
                                               String sensitivityName,
                                               String riskClass)
        Retrieves the flag that specifies whether interpolation of the market data is used for the computation of PnL explain
        Parameters:
        context - The caller context
        sensitivityKind - The type of sensitivity delta / gamma /vega / ....
        sensitivityName - the sensitivity name
        riskClass - the risk class
        Returns:
        A boolean flag that is true if interpolation is used and false otherwise
      • getPreMarketDataInterpolationFunction

        BinaryOperator<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 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

        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 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
      • getShiftDataInterpolationFlag

        boolean getShiftDataInterpolationFlag​(IServiceContext context,
                                              String sensitivityKind,
                                              String sensitivityName,
                                              String riskClass)
        Retrieves the flag that specifies whether interpolation of the shift data vector is used for the computation of VaR
        Parameters:
        context - The caller context
        sensitivityKind - The type of sensitivity delta / gamma /vega / ...
        sensitivityName - the sensitivity name
        riskClass - the risk class
        Returns:
        A boolean flag that is true if interpolation is used and false otherwise
      • getPreShiftDataInterpolationFunction

        BinaryOperator<Double> getPreShiftDataInterpolationFunction​(IServiceContext context,
                                                                    int axisIndex,
                                                                    String sensitivityKind,
                                                                    String sensitivityName,
                                                                    String riskClass)
        Retrieves a function that performs a calculation on the shift data vector for a given axis before interpolation of shift 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, shift) -> intermediate, pillar is the current location of the shift, interpolation will be made on intermediate Pre and Post functions must give identity on a non interpolated point for consistency Post(pillar, Pre(pillar, shift) = (pillar, shift) -> shift
      • getPostShiftDataInterpolationFunction

        BinaryOperator<Double> getPostShiftDataInterpolationFunction​(IServiceContext context,
                                                                     int axisIndex,
                                                                     String sensitivityKind,
                                                                     String sensitivityName,
                                                                     String riskClass)
        Retrieves a function that performs a calculation on the shift data vector for a given axis after interpolation of shift 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) -> shift, pillar is the target location of the shift, intermediate is the interpolated value Pre and Post functions must give identity on a non interpolated point for consistency Post(pillar, Pre(pillar, shift) = (pillar, shift) -> shift
      • getInterpolationOrder

        int[] getInterpolationOrder​(IServiceContext context,
                                    int maxDeep,
                                    String sensitivityKind,
                                    String sensitivityName,
                                    String riskClass)
        Retrieves an arrays that gives the order in which the interpolation of market data is performed. That order is defined as an int[] in which each index indicates the order in which each of the axis defined in the bucketTypes parameter is processed during the interpolation calculation, starting at the value 0. Ex: if there are three elements defined in bucketTypes like: {BucketType.TENOR_INPUT, BucketType.MATURITY_INPUT, BucketType.MONEYNESS_INPUT} and if the interpolation order is defined as: 0,1,2, the interpolation will first be done on the tenors axis, then on the maturity axis, and then on the moneyness axis.
        Parameters:
        context - The caller context
        maxDeep - number of axis
        sensitivityKind - The type of sensitivity delta / gamma /vega / ...
        sensitivityName - sensitivity name
        riskClass - risk class
        Returns:
        An array with the axis number from the last to the first
      • fixPillarSet

        IMarketDataRetrievalService.IPillarSet fixPillarSet​(IServiceContext context,
                                                            IMarketDataRetrievalService.IPillarSet pillarSet,
                                                            int axisIndex,
                                                            String sensitivityKind,
                                                            String sensitivityName,
                                                            String riskClass)
        Can modify on the fly the input pillar set before retrieval if you want to modify the equality condition check the class ModifiedPillarSetOfPillar that could encapsulate the provided pillars
        Parameters:
        context - The caller context
        pillarSet - The pillar set to fix
        axisIndex - The axis number corresponding to the pillar set
        sensitivityKind - The type of sensitivity delta / gamma /vega / ...
        sensitivityName - sensitivity name
        riskClass - risk class
        Returns:
        mainly the pillar set
      • isRelativeMarketData

        boolean isRelativeMarketData​(IServiceContext context,
                                     String sensitivityKind,
                                     String sensitivityName,
                                     String riskClass)
        Tells if the retrieved MD is absolute or relative
        Parameters:
        context - The caller context
        sensitivityKind - The type of sensitivity delta / gamma /vega / ...
        sensitivityName - sensitivity name
        riskClass - risk class
        Returns:
        true for relative data (ratio of nominal), false for absolute MD
      • absoluteToRelativeMarketDataOperator

        DoubleBinaryOperator absoluteToRelativeMarketDataOperator​(IServiceContext context,
                                                                  String sensitivityKind,
                                                                  String sensitivityName,
                                                                  String riskClass)
        The way to convert absolute MD to relative MD
        Parameters:
        context - The caller context
        sensitivityKind - The type of sensitivity delta / gamma /vega / ...
        sensitivityName - sensitivity name
        riskClass - risk class
        Returns:
        the formula, for instance (nominal, md) -> md / nominal
      • relativeToAbsoluteMarketDataOperator

        DoubleBinaryOperator relativeToAbsoluteMarketDataOperator​(IServiceContext context,
                                                                  String sensitivityKind,
                                                                  String sensitivityName,
                                                                  String riskClass)
        The way to convert relative MD to absolute MD
        Parameters:
        context - The caller context
        sensitivityKind - The type of sensitivity delta / gamma /vega / ...
        sensitivityName - sensitivity name
        riskClass - risk class
        Returns:
        the formula, for instance (nominal, md) -> md * nominal
      • isRelativeShiftData

        boolean isRelativeShiftData​(IServiceContext context,
                                    String sensitivityKind,
                                    String sensitivityName,
                                    String riskClass)
        Tells if the retrieved shift is absolute or relative
        Parameters:
        context - The caller context
        sensitivityKind - The type of sensitivity delta / gamma /vega / ...
        sensitivityName - sensitivity name
        riskClass - risk class
        Returns:
        true for relative data (ratio of nominal), false for absolute shift
      • absoluteToRelativeShiftOperator

        DoubleBinaryOperator absoluteToRelativeShiftOperator​(IServiceContext context,
                                                             String sensitivityKind,
                                                             String sensitivityName,
                                                             String riskClass)
        The way to convert absolute shift to relative shift
        Parameters:
        context - The caller context
        sensitivityKind - The type of sensitivity delta / gamma /vega / ...
        sensitivityName - sensitivity name
        riskClass - risk class
        Returns:
        the formula, for instance (md, shift) -> shift / md
      • relativeToAbsoluteShiftOperator

        DoubleBinaryOperator relativeToAbsoluteShiftOperator​(IServiceContext context,
                                                             String sensitivityKind,
                                                             String sensitivityName,
                                                             String riskClass)
        The way to convert relative shift to absolute shift
        Parameters:
        context - The caller context
        sensitivityKind - The type of sensitivity delta / gamma /vega / ...
        sensitivityName - sensitivity name
        riskClass - risk class
        Returns:
        the formula, for instance (md, shift) -> shift * md