Record Class ExtremeValueTheory.GpdFit
java.lang.Object
java.lang.Record
com.quantfinlib.risk.ExtremeValueTheory.GpdFit
- Record Components:
threshold- u — losses above this were fittedshape- ξ — the tail index (fat when positive)scale- β — the GPD scaleexceedances- how many losses exceeded usampleSize- total losses the tail sits in
- Enclosing class:
ExtremeValueTheory
public static record ExtremeValueTheory.GpdFit(double threshold, double shape, double scale, int exceedances, int sampleSize)
extends Record
A fitted POT tail model.
-
Constructor Summary
ConstructorsConstructorDescriptionGpdFit(double threshold, double shape, double scale, int exceedances, int sampleSize) Creates an instance of aGpdFitrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.intReturns the value of theexceedancesrecord component.doubleexpectedShortfall(double p) Tail expected shortfall atp.final inthashCode()Returns a hash code value for this object.intReturns the value of thesampleSizerecord component.doublescale()Returns the value of thescalerecord component.doubleshape()Returns the value of theshaperecord component.doubleReturns the value of thethresholdrecord component.final StringtoString()Returns a string representation of this record class.doublevar(double p) Tail VaR at one-sided confidencep(must lie in the tail).
-
Constructor Details
-
GpdFit
public GpdFit(double threshold, double shape, double scale, int exceedances, int sampleSize) Creates an instance of aGpdFitrecord class.- Parameters:
threshold- the value for thethresholdrecord componentshape- the value for theshaperecord componentscale- the value for thescalerecord componentexceedances- the value for theexceedancesrecord componentsampleSize- the value for thesampleSizerecord component
-
-
Method Details
-
var
public double var(double p) Tail VaR at one-sided confidencep(must lie in the tail). -
expectedShortfall
public double expectedShortfall(double p) Tail expected shortfall atp. Refuses (throws) when ξ ≥ 1: the fitted tail's mean is infinite, and a finite number here would be the exact lie EVT exists to prevent. -
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
threshold
-
shape
-
scale
-
exceedances
public int exceedances()Returns the value of theexceedancesrecord component.- Returns:
- the value of the
exceedancesrecord component
-
sampleSize
public int sampleSize()Returns the value of thesampleSizerecord component.- Returns:
- the value of the
sampleSizerecord component
-