Class ExtendedPnLExplainFormulaProvider

    • Field Detail

      • VOLATILITY_TO_VARIANCE

        public static String VOLATILITY_TO_VARIANCE
      • VARIANCE_TO_VOLATILITY

        public static String VARIANCE_TO_VOLATILITY
    • Constructor Detail

      • ExtendedPnLExplainFormulaProvider

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

      • getPrePostInterpolationCalculationMethod

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

        public com.quartetfs.fwk.impl.Pair<Double,​String> computeInterpolatedMarketDataForTriDimensionalVectorisedSensitivities​(com.qfs.vector.IVector finalQuote,
                                                                                                                                      Map.Entry<Double,​Integer> tenor,
                                                                                                                                      TreeMap<Double,​Integer> inputTenors,
                                                                                                                                      Map.Entry<Double,​Integer> maturity,
                                                                                                                                      TreeMap<Double,​Integer> inputMaturities,
                                                                                                                                      Map.Entry<Double,​Integer> moneyness,
                                                                                                                                      TreeMap<Double,​Integer> inputMoneyness,
                                                                                                                                      BiFunction<Double,​Double,​Double> preInterpolationCalcTenors,
                                                                                                                                      BiFunction<Double,​Double,​Double> postInterpolationCalcTenors,
                                                                                                                                      BiFunction<Double,​Double,​Double> preInterpolationCalcMaturities,
                                                                                                                                      BiFunction<Double,​Double,​Double> postInterpolationCalcMaturities,
                                                                                                                                      BiFunction<Double,​Double,​Double> preInterpolationCalcMoneyness,
                                                                                                                                      BiFunction<Double,​Double,​Double> postInterpolationCalcMoneyness,
                                                                                                                                      boolean enableDebugString)
        Description copied from interface: IPnLExplainFormulaProvider
        Computes the interpolation of market daa in the case of a vectorised 3D-sensitivity
        Specified by:
        computeInterpolatedMarketDataForTriDimensionalVectorisedSensitivities in interface IPnLExplainFormulaProvider
        Overrides:
        computeInterpolatedMarketDataForTriDimensionalVectorisedSensitivities in class PnLExplainFormulaProvider
        Parameters:
        finalQuote - The IVector containing the market data
        tenor - The map of all the tenors
        inputTenors - The map of tenors corresponding to the market data entry
        maturity - The map of all the maturities
        inputMaturities - The map of maturities corresponding to the market data entry
        moneyness - The map of all the moneyness values
        inputMoneyness - The map of moneyness values corresponding to the market data entry
        preInterpolationCalcTenors - The function computed before the interpolation of market data is performed on the tenor axis
        postInterpolationCalcTenors - The function computed after the interpolation of market data is performed on the tenor axis
        preInterpolationCalcMaturities - The function computed before the interpolation of market data is performed on the maturity axis
        postInterpolationCalcMaturities - The function computed after the interpolation of market data is performed on the maturity axis
        preInterpolationCalcMoneyness - The function computed before the interpolation of market data is performed on the moneyness axis
        postInterpolationCalcMoneyness - The function computed after the interpolation of market data is performed on the moneyness axis
        enableDebugString - Flag used to enable the generation of a debug string for market data interpolation. If set to 'true', the string is generated, if set to 'false', it is not generated
        Returns:
        A Pair<Double, String> containing the interpolated market data on the left-hand side and the interpolation debug string on the right-hand side
      • getMarketDataValueForScalarInterpolation

        public com.quartetfs.fwk.impl.Pair<Double,​String> getMarketDataValueForScalarInterpolation​(MarketPrice marketDataRecord,
                                                                                                         List<String> pos,
                                                                                                         int[] interpolationOrder)
        Description copied from interface: IPnLExplainFormulaProvider
        Retrieves the market data from a MarketPrice record
        Specified by:
        getMarketDataValueForScalarInterpolation in interface IPnLExplainFormulaProvider
        Overrides:
        getMarketDataValueForScalarInterpolation in class PnLExplainFormulaProvider
        Parameters:
        marketDataRecord - The market price record
        pos - A list representing the position of the market daa to retrieve on each axis
        interpolationOrder - 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.
        Returns:
        A Pair<Double, String> containing the market data (interpolated if interpolation is enabled) on the left-hand side and the interpolation debug string on the right-hand side