Record Class VarBacktest.VarBacktestResult
java.lang.Object
java.lang.Record
com.quantfinlib.risk.VarBacktest.VarBacktestResult
- Enclosing class:
VarBacktest
public static record VarBacktest.VarBacktestResult(int observations, int exceptions, double expectedExceptions, double exceptionRate, double kupiecStatistic, double kupiecPValue, double independenceStatistic, double independencePValue, double conditionalCoverageStatistic, double conditionalCoveragePValue)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionVarBacktestResult(int observations, int exceptions, double expectedExceptions, double exceptionRate, double kupiecStatistic, double kupiecPValue, double independenceStatistic, double independencePValue, double conditionalCoverageStatistic, double conditionalCoveragePValue) Creates an instance of aVarBacktestResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleancalibrated(double significance) Exception frequency consistent with the confidence level?doubleReturns the value of theconditionalCoveragePValuerecord component.doubleReturns the value of theconditionalCoverageStatisticrecord component.final booleanIndicates whether some other object is "equal to" this one.doubleReturns the value of theexceptionRaterecord component.intReturns the value of theexceptionsrecord component.doubleReturns the value of theexpectedExceptionsrecord component.final inthashCode()Returns a hash code value for this object.doubleReturns the value of theindependencePValuerecord component.doubleReturns the value of theindependenceStatisticrecord component.booleanindependent(double significance) Exceptions arrive independently (no crisis clustering)?doubleReturns the value of thekupiecPValuerecord component.doubleReturns the value of thekupiecStatisticrecord component.intReturns the value of theobservationsrecord component.booleanpasses(double significance) Joint test: right rate AND independent.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
VarBacktestResult
public VarBacktestResult(int observations, int exceptions, double expectedExceptions, double exceptionRate, double kupiecStatistic, double kupiecPValue, double independenceStatistic, double independencePValue, double conditionalCoverageStatistic, double conditionalCoveragePValue) Creates an instance of aVarBacktestResultrecord class.- Parameters:
observations- the value for theobservationsrecord componentexceptions- the value for theexceptionsrecord componentexpectedExceptions- the value for theexpectedExceptionsrecord componentexceptionRate- the value for theexceptionRaterecord componentkupiecStatistic- the value for thekupiecStatisticrecord componentkupiecPValue- the value for thekupiecPValuerecord componentindependenceStatistic- the value for theindependenceStatisticrecord componentindependencePValue- the value for theindependencePValuerecord componentconditionalCoverageStatistic- the value for theconditionalCoverageStatisticrecord componentconditionalCoveragePValue- the value for theconditionalCoveragePValuerecord component
-
-
Method Details
-
calibrated
public boolean calibrated(double significance) Exception frequency consistent with the confidence level? -
independent
public boolean independent(double significance) Exceptions arrive independently (no crisis clustering)? -
passes
public boolean passes(double significance) Joint test: right rate AND independent. -
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. -
observations
public int observations()Returns the value of theobservationsrecord component.- Returns:
- the value of the
observationsrecord component
-
exceptions
public int exceptions()Returns the value of theexceptionsrecord component.- Returns:
- the value of the
exceptionsrecord component
-
expectedExceptions
public double expectedExceptions()Returns the value of theexpectedExceptionsrecord component.- Returns:
- the value of the
expectedExceptionsrecord component
-
exceptionRate
public double exceptionRate()Returns the value of theexceptionRaterecord component.- Returns:
- the value of the
exceptionRaterecord component
-
kupiecStatistic
public double kupiecStatistic()Returns the value of thekupiecStatisticrecord component.- Returns:
- the value of the
kupiecStatisticrecord component
-
kupiecPValue
public double kupiecPValue()Returns the value of thekupiecPValuerecord component.- Returns:
- the value of the
kupiecPValuerecord component
-
independenceStatistic
public double independenceStatistic()Returns the value of theindependenceStatisticrecord component.- Returns:
- the value of the
independenceStatisticrecord component
-
independencePValue
public double independencePValue()Returns the value of theindependencePValuerecord component.- Returns:
- the value of the
independencePValuerecord component
-
conditionalCoverageStatistic
public double conditionalCoverageStatistic()Returns the value of theconditionalCoverageStatisticrecord component.- Returns:
- the value of the
conditionalCoverageStatisticrecord component
-
conditionalCoveragePValue
public double conditionalCoveragePValue()Returns the value of theconditionalCoveragePValuerecord component.- Returns:
- the value of the
conditionalCoveragePValuerecord component
-