Package com.activeviam.risk.core.utils
Class InputSelector
- java.lang.Object
-
- com.activeviam.risk.core.utils.InputSelector
-
- All Implemented Interfaces:
IInputSelector
public class InputSelector extends Object implements IInputSelector
-
-
Field Summary
Fields Modifier and Type Field Description static String
FIRST_ORDER
static String
FORMULA_INPUT
static String
FORMULA_LADDER_ORDER
static String
SECOND_ORDER
static String
SENSI_TYPE
-
Constructor Summary
Constructors Constructor Description InputSelector(org.springframework.core.env.Environment environment)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getFormulaInput(String sensitivityName)
Returns the configured input for the PnLExplain or TaylorVaR calculations.boolean
hasSecondOrderLadder(String sensitivityName)
Returns whether the sensitivity ladder is second order, depending on the sensitivity name.
-
-
-
Field Detail
-
FORMULA_INPUT
public static final String FORMULA_INPUT
- See Also:
- Constant Field Values
-
FORMULA_LADDER_ORDER
public static final String FORMULA_LADDER_ORDER
- See Also:
- Constant Field Values
-
SENSI_TYPE
public static final String SENSI_TYPE
- See Also:
- Constant Field Values
-
FIRST_ORDER
public static final String FIRST_ORDER
- See Also:
- Constant Field Values
-
SECOND_ORDER
public static final String SECOND_ORDER
- See Also:
- Constant Field Values
-
-
Method Detail
-
getFormulaInput
public String getFormulaInput(String sensitivityName)
Description copied from interface:IInputSelector
Returns the configured input for the PnLExplain or TaylorVaR calculations. The "formula.input" property should take the following case-insensitive values: "formula.input.vanna=SENSI-ONLY" "formula.input.delta=LADDER-ONLY" "formula.input.gamma="LADDER-FIRST" An empty property, or no setting, should default to "LADDER-FIRST", which will attempt to calculate the input from the sensitivity ladder or revert to the standard sensitivity if the ladder does not exist.- Specified by:
getFormulaInput
in interfaceIInputSelector
- Parameters:
sensitivityName
- The name of the sensitivity.- Returns:
- The formula input property.
-
hasSecondOrderLadder
public boolean hasSecondOrderLadder(String sensitivityName)
Description copied from interface:IInputSelector
Returns whether the sensitivity ladder is second order, depending on the sensitivity name.- Specified by:
hasSecondOrderLadder
in interfaceIInputSelector
- Parameters:
sensitivityName
- The sensitivity name.- Returns:
- True if the sensitivity ladder is second order, false otherwise.
-
-