Interface IInterpolationConfiguration
-
- All Known Implementing Classes:
InterpolationConfiguration
public interface IInterpolationConfiguration
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DoubleBinaryOperator
absoluteToRelativeMarketDataOperator(IServiceContext context, String sensitivityKind, String sensitivityName, String riskClass)
The way to convert absolute MD to relative MDDoubleBinaryOperator
absoluteToRelativeShiftOperator(IServiceContext context, String sensitivityKind, String sensitivityName, String riskClass)
The way to convert absolute shift to relative shiftIMarketDataRetrievalService.IPillarSet
fixPillarSet(IServiceContext context, IMarketDataRetrievalService.IPillarSet pillarSet, int axisIndex, String sensitivityKind, String sensitivityName, String riskClass)
Can modify on the fly the input pillar set before retrieval if you want to modify the equality condition check the classModifiedPillarSetOfPillar
that could encapsulate the provided pillarsint[]
getInterpolationOrder(IServiceContext context, int maxDeep, String sensitivityKind, String sensitivityName, String riskClass)
Retrieves an arrays that gives the order in which the interpolation of market data is performed.boolean
getMarketDataInterpolationFlag(IServiceContext context, String sensitivityKind, String sensitivityName, String riskClass)
Retrieves the flag that specifies whether interpolation of the market data is used for the computation of PnL explainBinaryOperator<Double>
getPostMarketDataInterpolationFunction(IServiceContext context, int axisIndex, String sensitivityKind, String sensitivityName, String riskClass)
Retrieves a function that performs a calculation on the market data for a given axis after interpolation of market data is doneBinaryOperator<Double>
getPostShiftDataInterpolationFunction(IServiceContext context, int axisIndex, String sensitivityKind, String sensitivityName, String riskClass)
Retrieves a function that performs a calculation on the shift data vector for a given axis after interpolation of shift data is doneBinaryOperator<Double>
getPreMarketDataInterpolationFunction(IServiceContext context, int axisIndex, String sensitivityKind, String sensitivityName, String riskClass)
Retrieves a function that performs a calculation on the market data for a given axis before interpolation of market data is doneBinaryOperator<Double>
getPreShiftDataInterpolationFunction(IServiceContext context, int axisIndex, String sensitivityKind, String sensitivityName, String riskClass)
Retrieves a function that performs a calculation on the shift data vector for a given axis before interpolation of shift data is doneboolean
getShiftDataInterpolationFlag(IServiceContext context, String sensitivityKind, String sensitivityName, String riskClass)
Retrieves the flag that specifies whether interpolation of the shift data vector is used for the computation of VaRboolean
isRelativeMarketData(IServiceContext context, String sensitivityKind, String sensitivityName, String riskClass)
Tells if the retrieved MD is absolute or relativeboolean
isRelativeShiftData(IServiceContext context, String sensitivityKind, String sensitivityName, String riskClass)
Tells if the retrieved shift is absolute or relativeDoubleBinaryOperator
relativeToAbsoluteMarketDataOperator(IServiceContext context, String sensitivityKind, String sensitivityName, String riskClass)
The way to convert relative MD to absolute MDDoubleBinaryOperator
relativeToAbsoluteShiftOperator(IServiceContext context, String sensitivityKind, String sensitivityName, String riskClass)
The way to convert relative shift to absolute shift
-
-
-
Method Detail
-
getMarketDataInterpolationFlag
boolean getMarketDataInterpolationFlag(IServiceContext context, String sensitivityKind, String sensitivityName, String riskClass)
Retrieves the flag that specifies whether interpolation of the market data is used for the computation of PnL explain- Parameters:
context
- The caller contextsensitivityKind
- The type of sensitivity delta / gamma /vega / ....sensitivityName
- the sensitivity nameriskClass
- the risk class- Returns:
- A boolean flag that is true if interpolation is used and false otherwise
-
getPreMarketDataInterpolationFunction
BinaryOperator<Double> getPreMarketDataInterpolationFunction(IServiceContext context, int axisIndex, String sensitivityKind, String sensitivityName, String riskClass)
Retrieves a function that performs a calculation on the market data for a given axis before interpolation of market data is done- Parameters:
context
- The caller contextaxisIndex
- index of the axissensitivityKind
- The type of sensitivity delta / gamma /vega / ....sensitivityName
- sensitivity nameriskClass
- risk class- Returns:
- A function with that prototype
(pillar, md) -> intermediate
, pillar is the current location of the md, interpolation will be made on intermediate Pre and Post functions must give identity on a non interpolated point for consistencyPost(pillar, Pre(pillar, md) = (pillar, md) -> md
-
getPostMarketDataInterpolationFunction
BinaryOperator<Double> getPostMarketDataInterpolationFunction(IServiceContext context, int axisIndex, String sensitivityKind, String sensitivityName, String riskClass)
Retrieves a function that performs a calculation on the market data for a given axis after interpolation of market data is done- Parameters:
context
- The caller contextaxisIndex
- index of the axissensitivityKind
- The type of sensitivity delta / gamma /vega / ....sensitivityName
- sensitivity nameriskClass
- risk class- Returns:
- A function with that prototype
(pillar, intermediate) -> md
, pillar is the target location of the md, intermediate is the interpolated value Pre and Post functions must give identity on a non interpolated point for consistencyPost(pillar, Pre(pillar, md) = (pillar, md) -> md
-
getShiftDataInterpolationFlag
boolean getShiftDataInterpolationFlag(IServiceContext context, String sensitivityKind, String sensitivityName, String riskClass)
Retrieves the flag that specifies whether interpolation of the shift data vector is used for the computation of VaR- Parameters:
context
- The caller contextsensitivityKind
- The type of sensitivity delta / gamma /vega / ...sensitivityName
- the sensitivity nameriskClass
- the risk class- Returns:
- A boolean flag that is true if interpolation is used and false otherwise
-
getPreShiftDataInterpolationFunction
BinaryOperator<Double> getPreShiftDataInterpolationFunction(IServiceContext context, int axisIndex, String sensitivityKind, String sensitivityName, String riskClass)
Retrieves a function that performs a calculation on the shift data vector for a given axis before interpolation of shift data is done- Parameters:
context
- The caller contextaxisIndex
- index of the axissensitivityKind
- The type of sensitivity delta / gamma /vega / ...sensitivityName
- sensitivity nameriskClass
- risk class- Returns:
- A function with that prototype
(pillar, shift) -> intermediate
, pillar is the current location of the shift, interpolation will be made on intermediate Pre and Post functions must give identity on a non interpolated point for consistencyPost(pillar, Pre(pillar, shift) = (pillar, shift) -> shift
-
getPostShiftDataInterpolationFunction
BinaryOperator<Double> getPostShiftDataInterpolationFunction(IServiceContext context, int axisIndex, String sensitivityKind, String sensitivityName, String riskClass)
Retrieves a function that performs a calculation on the shift data vector for a given axis after interpolation of shift data is done- Parameters:
context
- The caller contextaxisIndex
- index of the axissensitivityKind
- The type of sensitivity delta / gamma /vega / ...sensitivityName
- sensitivity nameriskClass
- risk class- Returns:
- A function with that prototype
(pillar, intermediate) -> shift
, pillar is the target location of the shift, intermediate is the interpolated value Pre and Post functions must give identity on a non interpolated point for consistencyPost(pillar, Pre(pillar, shift) = (pillar, shift) -> shift
-
getInterpolationOrder
int[] getInterpolationOrder(IServiceContext context, int maxDeep, String sensitivityKind, String sensitivityName, String riskClass)
Retrieves an arrays that gives the 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 thebucketTypes
parameter is processed during the interpolation calculation, starting at the value 0. Ex: if there are three elements defined inbucketTypes
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.- Parameters:
context
- The caller contextmaxDeep
- number of axissensitivityKind
- The type of sensitivity delta / gamma /vega / ...sensitivityName
- sensitivity nameriskClass
- risk class- Returns:
- An array with the axis number from the last to the first
-
fixPillarSet
IMarketDataRetrievalService.IPillarSet fixPillarSet(IServiceContext context, IMarketDataRetrievalService.IPillarSet pillarSet, int axisIndex, String sensitivityKind, String sensitivityName, String riskClass)
Can modify on the fly the input pillar set before retrieval if you want to modify the equality condition check the classModifiedPillarSetOfPillar
that could encapsulate the provided pillars- Parameters:
context
- The caller contextpillarSet
- The pillar set to fixaxisIndex
- The axis number corresponding to the pillar setsensitivityKind
- The type of sensitivity delta / gamma /vega / ...sensitivityName
- sensitivity nameriskClass
- risk class- Returns:
- mainly the pillar set
-
isRelativeMarketData
boolean isRelativeMarketData(IServiceContext context, String sensitivityKind, String sensitivityName, String riskClass)
Tells if the retrieved MD is absolute or relative- Parameters:
context
- The caller contextsensitivityKind
- The type of sensitivity delta / gamma /vega / ...sensitivityName
- sensitivity nameriskClass
- risk class- Returns:
- true for relative data (ratio of nominal), false for absolute MD
-
absoluteToRelativeMarketDataOperator
DoubleBinaryOperator absoluteToRelativeMarketDataOperator(IServiceContext context, String sensitivityKind, String sensitivityName, String riskClass)
The way to convert absolute MD to relative MD- Parameters:
context
- The caller contextsensitivityKind
- The type of sensitivity delta / gamma /vega / ...sensitivityName
- sensitivity nameriskClass
- risk class- Returns:
- the formula, for instance (nominal, md) -> md / nominal
-
relativeToAbsoluteMarketDataOperator
DoubleBinaryOperator relativeToAbsoluteMarketDataOperator(IServiceContext context, String sensitivityKind, String sensitivityName, String riskClass)
The way to convert relative MD to absolute MD- Parameters:
context
- The caller contextsensitivityKind
- The type of sensitivity delta / gamma /vega / ...sensitivityName
- sensitivity nameriskClass
- risk class- Returns:
- the formula, for instance (nominal, md) -> md * nominal
-
isRelativeShiftData
boolean isRelativeShiftData(IServiceContext context, String sensitivityKind, String sensitivityName, String riskClass)
Tells if the retrieved shift is absolute or relative- Parameters:
context
- The caller contextsensitivityKind
- The type of sensitivity delta / gamma /vega / ...sensitivityName
- sensitivity nameriskClass
- risk class- Returns:
- true for relative data (ratio of nominal), false for absolute shift
-
absoluteToRelativeShiftOperator
DoubleBinaryOperator absoluteToRelativeShiftOperator(IServiceContext context, String sensitivityKind, String sensitivityName, String riskClass)
The way to convert absolute shift to relative shift- Parameters:
context
- The caller contextsensitivityKind
- The type of sensitivity delta / gamma /vega / ...sensitivityName
- sensitivity nameriskClass
- risk class- Returns:
- the formula, for instance (md, shift) -> shift / md
-
relativeToAbsoluteShiftOperator
DoubleBinaryOperator relativeToAbsoluteShiftOperator(IServiceContext context, String sensitivityKind, String sensitivityName, String riskClass)
The way to convert relative shift to absolute shift- Parameters:
context
- The caller contextsensitivityKind
- The type of sensitivity delta / gamma /vega / ...sensitivityName
- sensitivity nameriskClass
- risk class- Returns:
- the formula, for instance (md, shift) -> shift * md
-
-