Class AMarketDataPostProcessor<T>
- java.lang.Object
-
- com.quartetfs.biz.pivot.postprocessing.impl.AAdvancedPostProcessor<OutputType>
-
- com.quartetfs.biz.pivot.postprocessing.impl.ABasicPostProcessor<T>
-
- com.activeviam.risk.core.postprocessor.impl.AMarketDataPostProcessor<T>
-
- All Implemented Interfaces:
ICustomParametersAware
,IMarketDataRetrievalServiceAware
,com.quartetfs.biz.pivot.postprocessing.IAggregatedMeasureAware
,com.quartetfs.biz.pivot.postprocessing.IBasicPostProcessor<T>
,com.quartetfs.biz.pivot.postprocessing.IEvaluator<T>
,com.quartetfs.biz.pivot.postprocessing.IPartitionedPostProcessor<T>
,com.quartetfs.biz.pivot.postprocessing.IPostProcessor<T>
,com.quartetfs.fwk.types.IExtendedPluginValue
,Serializable
- Direct Known Subclasses:
MarketDataPostProcessor
,ScalarMarketDataPostProcessor
public abstract class AMarketDataPostProcessor<T> extends com.quartetfs.biz.pivot.postprocessing.impl.ABasicPostProcessor<T> implements ICustomParametersAware, IMarketDataRetrievalServiceAware
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.quartetfs.biz.pivot.postprocessing.impl.ABasicPostProcessor
BASIC_POST_PROCESSOR_PREFETCHER, isPartitionedOnRangeLevels
-
Fields inherited from class com.quartetfs.biz.pivot.postprocessing.impl.AAdvancedPostProcessor
aggregatedMeasureName, ANALYSIS_LEVELS_PROPERTY, analysisLevelsToExpand, continuousQueryHandlerKeys, derivedContextDependencies, evaluator, EVALUATOR, explicitContextDependencies, logger, measuresProvider, name, OUTPUT_TYPE, outputType, pivot, prefetchers, PRINT_TIMINGS, printTimings, properties, underlyingMeasures
-
Fields inherited from interface com.activeviam.risk.core.services.ICustomParametersAware
PROPERTY_NAME
-
Fields inherited from interface com.activeviam.risk.core.services.IMarketDataRetrievalServiceAware
PROPERTY_NAME
-
-
Constructor Summary
Constructors Constructor Description AMarketDataPostProcessor(String name, com.quartetfs.biz.pivot.cube.hierarchy.measures.IPostProcessorCreationContext creationContext)
Constructor
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description T
evaluate(com.quartetfs.biz.pivot.ILocation location, Object[] underlyingMeasures)
protected abstract T
evaluate(com.quartetfs.biz.pivot.ILocation location, LocalDate asOfDate, String marketDataSet, String riskFactor, String riskClass, List<Object> leafCoordinatesSensi)
protected boolean
getEnableMDStringDebug()
If the service should generate debug stringprotected 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 servicestatic 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 configurationvoid
init(Properties properties)
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 configurationvoid
setCustomParameters(ICustomParameters customParameters)
void
setMarketDataRetrievalService(IMarketDataRetrievalService marketDataRetrievalService)
Set the implementation ofIMarketDataRetrievalService
protected LocalDate
stepDate(LocalDate date)
Step the as-of date forward or backwards according todateProperty
.-
Methods inherited from class com.quartetfs.biz.pivot.postprocessing.impl.ABasicPostProcessor
checkPrefetchers, compute, computePrefetchFilter, createPrefetchers, createProcedure, evaluate, initializeUnderlyingMeasures, reduce, setPartitioningLevels, supportsAnalysisLevels
-
Methods inherited from class com.quartetfs.biz.pivot.postprocessing.impl.AAdvancedPostProcessor
addContextDependency, checkInterruption, checkOutputType, computeNamePath, computeOutputType, createEvaluator, expandResult, getActivePivot, getContext, getContextDependencies, getContinuousQueryHandlerKeys, getCurrentMeasure, getDatastoreVersion, getDerivedContextDependencies, getExpansionProcedure, getGenericOutputType, getMeasuresProvider, getName, getOutputType, getOutputTypeFromGenericClassParameter, getOutputTypeFromProperties, getPrefetchers, getProperties, getQueryCache, getTypeFromClass, handleCircularDependency, handleNotSupportedAnalysisLevels, handleUnknownUnderlyingMeasure, hideEvaluator, initializeContinuousQueryHandlerKeys, removeAnalysisLevelsFromFilter, restrictLocationAnalysisLevels, retrieveAnalysisLevelsToExpand, retrieveNamedPrefetchAggregatesWithAnalysisLevels, retrievePrefetchAggregates, retrievePrefetchAggregatesWithAnalysisLevels, setAggregatedMeasureName, toString
-
-
-
-
Field Detail
-
DATE_INFO
public static final String DATE_INFO
- See Also:
- Constant Field Values
-
MARKET_DATA_STORE_NAME
public static final String MARKET_DATA_STORE_NAME
- See Also:
- Constant Field Values
-
SENSITIVITY_NAME_PROPERTY
public static final String SENSITIVITY_NAME_PROPERTY
- See Also:
- Constant Field Values
-
DEBUG_ID
public static final String DEBUG_ID
- See Also:
- Constant Field Values
-
BUCKET_TYPES
public static final String BUCKET_TYPES
- See Also:
- Constant Field Values
-
KEY_LEAF_LEVELS
public static final String KEY_LEAF_LEVELS
- See Also:
- Constant Field Values
-
INTERPOLATION_FLAG
public static final String INTERPOLATION_FLAG
- See Also:
- Constant Field Values
-
TYPE_OF_MARKET_DATA
public static final String TYPE_OF_MARKET_DATA
- See Also:
- Constant Field Values
-
customParameters
protected transient ICustomParameters customParameters
-
marketDataRetrievalService
protected transient IMarketDataRetrievalService marketDataRetrievalService
-
locationFunctionMD
protected transient ICustomParameters.ILocationFunction locationFunctionMD
-
locationFunctionSensi
protected transient ICustomParameters.ILocationFunction locationFunctionSensi
-
sensitivityKind
protected String sensitivityKind
-
debugId
protected String debugId
-
interpolation
protected Boolean interpolation
-
typeOfMarketData
protected IMarketDataRetrievalService.MarketType typeOfMarketData
-
bucketTypes
protected BucketType[] bucketTypes
-
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
-
riskClassLevelInfo
protected com.quartetfs.biz.pivot.cube.hierarchy.ILevelInfo riskClassLevelInfo
-
-
Constructor Detail
-
AMarketDataPostProcessor
public AMarketDataPostProcessor(String name, com.quartetfs.biz.pivot.cube.hierarchy.measures.IPostProcessorCreationContext creationContext)
Constructor- Parameters:
name
- The name of the post-processorcreationContext
- Thecreation 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 builderplugInKey
- The key of the PPmeasureName
- Name of the postprocessorunderlyingMeasures
- The input measure for location referenceasOfDateLevel
- Level containing the asOfSDatemarketDataSetLevel
- Level containing the market data set levelriskFactorLevel
- risk factor levelriskClassLevel
- risk class leveldateInfo
- date infosensitivityName
- sensitivity namemarketDataStoreName
- market data store namebucketTypes
- bucket typesinterpolation
- force interpolation or not, can be null, for configured interpolationtypeOfMarketData
- 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 + locationformatter
- formatterfolder
- 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 PPunderlyingMeasures
- The underlying measureasOfDateLevel
- Level containing the asOfSDatemarketDataSetLevel
- Level containing the market data set levelriskFactorLevel
- risk factor levelriskClassLevel
- risk class leveldateInfo
- date infosensitivityName
- sensitivity namemarketDataStoreName
- market data store namebucketTypes
- bucket typesinterpolation
- force interpolation or not, can be null, for configured interpolationtypeOfMarketData
- 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 interfacecom.quartetfs.biz.pivot.postprocessing.IEvaluator<T>
- Specified by:
init
in interfacecom.quartetfs.biz.pivot.postprocessing.IPostProcessor<T>
- Overrides:
init
in classcom.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 todateProperty
.- 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)
-
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 locationasOfDate
- The current datemarketDataSet
- The requested market data setriskFactor
- The requested risk factor / underlyingriskClass
- The risk class of the risk factorsensitivityName
- The sensitivity name of the current evaluated sensiouputBuckets
- The requested buckets map / pillars sets- Returns:
- A vector of MD
-
setCustomParameters
public void setCustomParameters(ICustomParameters customParameters)
- Specified by:
setCustomParameters
in interfaceICustomParametersAware
-
setMarketDataRetrievalService
public void setMarketDataRetrievalService(IMarketDataRetrievalService marketDataRetrievalService)
Description copied from interface:IMarketDataRetrievalServiceAware
Set the implementation ofIMarketDataRetrievalService
- Specified by:
setMarketDataRetrievalService
in interfaceIMarketDataRetrievalServiceAware
- Parameters:
marketDataRetrievalService
- The service that will be injected
-
-