Class InterpolationConfiguration

    • Constructor Detail

      • InterpolationConfiguration

        public InterpolationConfiguration​(org.springframework.core.env.Environment environment)
    • Method Detail

      • getMarketDataInterpolationFlag

        public boolean getMarketDataInterpolationFlag​(IServiceContext context,
                                                      String sensitivityKind,
                                                      String sensitivityName,
                                                      String riskClass)
        Description copied from interface: IInterpolationConfiguration
        Retrieves the flag that specifies whether interpolation of the market data is used for the computation of PnL explain
        Specified by:
        getMarketDataInterpolationFlag in interface IInterpolationConfiguration
        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
      • getMarketDataInterpolationFlag

        public boolean getMarketDataInterpolationFlag​(String sensitivityKind,
                                                      String sensitivityName,
                                                      String riskClass)
      • getPreMarketDataInterpolationFunction

        public BinaryOperator<Double> getPreMarketDataInterpolationFunction​(IServiceContext context,
                                                                            int axisIndex,
                                                                            String sensitivityKind,
                                                                            String sensitivityName,
                                                                            String riskClass)
        Description copied from interface: IInterpolationConfiguration
        Retrieves a function that performs a calculation on the market data for a given axis before interpolation of market data is done
        Specified by:
        getPreMarketDataInterpolationFunction in interface IInterpolationConfiguration
        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 BinaryOperator<Double> getPostMarketDataInterpolationFunction​(IServiceContext context,
                                                                             int axisIndex,
                                                                             String sensitivityKind,
                                                                             String sensitivityName,
                                                                             String riskClass)
        Description copied from interface: IInterpolationConfiguration
        Retrieves a function that performs a calculation on the market data for a given axis after interpolation of market data is done
        Specified by:
        getPostMarketDataInterpolationFunction in interface IInterpolationConfiguration
        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

        public boolean getShiftDataInterpolationFlag​(IServiceContext context,
                                                     String sensitivityKind,
                                                     String sensitivityName,
                                                     String riskClass)
        Description copied from interface: IInterpolationConfiguration
        Retrieves the flag that specifies whether interpolation of the shift data vector is used for the computation of VaR
        Specified by:
        getShiftDataInterpolationFlag in interface IInterpolationConfiguration
        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

        public BinaryOperator<Double> getPreShiftDataInterpolationFunction​(IServiceContext context,
                                                                           int axisIndex,
                                                                           String sensitivityKind,
                                                                           String sensitivityName,
                                                                           String riskClass)
        Description copied from interface: IInterpolationConfiguration
        Retrieves a function that performs a calculation on the shift data vector for a given axis before interpolation of shift data is done
        Specified by:
        getPreShiftDataInterpolationFunction in interface IInterpolationConfiguration
        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

        public BinaryOperator<Double> getPostShiftDataInterpolationFunction​(IServiceContext context,
                                                                            int axisIndex,
                                                                            String sensitivityKind,
                                                                            String sensitivityName,
                                                                            String riskClass)
        Description copied from interface: IInterpolationConfiguration
        Retrieves a function that performs a calculation on the shift data vector for a given axis after interpolation of shift data is done
        Specified by:
        getPostShiftDataInterpolationFunction in interface IInterpolationConfiguration
        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
      • getPrePostInterpolationCalculationMethod

        protected String getPrePostInterpolationCalculationMethod​(String sensitivityName,
                                                                  String riskClass,
                                                                  String prefix,
                                                                  int axis)
      • getInterpolationOrder

        public int[] getInterpolationOrder​(IServiceContext context,
                                           int maxDeep,
                                           String sensitivityKind,
                                           String sensitivityName,
                                           String riskClass)
        Description copied from interface: IInterpolationConfiguration
        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.
        Specified by:
        getInterpolationOrder in interface IInterpolationConfiguration
        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
      • isRelativeMarketData

        public boolean isRelativeMarketData​(IServiceContext context,
                                            String sensitivityKind,
                                            String sensitivityName,
                                            String riskClass)
        Description copied from interface: IInterpolationConfiguration
        Tells if the retrieved MD is absolute or relative
        Specified by:
        isRelativeMarketData in interface IInterpolationConfiguration
        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
      • isRelativeShiftData

        public boolean isRelativeShiftData​(IServiceContext context,
                                           String sensitivityKind,
                                           String sensitivityName,
                                           String riskClass)
        Description copied from interface: IInterpolationConfiguration
        Tells if the retrieved shift is absolute or relative
        Specified by:
        isRelativeShiftData in interface IInterpolationConfiguration
        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