Class InterpolationQuantileMethod
- java.lang.Object
-
- com.opengamma.strata.math.impl.statistics.descriptive.QuantileCalculationMethod
-
- com.opengamma.strata.math.impl.statistics.descriptive.InterpolationQuantileMethod
-
- Direct Known Subclasses:
ExcelInterpolationQuantileMethod
,MidwayInterpolationQuantileMethod
,SampleInterpolationQuantileMethod
,SamplePlusOneInterpolationQuantileMethod
public abstract class InterpolationQuantileMethod extends QuantileCalculationMethod
Implementation of a quantile estimator.The quantile is linearly interpolated between two sample values. The probability dimension p
i on which the interpolation take place (X axis) varies between actual implementation of the abstract class. For each probability pi , the cumulative distribution value is the sample value with same index. The index used above are the Java index plus 1.Reference: Value-At-Risk, OpenGamma Documentation 31, Version 0.1, April 2015.
-
-
Constructor Summary
Constructors Constructor Description InterpolationQuantileMethod()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected QuantileResult
expectedShortfall(double level, DoubleArray sample)
Computed the expected shortfall.protected QuantileResult
quantile(double level, DoubleArray sample, boolean isExtrapolated)
Computed the quantile.-
Methods inherited from class com.opengamma.strata.math.impl.statistics.descriptive.QuantileCalculationMethod
checkIndex, expectedShortfallFromSorted, expectedShortfallFromUnsorted, expectedShortfallResultFromUnsorted, quantileFromSorted, quantileFromUnsorted, quantileResultFromUnsorted, quantileResultWithExtrapolationFromUnsorted, quantileWithExtrapolationFromSorted, quantileWithExtrapolationFromUnsorted
-
-
-
-
Method Detail
-
quantile
protected QuantileResult quantile(double level, DoubleArray sample, boolean isExtrapolated)
Description copied from class:QuantileCalculationMethod
Computed the quantile.This protected method should be implemented in subclasses.
- Specified by:
quantile
in classQuantileCalculationMethod
- Parameters:
level
- the quantile levelsample
- the sample observationsisExtrapolated
- extrapolated if true, not extrapolated otherwise.- Returns:
- the quantile
-
expectedShortfall
protected QuantileResult expectedShortfall(double level, DoubleArray sample)
Description copied from class:QuantileCalculationMethod
Computed the expected shortfall.This protected method should be implemented in subclasses and coherent to
QuantileCalculationMethod.quantile(double, DoubleArray, boolean)
.- Specified by:
expectedShortfall
in classQuantileCalculationMethod
- Parameters:
level
- the quantile levelsample
- the sample observations- Returns:
- the expected shortfall
-
-