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 QuantileResultexpectedShortfall(double level, DoubleArray sample)Computed the expected shortfall.protected QuantileResultquantile(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:QuantileCalculationMethodComputed the quantile.This protected method should be implemented in subclasses.
- Specified by:
quantilein 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:QuantileCalculationMethodComputed the expected shortfall.This protected method should be implemented in subclasses and coherent to
QuantileCalculationMethod.quantile(double, DoubleArray, boolean).- Specified by:
expectedShortfallin classQuantileCalculationMethod- Parameters:
level- the quantile levelsample- the sample observations- Returns:
- the expected shortfall
-
-