Package com.activeviam.risk.core.calc
Interface ITailMeasureCalc
-
- All Known Implementing Classes:
ATailMeasureCalc
,TailMeasureCalc
public interface ITailMeasureCalc
Functions for calculating tail measures. This interface is injected into the post-processors to aid in calculating the Expected Shortfall, Value at Risk and Value at Earning tail measures.Post-processors that expect implementations of this interface to be injected implement the
ITailMeasureCalcAware
interface.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
ITailMeasureCalc.CalcType
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Integer[]
getIndices(com.quartetfs.biz.pivot.IActivePivot activePivot, com.qfs.store.IDatastoreVersion datastore, ITailMeasureCalc.CalcType type, com.qfs.vector.IVector pnl, double quantile, String roundingMethod, String quantile2Rank)
Return an array of the indices in the vector that contribute to the VaR/ES.Double
getLEstimator(com.quartetfs.biz.pivot.IActivePivot activePivot, com.qfs.store.IDatastoreVersion datastore, ITailMeasureCalc.CalcType type, com.qfs.vector.IVector referencePnl, com.qfs.vector.IVector pnl, double quantile, String roundingMethod, String quantile2Rank)
Calculate the L-Estimator (for VaR or ES) of the PnL vector for the quantile, given the reference PnL vector.Double
getTailMeasure(com.quartetfs.biz.pivot.IActivePivot activePivot, com.qfs.store.IDatastoreVersion datastore, ITailMeasureCalc.CalcType type, com.qfs.vector.IVector pnl, double quantile, String roundingMethod, String quantile2Rank)
Calculate the VaR, ES or VaE of the PnL vector for the quantile.
-
-
-
Method Detail
-
getTailMeasure
Double getTailMeasure(com.quartetfs.biz.pivot.IActivePivot activePivot, com.qfs.store.IDatastoreVersion datastore, ITailMeasureCalc.CalcType type, com.qfs.vector.IVector pnl, double quantile, String roundingMethod, String quantile2Rank)
Calculate the VaR, ES or VaE of the PnL vector for the quantile.- Parameters:
activePivot
- Active Pivot instance.datastore
- Datastore version.type
- "ES", "VaR" or "VaE"pnl
- The PnL vector.quantile
- The quantile for the ES, VaR or VaE between 0 and 1 (equals 1 minus the confidence level).roundingMethod
- String representing the rounding for the computation of the index(es) corresponding to the confidence levelquantile2Rank
- String representing the method used to compute the quantile- Returns:
- The tail measure (i.e. VaR, ES or VaE value of the vector for the quantile).
-
getIndices
Integer[] getIndices(com.quartetfs.biz.pivot.IActivePivot activePivot, com.qfs.store.IDatastoreVersion datastore, ITailMeasureCalc.CalcType type, com.qfs.vector.IVector pnl, double quantile, String roundingMethod, String quantile2Rank)
Return an array of the indices in the vector that contribute to the VaR/ES.- Parameters:
activePivot
- Active Pivot instance.datastore
- Datastore version.type
- "ES" or "VaR".pnl
- The PnL vector.quantile
- The quantile for the VaR, between 0 and 1 (equals 1 minus the confidence level).roundingMethod
- String representing the rounding for the computation of the index(es) corresponding to the confidence levelquantile2Rank
- String representing the method used to compute the quantile- Returns:
- The array of vector indices.
-
getLEstimator
Double getLEstimator(com.quartetfs.biz.pivot.IActivePivot activePivot, com.qfs.store.IDatastoreVersion datastore, ITailMeasureCalc.CalcType type, com.qfs.vector.IVector referencePnl, com.qfs.vector.IVector pnl, double quantile, String roundingMethod, String quantile2Rank)
Calculate the L-Estimator (for VaR or ES) of the PnL vector for the quantile, given the reference PnL vector.- Parameters:
activePivot
- Active Pivot instance.datastore
- Datastore version.type
- "ES" or "VaR".referencePnl
- The aggregate PnL vector at the reference level.pnl
- The PnL vector for the current sub-portfolio.quantile
- The quantile for the ES or VaR, between 0 and 1 (equals 1 minus the confidence level).roundingMethod
- String representing the rounding for the computation of the index(es) corresponding to the confidence levelquantile2Rank
- String representing the method used to compute the quantile- Returns:
- The L-Estimator value.
-
-