Class DynamicTenorsAndMaturitiesPostProcessor
- java.lang.Object
-
- com.quartetfs.biz.pivot.postprocessing.impl.AAdvancedPostProcessor<Double>
-
- com.activeviam.risk.core.postprocessor.impl.DynamicTenorsAndMaturitiesPostProcessor
-
- All Implemented Interfaces:
IMaturityConverterAware
,ITenorUtilAware
,com.quartetfs.biz.pivot.postprocessing.IAggregatedMeasureAware
,com.quartetfs.biz.pivot.postprocessing.IPostProcessor<Double>
,com.quartetfs.fwk.types.IExtendedPluginValue
,Serializable
@QuartetExtendedPluginValue(intf=com.quartetfs.biz.pivot.postprocessing.IPostProcessor.class, key="DYNAMIC_TENORS_AND_MATURITIES") public class DynamicTenorsAndMaturitiesPostProcessor extends com.quartetfs.biz.pivot.postprocessing.impl.AAdvancedPostProcessor<Double> implements ITenorUtilAware, IMaturityConverterAware
Postprocessor that dynamically buckets from an input tenor and maturity to the appropriate destination tenors and maturities. Can be configured to bucket on a single dimension (either tenors or maturities).- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
DynamicTenorsAndMaturitiesPostProcessor.EvaluationProcedure
Procedure to execute over the evaluation retrieval result.
-
Field Summary
Fields Modifier and Type Field Description static Object[]
ALLMEMBER_PATH
protected IMaturityConverter
maturityConverter
static String
PLUGIN_KEY
static String
SENSITIVITY_NAME_LEVEL
static String
TENOR_AND_MATURITY_DEFAULT_VALUE
protected ITenorUtil
tenorUtil
static Object[]
WILDCARD_PATH
-
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.dates.IMaturityConverterAware
PROPERTY_NAME
-
Fields inherited from interface com.quartetfs.biz.pivot.postprocessing.IPostProcessor
CONTINUOUS_QUERY_HANDLER_KEYS, IS_PARTITIONED_ON_RANGE_LEVELS_PROPERTY, SEPARATOR, UNDERLYING_MEASURES
-
Fields inherited from interface com.activeviam.risk.core.dates.ITenorUtilAware
PROPERTY_NAME
-
-
Constructor Summary
Constructors Constructor Description DynamicTenorsAndMaturitiesPostProcessor(String name, com.quartetfs.biz.pivot.cube.hierarchy.measures.IPostProcessorCreationContext creationContext)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
compute(com.quartetfs.biz.pivot.ILocation location, com.quartetfs.biz.pivot.query.aggregates.IAdvancedAggregatesRetriever retriever)
com.quartetfs.biz.pivot.ILocation
createPrefetchedLocation(com.quartetfs.biz.pivot.ILocation location)
Modifies the current location to be able to retrieve the source contributions.protected com.quartetfs.biz.pivot.cellset.IPointProcedure
createProcedure(com.quartetfs.biz.pivot.cellset.IAggregatesRetrievalResult result, com.quartetfs.biz.pivot.query.aggregates.IAdvancedAggregatesRetriever retriever, String[] dynamicSet, MaturityPillarsDTO noBuckets, com.quartetfs.biz.pivot.ILocation location)
Create the point procedure that will be executed on the evaluation retrieval result.com.quartetfs.biz.pivot.ILocation
defineDynamicBucketPath(com.quartetfs.biz.pivot.ILocation location, Object[] buckets, com.quartetfs.biz.pivot.ILocation inputLocation)
Modifies the current location to reach the destination buckets.Double
evaluate(com.quartetfs.biz.pivot.ILocation location, Object[] underlyingMeasures)
This method is called to evaluate the post processor value on a given location The underlying measures are provided for the shifted location.Set<Class<? extends com.quartetfs.biz.pivot.context.IContextValue>>
getContextDependencies()
static Function<com.activeviam.desc.build.ICanStartBuildingMeasures,com.activeviam.desc.build.IHasAtLeastOneMeasure>
getPostProcessorDescription(String measureName, String underlyingMeasure, String sensiType, String dynamicTenorHierarchy, String[] sourceTenorsLevel, BucketType inputTenorsBucketType, BucketType dynamicTenorsBucketType, String tenorAndMaturityDefaultValue, String asOfDateLevel, String sensitivityNameLvl, String formatter, String folder)
One axis flavorstatic Function<com.activeviam.desc.build.ICanStartBuildingMeasures,com.activeviam.desc.build.IHasAtLeastOneMeasure>
getPostProcessorDescription(String measureName, String underlyingMeasure, String sensiType, String dynamicTenorHierarchy, String dynamicMaturityHierarchy, String[] sourceTenorsLevel, String[] sourceMaturitiesLevel, BucketType inputTenorsBucketType, BucketType dynamicTenorsBucketType, BucketType inputMaturitiesBucketType, BucketType dynamicMaturitiesBucketType, String tenorAndMaturityDefaultValue, String asOfDateLevel, String sensitivityNameLvl, String formatter, String folder)
Two axis flavorstatic Function<com.activeviam.desc.build.ICanStartBuildingMeasures,com.activeviam.desc.build.IHasAtLeastOneMeasure>
getPostProcessorDescription(String measureName, String underlyingMeasure, String sensiType, String dynamicTenorHierarchy, String dynamicMaturityHierarchy, String dynamicMoneynessHierarchy, String[] sourceTenorsLevel, String[] sourceMaturitiesLevel, String[] sourceMoneynessLevel, BucketType inputTenorsBucketType, BucketType dynamicTenorsBucketType, BucketType inputMaturitiesBucketType, BucketType dynamicMaturitiesBucketType, BucketType inputMoneynessBucketType, BucketType dynamicMoneynessBucketType, String tenorAndMaturityDefaultValue, String asOfDateLevel, String sensitivityNameLvl, String formatter, String folder)
Three axis flavorString
getType()
void
init(Properties properties)
protected boolean
isValidMember(Object analysisExplicitMembers, Object analysisMember)
static com.activeviam.copper.api.CopperMeasure
measure(com.activeviam.copper.api.CopperMeasure underlyingMeasure, String sensiType, String dynamicTenorHierarchy, String[] sourceTenorsLevel, BucketType inputTenorsBucketType, BucketType dynamicTenorsBucketType, String tenorAndMaturityDefaultValue, String asOfDateLevel, String sensitivityNameLvl)
One axis flavorstatic com.activeviam.copper.api.CopperMeasure
measure(com.activeviam.copper.api.CopperMeasure underlyingMeasure, String sensiType, String dynamicTenorHierarchy, String dynamicMaturityHierarchy, String[] sourceTenorsLevel, String[] sourceMaturitiesLevel, BucketType inputTenorsBucketType, BucketType dynamicTenorsBucketType, BucketType inputMaturitiesBucketType, BucketType dynamicMaturitiesBucketType, String tenorAndMaturityDefaultValue, String asOfDateLevel, String sensitivityNameLvl)
Two axis flavorstatic com.activeviam.copper.api.CopperMeasure
measure(com.activeviam.copper.api.CopperMeasure underlyingMeasure, String sensiType, String dynamicTenorHierarchy, String dynamicMaturityHierarchy, String dynamicMoneynessHierarchy, String[] sourceTenorsLevel, String[] sourceMaturitiesLevel, String[] sourceMoneynessLevel, BucketType inputTenorsBucketType, BucketType dynamicTenorsBucketType, BucketType inputMaturitiesBucketType, BucketType dynamicMaturitiesBucketType, BucketType inputMoneynessBucketType, BucketType dynamicMoneynessBucketType, String tenorAndMaturityDefaultValue, String asOfDateLevel, String sensitivityNameLvl)
Three axis flavorprotected void
putBucketMapsInQueryCache(BucketType bucketType, LocalDate asOfDate, String sensitivityName, Map<String,Set<MaturityPillarsDTO>> bucketMap)
protected Map<String,Set<MaturityPillarsDTO>>
retrieveBucketMap(BucketType bucketType, LocalDate asOfDate, String sensitivityName)
void
setMaturityConverter(IMaturityConverter maturityConverter)
Set the implementation ofIMaturityConverter
void
setTenorUtil(ITenorUtil tenorUtil)
Set the implementation ofITenorUtil
-
Methods inherited from class com.quartetfs.biz.pivot.postprocessing.impl.AAdvancedPostProcessor
addContextDependency, checkInterruption, checkOutputType, computeNamePath, computeOutputType, createEvaluator, expandResult, getActivePivot, getContext, getContinuousQueryHandlerKeys, getCurrentMeasure, getDatastoreVersion, getDerivedContextDependencies, getExpansionProcedure, getGenericOutputType, getMeasuresProvider, getName, getOutputType, getOutputTypeFromGenericClassParameter, getOutputTypeFromProperties, getPrefetchers, getProperties, getQueryCache, getTypeFromClass, handleCircularDependency, handleNotSupportedAnalysisLevels, handleUnknownUnderlyingMeasure, hideEvaluator, initializeContinuousQueryHandlerKeys, initializeUnderlyingMeasures, removeAnalysisLevelsFromFilter, restrictLocationAnalysisLevels, retrieveAnalysisLevelsToExpand, retrieveNamedPrefetchAggregatesWithAnalysisLevels, retrievePrefetchAggregates, retrievePrefetchAggregatesWithAnalysisLevels, setAggregatedMeasureName, supportsAnalysisLevels, toString
-
-
-
-
Field Detail
-
PLUGIN_KEY
public static final String PLUGIN_KEY
- See Also:
- Constant Field Values
-
SENSITIVITY_NAME_LEVEL
public static final String SENSITIVITY_NAME_LEVEL
- See Also:
- Constant Field Values
-
TENOR_AND_MATURITY_DEFAULT_VALUE
public static final String TENOR_AND_MATURITY_DEFAULT_VALUE
- See Also:
- Constant Field Values
-
ALLMEMBER_PATH
public static final Object[] ALLMEMBER_PATH
-
WILDCARD_PATH
public static final Object[] WILDCARD_PATH
-
tenorUtil
protected ITenorUtil tenorUtil
-
maturityConverter
protected IMaturityConverter maturityConverter
-
-
Constructor Detail
-
DynamicTenorsAndMaturitiesPostProcessor
public DynamicTenorsAndMaturitiesPostProcessor(String name, com.quartetfs.biz.pivot.cube.hierarchy.measures.IPostProcessorCreationContext creationContext)
-
-
Method Detail
-
getPostProcessorDescription
public static Function<com.activeviam.desc.build.ICanStartBuildingMeasures,com.activeviam.desc.build.IHasAtLeastOneMeasure> getPostProcessorDescription(String measureName, String underlyingMeasure, String sensiType, String dynamicTenorHierarchy, String[] sourceTenorsLevel, BucketType inputTenorsBucketType, BucketType dynamicTenorsBucketType, String tenorAndMaturityDefaultValue, String asOfDateLevel, String sensitivityNameLvl, String formatter, String folder)
One axis flavor- Parameters:
measureName
- The name of the resulting measure.underlyingMeasure
- The measure to be re-bucketed.sensiType
- The type of the sensitivity.dynamicTenorHierarchy
- The destination tenor hierarchy.sourceTenorsLevel
- The source tenor level.inputTenorsBucketType
- input tenors bucket leveldynamicTenorsBucketType
- The type of the dynamic tenor bucket.tenorAndMaturityDefaultValue
- default value for tenors and maturitiesasOfDateLevel
- The asOfDate level.sensitivityNameLvl
- sensitivity name levelformatter
- The formatter.folder
- The folder.- Returns:
- The fluent API calls required to build the measure.
-
measure
public static com.activeviam.copper.api.CopperMeasure measure(com.activeviam.copper.api.CopperMeasure underlyingMeasure, String sensiType, String dynamicTenorHierarchy, String[] sourceTenorsLevel, BucketType inputTenorsBucketType, BucketType dynamicTenorsBucketType, String tenorAndMaturityDefaultValue, String asOfDateLevel, String sensitivityNameLvl)
One axis flavor- Parameters:
underlyingMeasure
- The measure to be re-bucketed.sensiType
- The type of the sensitivity.dynamicTenorHierarchy
- The destination tenor hierarchy.sourceTenorsLevel
- The source tenor level.inputTenorsBucketType
- input tenors bucket leveldynamicTenorsBucketType
- The type of the dynamic tenor bucket.tenorAndMaturityDefaultValue
- default value for tenors and maturitiesasOfDateLevel
- The asOfDate level.sensitivityNameLvl
- sensitivity name level- Returns:
- The copper measure.
-
getPostProcessorDescription
public static Function<com.activeviam.desc.build.ICanStartBuildingMeasures,com.activeviam.desc.build.IHasAtLeastOneMeasure> getPostProcessorDescription(String measureName, String underlyingMeasure, String sensiType, String dynamicTenorHierarchy, String dynamicMaturityHierarchy, String[] sourceTenorsLevel, String[] sourceMaturitiesLevel, BucketType inputTenorsBucketType, BucketType dynamicTenorsBucketType, BucketType inputMaturitiesBucketType, BucketType dynamicMaturitiesBucketType, String tenorAndMaturityDefaultValue, String asOfDateLevel, String sensitivityNameLvl, String formatter, String folder)
Two axis flavor- Parameters:
measureName
- The name of the resulting measure.underlyingMeasure
- The measure to be re-bucketed.sensiType
- The type of the sensitivity.dynamicTenorHierarchy
- The destination tenor hierarchy.dynamicMaturityHierarchy
- The destination maturity hierarchy.sourceTenorsLevel
- The source tenor level.sourceMaturitiesLevel
- The source maturities level.inputTenorsBucketType
- input tenors bucket typeinputMaturitiesBucketType
- input maturities bucket typedynamicTenorsBucketType
- The type of the dynamic tenor bucket.dynamicMaturitiesBucketType
- The type of the dynamic maturity bucket.tenorAndMaturityDefaultValue
- default value for tenors and maturitiesasOfDateLevel
- The asOfDate level.sensitivityNameLvl
- sensitivity name levelformatter
- The formatter.folder
- The folder.- Returns:
- The fluent API calls required to build the measure.
-
measure
public static com.activeviam.copper.api.CopperMeasure measure(com.activeviam.copper.api.CopperMeasure underlyingMeasure, String sensiType, String dynamicTenorHierarchy, String dynamicMaturityHierarchy, String[] sourceTenorsLevel, String[] sourceMaturitiesLevel, BucketType inputTenorsBucketType, BucketType dynamicTenorsBucketType, BucketType inputMaturitiesBucketType, BucketType dynamicMaturitiesBucketType, String tenorAndMaturityDefaultValue, String asOfDateLevel, String sensitivityNameLvl)
Two axis flavor- Parameters:
underlyingMeasure
- The measure to be re-bucketed.sensiType
- The type of the sensitivity.dynamicTenorHierarchy
- The destination tenor hierarchy.dynamicMaturityHierarchy
- The destination maturity hierarchy.sourceTenorsLevel
- The source tenor level.sourceMaturitiesLevel
- The source maturities level.inputTenorsBucketType
- input tenors bucket typeinputMaturitiesBucketType
- input maturities bucket typedynamicTenorsBucketType
- The type of the dynamic tenor bucket.dynamicMaturitiesBucketType
- The type of the dynamic maturity bucket.tenorAndMaturityDefaultValue
- default value for tenors and maturitiesasOfDateLevel
- The asOfDate level.sensitivityNameLvl
- sensitivity name level- Returns:
- The copper measure.
-
getPostProcessorDescription
public static Function<com.activeviam.desc.build.ICanStartBuildingMeasures,com.activeviam.desc.build.IHasAtLeastOneMeasure> getPostProcessorDescription(String measureName, String underlyingMeasure, String sensiType, String dynamicTenorHierarchy, String dynamicMaturityHierarchy, String dynamicMoneynessHierarchy, String[] sourceTenorsLevel, String[] sourceMaturitiesLevel, String[] sourceMoneynessLevel, BucketType inputTenorsBucketType, BucketType dynamicTenorsBucketType, BucketType inputMaturitiesBucketType, BucketType dynamicMaturitiesBucketType, BucketType inputMoneynessBucketType, BucketType dynamicMoneynessBucketType, String tenorAndMaturityDefaultValue, String asOfDateLevel, String sensitivityNameLvl, String formatter, String folder)
Three axis flavor- Parameters:
measureName
- The name of the resulting measure.underlyingMeasure
- The measure to be re-bucketed.sensiType
- The type of the sensitivity.dynamicTenorHierarchy
- The destination tenor hierarchy.dynamicMaturityHierarchy
- The destination maturity hierarchy.dynamicMoneynessHierarchy
- dynamic moneyness hierarchysourceTenorsLevel
- The source tenor level.sourceMaturitiesLevel
- The source maturities level.sourceMoneynessLevel
- source moneyness levelinputTenorsBucketType
- input tenors bucket typeinputMaturitiesBucketType
- input maturities bucket typeinputMoneynessBucketType
- inpyt moneyness bucket typedynamicTenorsBucketType
- The type of the dynamic tenor bucket.dynamicMaturitiesBucketType
- The type of the dynamic maturity bucket.dynamicMoneynessBucketType
- dynamic moneyness bucket typetenorAndMaturityDefaultValue
- default value for tenors and maturitiesasOfDateLevel
- The asOfDate level.sensitivityNameLvl
- sensitivity name levelformatter
- The formatter.folder
- The folder.- Returns:
- The fluent API calls required to build the measure.
-
measure
public static com.activeviam.copper.api.CopperMeasure measure(com.activeviam.copper.api.CopperMeasure underlyingMeasure, String sensiType, String dynamicTenorHierarchy, String dynamicMaturityHierarchy, String dynamicMoneynessHierarchy, String[] sourceTenorsLevel, String[] sourceMaturitiesLevel, String[] sourceMoneynessLevel, BucketType inputTenorsBucketType, BucketType dynamicTenorsBucketType, BucketType inputMaturitiesBucketType, BucketType dynamicMaturitiesBucketType, BucketType inputMoneynessBucketType, BucketType dynamicMoneynessBucketType, String tenorAndMaturityDefaultValue, String asOfDateLevel, String sensitivityNameLvl)
Three axis flavor- Parameters:
underlyingMeasure
- The measure to be re-bucketed.sensiType
- The type of the sensitivity.dynamicTenorHierarchy
- The destination tenor hierarchy.dynamicMaturityHierarchy
- The destination maturity hierarchy.dynamicMoneynessHierarchy
- dynamic moneyness hierarchysourceTenorsLevel
- The source tenor level.sourceMaturitiesLevel
- The source maturities level.sourceMoneynessLevel
- source moneyness levelinputTenorsBucketType
- input tenors bucket typeinputMaturitiesBucketType
- input maturities bucket typeinputMoneynessBucketType
- inpyt moneyness bucket typedynamicTenorsBucketType
- The type of the dynamic tenor bucket.dynamicMaturitiesBucketType
- The type of the dynamic maturity bucket.dynamicMoneynessBucketType
- dynamic moneyness bucket typetenorAndMaturityDefaultValue
- default value for tenors and maturitiesasOfDateLevel
- The asOfDate level.sensitivityNameLvl
- sensitivity name level- Returns:
- The fluent API calls required to build the measure.
-
init
public void init(Properties properties) throws com.quartetfs.fwk.QuartetException
-
getContextDependencies
public Set<Class<? extends com.quartetfs.biz.pivot.context.IContextValue>> getContextDependencies()
-
compute
public void compute(com.quartetfs.biz.pivot.ILocation location, com.quartetfs.biz.pivot.query.aggregates.IAdvancedAggregatesRetriever retriever) throws com.quartetfs.fwk.QuartetException
- Specified by:
compute
in interfacecom.quartetfs.biz.pivot.postprocessing.IPostProcessor<Double>
- Throws:
com.quartetfs.fwk.QuartetException
-
createProcedure
protected com.quartetfs.biz.pivot.cellset.IPointProcedure createProcedure(com.quartetfs.biz.pivot.cellset.IAggregatesRetrievalResult result, com.quartetfs.biz.pivot.query.aggregates.IAdvancedAggregatesRetriever retriever, String[] dynamicSet, MaturityPillarsDTO noBuckets, com.quartetfs.biz.pivot.ILocation location)
Create the point procedure that will be executed on the evaluation retrieval result.- Parameters:
result
- The result to read aggregates fromretriever
- The aggregates retrieverdynamicSet
- dynamic setnoBuckets
- no bucketslocation
- The location- Returns:
- The procedure to execute on the evaluation cell set
-
setTenorUtil
public void setTenorUtil(ITenorUtil tenorUtil)
Description copied from interface:ITenorUtilAware
Set the implementation ofITenorUtil
- Specified by:
setTenorUtil
in interfaceITenorUtilAware
- Parameters:
tenorUtil
- the implementation ofITenorUtil
-
setMaturityConverter
public void setMaturityConverter(IMaturityConverter maturityConverter)
Description copied from interface:IMaturityConverterAware
Set the implementation ofIMaturityConverter
- Specified by:
setMaturityConverter
in interfaceIMaturityConverterAware
- Parameters:
maturityConverter
- the implementation ofIMaturityConverter
-
evaluate
public Double evaluate(com.quartetfs.biz.pivot.ILocation location, Object[] underlyingMeasures)
This method is called to evaluate the post processor value on a given location The underlying measures are provided for the shifted location.When an evaluator is available, the evaluator is called on the location and measures, when no evaluator is available, the first underlying measure is returned, or null when no measure is available.
Sub-classes can completely override this business logic and implement their own calculation.
- Parameters:
location
- This location is a point location (non range, without wild cards)underlyingMeasures
- The values of the defined underlying measures- Returns:
- The post processor value
-
defineDynamicBucketPath
public com.quartetfs.biz.pivot.ILocation defineDynamicBucketPath(com.quartetfs.biz.pivot.ILocation location, Object[] buckets, com.quartetfs.biz.pivot.ILocation inputLocation)
Modifies the current location to reach the destination buckets.- Parameters:
location
- The current location.buckets
- The tenor and maturity destination buckets.inputLocation
- The original requested location, used to modify location according to the requested one- Returns:
- The modified location (specific buckets on the dynamic tenor and dynamic maturity hierarchies; AllMember on source tenor and source maturity hierarchies).
-
createPrefetchedLocation
public com.quartetfs.biz.pivot.ILocation createPrefetchedLocation(com.quartetfs.biz.pivot.ILocation location)
Modifies the current location to be able to retrieve the source contributions.- Parameters:
location
- The current location.- Returns:
- The modified location (AllMember on the dynamic tenor and dynamic maturity hierarchies; wildcard on source tenor and source maturity hierarchies).
-
getType
public String getType()
- Specified by:
getType
in interfacecom.quartetfs.fwk.types.IExtendedPluginValue
-
isValidMember
protected boolean isValidMember(Object analysisExplicitMembers, Object analysisMember)
-
retrieveBucketMap
protected Map<String,Set<MaturityPillarsDTO>> retrieveBucketMap(BucketType bucketType, LocalDate asOfDate, String sensitivityName)
-
putBucketMapsInQueryCache
protected void putBucketMapsInQueryCache(BucketType bucketType, LocalDate asOfDate, String sensitivityName, Map<String,Set<MaturityPillarsDTO>> bucketMap)
-
-