Class AMarketDataPostProcessor

    • Field Detail

      • asOfDateLevelInfo

        protected com.quartetfs.biz.pivot.cube.hierarchy.ILevelInfo asOfDateLevelInfo
      • marketDataSetLevelInfo

        protected com.quartetfs.biz.pivot.cube.hierarchy.ILevelInfo marketDataSetLevelInfo
      • riskFactorLevelInfo

        protected com.quartetfs.biz.pivot.cube.hierarchy.ILevelInfo riskFactorLevelInfo
      • sensitivityNameLevelInfo

        protected com.quartetfs.biz.pivot.cube.hierarchy.ILevelInfo sensitivityNameLevelInfo
      • riskClassLevelInfo

        protected com.quartetfs.biz.pivot.cube.hierarchy.ILevelInfo riskClassLevelInfo
      • maxFallbackDays

        protected int maxFallbackDays
      • sensitivityName

        protected String sensitivityName
      • dateProperty

        protected String dateProperty
      • marketDataFields

        protected List<String> marketDataFields
      • marketDataStoreName

        protected String marketDataStoreName
      • quoteField

        protected String quoteField
      • identifier

        protected String identifier
      • tenorAndMaturityDefaultValue

        protected String tenorAndMaturityDefaultValue
    • Constructor Detail

      • AMarketDataPostProcessor

        public AMarketDataPostProcessor​(String name,
                                        com.quartetfs.biz.pivot.cube.hierarchy.measures.IPostProcessorCreationContext creationContext)
    • Method Detail

      • getPostProcessorDescription

        protected 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,
                                                                                                                                       Integer maxFallbackDays,
                                                                                                                                       String dateInfo,
                                                                                                                                       String sensitivityName,
                                                                                                                                       String marketDataStoreName,
                                                                                                                                       String[] marketDataStoreFields,
                                                                                                                                       String tenorAndMaturityDefaultValue,
                                                                                                                                       String sensitivityNameLevelInfo,
                                                                                                                                       String interpolationDebugStringIdentifier,
                                                                                                                                       String formatter,
                                                                                                                                       String folder)
        This will create a PP configuration
        Parameters:
        builder - measure builder
        pluginKey - plugin key
        measureName - Name of the postprocessor
        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
        maxFallbackDays - max fallback days
        dateInfo - date info
        sensitivityName - sensitivity name
        marketDataStoreName - market data store name
        marketDataStoreFields - market data store fields
        tenorAndMaturityDefaultValue - default value for tenors and maturities
        sensitivityNameLevelInfo - sensitivity name level info
        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

        protected static com.activeviam.copper.api.CopperPostProcessor measure​(String pluginKey,
                                                                               com.activeviam.copper.api.CopperMeasure underlyingMeasures,
                                                                               String asOfDateLevel,
                                                                               String marketDataSetLevel,
                                                                               String riskFactorLevel,
                                                                               String riskClassLevel,
                                                                               Integer maxFallbackDays,
                                                                               String dateInfo,
                                                                               String sensitivityName,
                                                                               String marketDataStoreName,
                                                                               String[] marketDataStoreFields,
                                                                               String tenorAndMaturityDefaultValue,
                                                                               String sensitivityNameLevelInfo,
                                                                               String interpolationDebugStringIdentifier)
        This will create a PP configuration
        Parameters:
        pluginKey - plugin key
        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
        maxFallbackDays - max fallback days
        dateInfo - date info
        sensitivityName - sensitivity name
        marketDataStoreName - market data store name
        marketDataStoreFields - market data store fields
        tenorAndMaturityDefaultValue - default value for tenors and maturities
        sensitivityNameLevelInfo - sensitivity name level info
        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:
        post processor description
      • init

        public void init​(Properties properties)
                  throws com.quartetfs.fwk.QuartetException
        Three custom property needs to be present in the configuration of the post-processor:
        • keyLeafLevels: It's the value representing the key levels: AsOfDate, Risk Factor e.g.
          "AsOfDate@Date@Dates", "RiskFactor@Risk Factor@Risk" *
        • DateInfo: its value is the string representing the date property (either current date or precious date) e.g.
          "currentDate"
        • SensitivityName: its value is the string representing the sensi type, e.g.
          "Delta", "Vega", "Gamma" *
        • MaxFallback days: its value is the string representing the maximum fallback days for previous date market data. By default it is set to 1 e.g.
          "1"
        Specified by:
        init in interface com.quartetfs.biz.pivot.postprocessing.IEvaluator<com.qfs.vector.IVector>
        Specified by:
        init in interface com.quartetfs.biz.pivot.postprocessing.IPostProcessor<com.qfs.vector.IVector>
        Overrides:
        init in class com.quartetfs.biz.pivot.postprocessing.impl.ABasicPostProcessor<com.qfs.vector.IVector>
        Parameters:
        properties - The properties object.s
        Throws:
        com.quartetfs.fwk.QuartetException
      • evaluate

        public com.qfs.vector.IVector evaluate​(com.quartetfs.biz.pivot.ILocation leafLocation,
                                               Object[] underlyingMeasures)
        There is only one underlying measure here: the Double Sensi Value .
        Specified by:
        evaluate in interface com.quartetfs.biz.pivot.postprocessing.IEvaluator<com.qfs.vector.IVector>
        Specified by:
        evaluate in class com.quartetfs.biz.pivot.postprocessing.impl.ABasicPostProcessor<com.qfs.vector.IVector>
      • doEvaluate

        protected abstract com.qfs.vector.IVector doEvaluate​(com.quartetfs.biz.pivot.ILocation location,
                                                             LocalDate asOfDate,
                                                             String marketDataSet,
                                                             String riskFactor,
                                                             String riskClass,
                                                             String sensitivityName)
      • getMarketDataRecord

        protected Optional<com.qfs.store.record.IRecordReader> getMarketDataRecord​(LocalDate date,
                                                                                   String marketDataSet,
                                                                                   String riskFactor)
        Method that retrieves the market data for the current day
        Parameters:
        date - as of date
        marketDataSet - market data set context value
        riskFactor - risk factor
        Returns:
        market data for current day
      • stepDate

        protected LocalDate stepDate​(LocalDate date,
                                     boolean first)
        Step the as-of date forward or backwards according to dateProperty.
        Parameters:
        date - input date
        first - is this the first time this is called in a search
        Returns:
        the target date