Class AMarketDataPostProcessor<T>

    • Constructor Detail

      • AMarketDataPostProcessor

        public AMarketDataPostProcessor​(String name,
                                        com.quartetfs.biz.pivot.cube.hierarchy.measures.IPostProcessorCreationContext creationContext)
        Constructor
        Parameters:
        name - The name of the post-processor
        creationContext - The creation context of this post-processor.
    • Method Detail

      • getPostProcessorDescription

        public static com.activeviam.desc.build.ICanStartBuildingMeasures.BuildablePostProcessorBuilder getPostProcessorDescription​(com.activeviam.desc.build.ICanStartBuildingMeasures builder,
                                                                                                                                    String plugInKey,
                                                                                                                                    String measureName,
                                                                                                                                    String underlyingMeasures,
                                                                                                                                    String asOfDateLevel,
                                                                                                                                    String marketDataSetLevel,
                                                                                                                                    String riskFactorLevel,
                                                                                                                                    String riskClassLevel,
                                                                                                                                    String dateInfo,
                                                                                                                                    String sensitivityName,
                                                                                                                                    String marketDataStoreName,
                                                                                                                                    BucketType[] bucketTypes,
                                                                                                                                    Boolean interpolation,
                                                                                                                                    IMarketDataRetrievalService.MarketType typeOfMarketData,
                                                                                                                                    String interpolationDebugStringIdentifier,
                                                                                                                                    String formatter,
                                                                                                                                    String folder)
        This will create a PP configuration
        Parameters:
        builder - measure builder
        plugInKey - The key of the PP
        measureName - Name of the postprocessor
        underlyingMeasures - The input measure for location reference
        asOfDateLevel - Level containing the asOfSDate
        marketDataSetLevel - Level containing the market data set level
        riskFactorLevel - risk factor level
        riskClassLevel - risk class level
        dateInfo - date info
        sensitivityName - sensitivity name
        marketDataStoreName - market data store name
        bucketTypes - bucket types
        interpolation - force interpolation or not, can be null, for configured interpolation
        typeOfMarketData - type of the returned market data : absolute, relative, raw(as is)
        interpolationDebugStringIdentifier - internal identifier used in the query cache. The keys in the query cache that will be used have the following pattern: measure name + identifier + location
        formatter - formatter
        folder - Folder name of the metric, if not provider aka null measure is invisible
        Returns:
        post processor description
      • measure

        public static com.activeviam.copper.api.CopperPostProcessor measure​(String plugInKey,
                                                                            com.activeviam.copper.api.CopperMeasure underlyingMeasures,
                                                                            String asOfDateLevel,
                                                                            String marketDataSetLevel,
                                                                            String riskFactorLevel,
                                                                            String riskClassLevel,
                                                                            String dateInfo,
                                                                            String sensitivityName,
                                                                            String marketDataStoreName,
                                                                            BucketType[] bucketTypes,
                                                                            Boolean interpolation,
                                                                            IMarketDataRetrievalService.MarketType typeOfMarketData,
                                                                            String interpolationDebugStringIdentifier)
        This will create a PP configuration
        Parameters:
        plugInKey - The key of the PP
        underlyingMeasures - The underlying measure
        asOfDateLevel - Level containing the asOfSDate
        marketDataSetLevel - Level containing the market data set level
        riskFactorLevel - risk factor level
        riskClassLevel - risk class level
        dateInfo - date info
        sensitivityName - sensitivity name
        marketDataStoreName - market data store name
        bucketTypes - bucket types
        interpolation - force interpolation or not, can be null, for configured interpolation
        typeOfMarketData - type of the returned market data : absolute, relative, raw(as is)
        interpolationDebugStringIdentifier - internal identifier used in the query cache. The keys in the query cache that will be used have the following pattern: measure name + identifier + location
        Returns:
        measure builder
      • init

        public void init​(Properties properties)
                  throws com.quartetfs.fwk.QuartetException
        Specified by:
        init in interface com.quartetfs.biz.pivot.postprocessing.IEvaluator<T>
        Specified by:
        init in interface com.quartetfs.biz.pivot.postprocessing.IPostProcessor<T>
        Overrides:
        init in class com.quartetfs.biz.pivot.postprocessing.impl.ABasicPostProcessor<T>
        Throws:
        com.quartetfs.fwk.QuartetException
      • stepDate

        protected LocalDate stepDate​(LocalDate date)
        Step the as-of date forward or backwards according to dateProperty.
        Parameters:
        date - input date
        Returns:
        the target date
      • getEnableMDStringDebug

        protected boolean getEnableMDStringDebug()
        If the service should generate debug string
        Returns:
        true for debug string
      • evaluate

        public T evaluate​(com.quartetfs.biz.pivot.ILocation location,
                          Object[] underlyingMeasures)
        Specified by:
        evaluate in interface com.quartetfs.biz.pivot.postprocessing.IEvaluator<T>
        Specified by:
        evaluate in class com.quartetfs.biz.pivot.postprocessing.impl.ABasicPostProcessor<T>
      • evaluate

        protected abstract T evaluate​(com.quartetfs.biz.pivot.ILocation location,
                                      LocalDate asOfDate,
                                      String marketDataSet,
                                      String riskFactor,
                                      String riskClass,
                                      List<Object> leafCoordinatesSensi)
      • getMarketData

        protected double[] getMarketData​(com.quartetfs.biz.pivot.ILocation location,
                                         LocalDate asOfDate,
                                         String marketDataSet,
                                         String riskFactor,
                                         String riskClass,
                                         String sensitivityName,
                                         IMarketDataRetrievalService.IPillarSet[] ouputBuckets)
        Call the market data service
        Parameters:
        location - The current location
        asOfDate - The current date
        marketDataSet - The requested market data set
        riskFactor - The requested risk factor / underlying
        riskClass - The risk class of the risk factor
        sensitivityName - The sensitivity name of the current evaluated sensi
        ouputBuckets - The requested buckets map / pillars sets
        Returns:
        A vector of MD