Record Class VarBacktest.TrafficLight
java.lang.Object
java.lang.Record
com.quantfinlib.risk.VarBacktest.TrafficLight
- Record Components:
zone- green, amber or redexceptions- number of exceptions in the sampleobservations- sample sizecumulativeProbability- P(X ≤ exceptions) for X ~ Binomial(observations, 1 - coverage)multiplier- the backtesting-dependent multiplier of MAR32.9 Table 1 (1.50 to 2.00) for a 250-observation sample at 99 % coverage; NaN otherwise, where the Basel text defines the zones but no multipliers
- Enclosing class:
VarBacktest
public static record VarBacktest.TrafficLight(VarBacktest.Zone zone, int exceptions, int observations, double cumulativeProbability, double multiplier)
extends Record
Result of the Basel traffic-light test.
-
Constructor Summary
ConstructorsConstructorDescriptionTrafficLight(VarBacktest.Zone zone, int exceptions, int observations, double cumulativeProbability, double multiplier) Creates an instance of aTrafficLightrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the value of thecumulativeProbabilityrecord component.final booleanIndicates whether some other object is "equal to" this one.intReturns the value of theexceptionsrecord component.final inthashCode()Returns a hash code value for this object.doubleReturns the value of themultiplierrecord component.intReturns the value of theobservationsrecord component.final StringtoString()Returns a string representation of this record class.zone()Returns the value of thezonerecord component.
-
Constructor Details
-
TrafficLight
public TrafficLight(VarBacktest.Zone zone, int exceptions, int observations, double cumulativeProbability, double multiplier) Creates an instance of aTrafficLightrecord class.- Parameters:
zone- the value for thezonerecord componentexceptions- the value for theexceptionsrecord componentobservations- the value for theobservationsrecord componentcumulativeProbability- the value for thecumulativeProbabilityrecord componentmultiplier- the value for themultiplierrecord component
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
zone
-
exceptions
public int exceptions()Returns the value of theexceptionsrecord component.- Returns:
- the value of the
exceptionsrecord component
-
observations
public int observations()Returns the value of theobservationsrecord component.- Returns:
- the value of the
observationsrecord component
-
cumulativeProbability
public double cumulativeProbability()Returns the value of thecumulativeProbabilityrecord component.- Returns:
- the value of the
cumulativeProbabilityrecord component
-
multiplier
public double multiplier()Returns the value of themultiplierrecord component.- Returns:
- the value of the
multiplierrecord component
-